chargebee 2.28.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +47 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -7
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +652 -363
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +23 -23
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
|
@@ -478,57 +478,48 @@ If there are additional entity identifiers for the customer not associated with
|
|
|
478
478
|
export namespace Customer {
|
|
479
479
|
export class CustomerResource {
|
|
480
480
|
/**
|
|
481
|
-
* @description
|
|
481
|
+
* @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/3ds_card_payments?prod_cat_ver=1) and pass it as input parameter to this API.
|
|
482
482
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
delete(customer_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* @description Sets a customer into a [hierarchical relationship](https://www.chargebee.com/docs/account-hierarchy.html) with another. The path parameter `customer_id` is the ID of the child in the relationship.
|
|
489
|
-
**Note**
|
|
483
|
+
Creates a customer. You can create a customer and then create subscriptions for the customer when required. When creating a customer, you can pass along the billing address and card details.
|
|
490
484
|
|
|
491
|
-
|
|
492
|
-
* The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver=2#mbe).
|
|
485
|
+
Passing raw card data via API involves PCI liability at your end due to the sensitivity of the data. Instead, you can use one of the following integration options as applicable:
|
|
493
486
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
relationships(customer_id:string, input?:RelationshipsInputParam):ChargebeeRequest<RelationshipsResponse>;
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* @description Disconnects a child customer from its parent. `customer_id` is the [id](/docs/api/customers#customer_id) of the child.
|
|
487
|
+
Here's some resources you can use to collect card information within your checkout form based on the payment gateway you use:
|
|
500
488
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
489
|
+
* [Stripe.js](https://stripe.com/docs/js) for Stripe users.
|
|
490
|
+
* [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users.
|
|
491
|
+
* [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/).
|
|
492
|
+
* If you are using the Adyen gateway, you will have to use the Adyen's [Client-Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in `adyen.encrypted.data`as temp token in this API.
|
|
493
|
+
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration.
|
|
494
|
+
|
|
495
|
+
When billing address is not passed (say, for customers making offline payments), you can always provide it later using the [Update billing info for a customer API](/docs/api/customers#update_billing_info_for_a_customer).
|
|
496
|
+
|
|
497
|
+
**Note:**When an invoice is generated for a customer, the billing address provided for the customer is stored with the invoice. If the First Name, Last Name, and Company fields of the billing address do not contain any information, they're picked up from the customer details.
|
|
507
498
|
|
|
508
499
|
*/
|
|
509
500
|
|
|
510
|
-
|
|
501
|
+
create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
511
502
|
|
|
512
503
|
/**
|
|
513
|
-
* @description
|
|
504
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
514
505
|
|
|
515
506
|
*/
|
|
516
507
|
|
|
517
|
-
|
|
508
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
518
509
|
|
|
519
510
|
/**
|
|
520
|
-
* @description
|
|
511
|
+
* @description Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.
|
|
521
512
|
|
|
522
513
|
*/
|
|
523
514
|
|
|
524
|
-
|
|
515
|
+
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
525
516
|
|
|
526
517
|
/**
|
|
527
|
-
* @description
|
|
518
|
+
* @description Updates the customer resource. However, this method cannot be used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our [Update Billing Info](/docs/api/customers#update_billing_info_for_a_customer) API.
|
|
528
519
|
|
|
529
520
|
*/
|
|
530
521
|
|
|
531
|
-
|
|
522
|
+
update(customer_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
532
523
|
|
|
533
524
|
/**
|
|
534
525
|
* @description We recently released [Payment Sources](/docs/api/payment_sources), which comes with additional options and improvements to the [Card APIs](/docs/api/cards). For this operation, use the [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token) API or [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token) API under Payment Sources to update payment method for the customer.
|
|
@@ -583,55 +574,29 @@ The format of reference_id will differ based on where the bank account is stored
|
|
|
583
574
|
update_payment_method(customer_id:string, input?:UpdatePaymentMethodInputParam):ChargebeeRequest<UpdatePaymentMethodResponse>;
|
|
584
575
|
|
|
585
576
|
/**
|
|
586
|
-
* @description
|
|
577
|
+
* @description This method is used for updating the `billing_address` and `vat_number` attributes of the `customer`. For updating the other customer attributes use [Update Customer API](customers#update_a_customer).
|
|
587
578
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* @description Updates the customer resource. However, this method cannot be used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our [Update Billing Info](/docs/api/customers#update_billing_info_for_a_customer) API.
|
|
579
|
+
During this operation, if `billing_address` and `vat_number` are not already present, they're added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for `entity_identifiers[i]` when `entity_identifiers[operation][i]` is passed as `delete`.
|
|
594
580
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
update(customer_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. Changes the customer's *billing_date* and/or *billing_day_of_week*.
|
|
581
|
+
**Note:**When an invoice is generated for a customer, the billing address provided for the customer will be stored with the invoice. If the First Name, Last Name, and Company fields do not contain any information under Billing Info, the same will be picked from Customer Details if the same is available there.Please ensure that the VAT number is provided whenever the billing address is updated, as failing to do so will override any existing VAT numbers if new values are not provided.
|
|
601
582
|
|
|
602
583
|
*/
|
|
603
584
|
|
|
604
|
-
|
|
585
|
+
update_billing_info(customer_id:string, input?:UpdateBillingInfoInputParam):ChargebeeRequest<UpdateBillingInfoResponse>;
|
|
605
586
|
|
|
606
587
|
/**
|
|
607
|
-
* @description
|
|
588
|
+
* @description This API retrieves all the contacts for a customer.
|
|
608
589
|
|
|
609
590
|
*/
|
|
610
591
|
|
|
611
|
-
|
|
592
|
+
contacts_for_customer(customer_id:string, input?:ContactsForCustomerInputParam):ChargebeeRequest<ContactsForCustomerResponse>;
|
|
612
593
|
|
|
613
594
|
/**
|
|
614
|
-
* @description
|
|
615
|
-
|
|
616
|
-
Creates a customer. You can create a customer and then create subscriptions for the customer when required. When creating a customer, you can pass along the billing address and card details.
|
|
617
|
-
|
|
618
|
-
Passing raw card data via API involves PCI liability at your end due to the sensitivity of the data. Instead, you can use one of the following integration options as applicable:
|
|
619
|
-
|
|
620
|
-
Here's some resources you can use to collect card information within your checkout form based on the payment gateway you use:
|
|
621
|
-
|
|
622
|
-
* [Stripe.js](https://stripe.com/docs/js) for Stripe users.
|
|
623
|
-
* [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users.
|
|
624
|
-
* [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/).
|
|
625
|
-
* If you are using the Adyen gateway, you will have to use the Adyen's [Client-Side Encryption](https://docs.adyen.com/developers/features/client-side-encryption) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in `adyen.encrypted.data`as temp token in this API.
|
|
626
|
-
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration.
|
|
627
|
-
|
|
628
|
-
When billing address is not passed (say, for customers making offline payments), you can always provide it later using the [Update billing info for a customer API](/docs/api/customers#update_billing_info_for_a_customer).
|
|
629
|
-
|
|
630
|
-
**Note:**When an invoice is generated for a customer, the billing address provided for the customer is stored with the invoice. If the First Name, Last Name, and Company fields of the billing address do not contain any information, they're picked up from the customer details.
|
|
595
|
+
* @description Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.
|
|
631
596
|
|
|
632
597
|
*/
|
|
633
598
|
|
|
634
|
-
|
|
599
|
+
assign_payment_role(customer_id:string, input:AssignPaymentRoleInputParam):ChargebeeRequest<AssignPaymentRoleResponse>;
|
|
635
600
|
|
|
636
601
|
/**
|
|
637
602
|
* @description Adds the required contact to a customer. You can give the First Name, Last Name, Email ID and more details as input parameters to add them under the desired customer.
|
|
@@ -641,29 +606,25 @@ When billing address is not passed (say, for customers making offline payments),
|
|
|
641
606
|
add_contact(customer_id:string, input?:AddContactInputParam):ChargebeeRequest<AddContactResponse>;
|
|
642
607
|
|
|
643
608
|
/**
|
|
644
|
-
* @description
|
|
609
|
+
* @description Updates the details of a contact for a customer. You can give the field data to be updated as input parameters along with the Contact ID to update it.
|
|
645
610
|
|
|
646
611
|
*/
|
|
647
612
|
|
|
648
|
-
|
|
613
|
+
update_contact(customer_id:string, input?:UpdateContactInputParam):ChargebeeRequest<UpdateContactResponse>;
|
|
649
614
|
|
|
650
615
|
/**
|
|
651
|
-
* @description
|
|
616
|
+
* @description Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter.
|
|
652
617
|
|
|
653
618
|
*/
|
|
654
619
|
|
|
655
|
-
|
|
620
|
+
delete_contact(customer_id:string, input?:DeleteContactInputParam):ChargebeeRequest<DeleteContactResponse>;
|
|
656
621
|
|
|
657
622
|
/**
|
|
658
|
-
* @description
|
|
659
|
-
**Note**
|
|
660
|
-
|
|
661
|
-
* Moving virtual bank accounts from one customer to another is not supported in this API.
|
|
662
|
-
* Merging customers from different [business entities](/docs/api?prod_cat_ver=2#mbe) is not permitted.
|
|
623
|
+
* @description Use this API to record any [excess payments](//www.chargebee.com/docs/customers.html#excess-payments) made by the customer, such as advance payments. Such payments will be automatically applied to the future invoices. It can also be [manually applied](//www.chargebee.com/docs/invoice-operations.html#apply-excess-payments) to the existing *Not Paid* or *Payment Due* invoices.
|
|
663
624
|
|
|
664
625
|
*/
|
|
665
626
|
|
|
666
|
-
|
|
627
|
+
record_excess_payment(customer_id:string, input?:RecordExcessPaymentInputParam):ChargebeeRequest<RecordExcessPaymentResponse>;
|
|
667
628
|
|
|
668
629
|
/**
|
|
669
630
|
* @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds_card_payments) and pass it as input parameter to this API.
|
|
@@ -675,279 +636,233 @@ This API can be used to collect the payments for customer's **payment_due**
|
|
|
675
636
|
collect_payment(customer_id:string, input?:CollectPaymentInputParam):ChargebeeRequest<CollectPaymentResponse>;
|
|
676
637
|
|
|
677
638
|
/**
|
|
678
|
-
* @description
|
|
639
|
+
* @description Deletes a particular customer identified by the a unique identifier.
|
|
679
640
|
|
|
680
641
|
*/
|
|
681
642
|
|
|
682
|
-
|
|
643
|
+
delete(customer_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
683
644
|
|
|
684
645
|
/**
|
|
685
|
-
* @description
|
|
646
|
+
* @description This API copies a customer object from one site to another. The destination site (the site to which the customer is copied) is specified by the path parameter `{site}`; whereas, the source site (the site from which the customer is copied) is specified by the query parameter `from_site`.
|
|
686
647
|
|
|
687
648
|
*/
|
|
688
649
|
|
|
689
|
-
|
|
650
|
+
move(input:MoveInputParam):ChargebeeRequest<MoveResponse>;
|
|
690
651
|
|
|
691
652
|
/**
|
|
692
|
-
* @description
|
|
693
|
-
|
|
694
|
-
This data falls into two categories:
|
|
695
|
-
|
|
696
|
-
* **Self-Serve Portal data:** subscriptions and invoices of the child.
|
|
697
|
-
* **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
|
|
698
|
-
|
|
699
|
-
The 'parent' is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter `customer_id` is the [id](/docs/api/customers#customer_id) of the child in the relationship.
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
**Note:** This endpoint cannot be used to change the `parent_id`, `invoice_owner_id` or `payment_owner_id` for the customer. To change them, [delink](/docs/api/customers#delink_a_customer) the customer and then call **Link a customer** again.
|
|
653
|
+
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. Changes the customer's *billing_date* and/or *billing_day_of_week*.
|
|
704
654
|
|
|
705
655
|
*/
|
|
706
656
|
|
|
707
|
-
|
|
657
|
+
change_billing_date(customer_id:string, input?:ChangeBillingDateInputParam):ChargebeeRequest<ChangeBillingDateResponse>;
|
|
708
658
|
|
|
709
659
|
/**
|
|
710
|
-
* @description This
|
|
711
|
-
|
|
712
|
-
During this operation, if `billing_address` and `vat_number` are not already present, they're added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for `entity_identifiers[i]` when `entity_identifiers[operation][i]` is passed as `delete`.
|
|
660
|
+
* @description This API moves a customer's payment methods, subscriptions, invoices, credit notes, transactions, unbilled charges, and orders to another customer. Events and email logs will not be moved. The API execution is asynchronous.
|
|
661
|
+
**Note**
|
|
713
662
|
|
|
714
|
-
|
|
663
|
+
* Moving virtual bank accounts from one customer to another is not supported in this API.
|
|
664
|
+
* Merging customers from different [business entities](/docs/api?prod_cat_ver=2#mbe) is not permitted.
|
|
715
665
|
|
|
716
666
|
*/
|
|
717
667
|
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
export interface DeleteResponse {
|
|
721
|
-
customer:Customer;
|
|
722
|
-
|
|
723
|
-
card?:Card;
|
|
724
|
-
}
|
|
725
|
-
export interface DeleteInputParam {
|
|
668
|
+
merge(input:MergeInputParam):ChargebeeRequest<MergeResponse>;
|
|
726
669
|
|
|
727
670
|
/**
|
|
728
|
-
* @description
|
|
671
|
+
* @description Clear personal details of a customer using this API.
|
|
729
672
|
|
|
730
673
|
*/
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
export interface RelationshipsResponse {
|
|
735
|
-
customer:Customer;
|
|
736
|
-
}
|
|
737
|
-
export interface RelationshipsInputParam {
|
|
674
|
+
|
|
675
|
+
clear_personal_data(customer_id:string):ChargebeeRequest<ClearPersonalDataResponse>;
|
|
738
676
|
|
|
739
677
|
/**
|
|
740
|
-
* @description The `
|
|
678
|
+
* @description Sets a customer into a [hierarchical relationship](https://www.chargebee.com/docs/account-hierarchy.html) with another. The path parameter `customer_id` is the ID of the child in the relationship.
|
|
679
|
+
**Note**
|
|
680
|
+
|
|
681
|
+
* In the descriptions for `use_default_hierarchy_settings`, `parent_account_access`, and `child_account_access` parameters, the "parent" is the customer whose ID is [payment_owner_id](/docs/api/customers?prod_cat_ver=2#link_a_customer_payment_owner_id). However, if the `payment_owner_id` is set as the ID of the child itself (`{customer_id}`), then the "parent" is [parent_id](/docs/api/customers?prod_cat_ver=2#link_a_customer_parent_id).
|
|
682
|
+
* The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver=2#mbe).
|
|
741
683
|
|
|
742
684
|
*/
|
|
743
|
-
|
|
744
|
-
|
|
685
|
+
|
|
686
|
+
relationships(customer_id:string, input?:RelationshipsInputParam):ChargebeeRequest<RelationshipsResponse>;
|
|
745
687
|
|
|
746
688
|
/**
|
|
747
|
-
* @description
|
|
689
|
+
* @description Disconnects a child customer from its parent. `customer_id` is the [id](/docs/api/customers#customer_id) of the child.
|
|
748
690
|
|
|
749
691
|
*/
|
|
750
|
-
|
|
751
|
-
|
|
692
|
+
|
|
693
|
+
delete_relationship(customer_id:string):ChargebeeRequest<DeleteRelationshipResponse>;
|
|
752
694
|
|
|
753
695
|
/**
|
|
754
|
-
* @description
|
|
696
|
+
* @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
|
|
755
697
|
|
|
756
698
|
*/
|
|
757
|
-
|
|
758
|
-
|
|
699
|
+
|
|
700
|
+
hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
|
|
759
701
|
|
|
760
702
|
/**
|
|
761
|
-
* @description
|
|
703
|
+
* @description Changes the level of access that the parent or the child itself has to the child's information.
|
|
704
|
+
|
|
705
|
+
This data falls into two categories:
|
|
762
706
|
|
|
763
707
|
* **Self-Serve Portal data:** subscriptions and invoices of the child.
|
|
764
708
|
* **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
|
|
765
709
|
|
|
710
|
+
The 'parent' is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter `customer_id` is the [id](/docs/api/customers#customer_id) of the child in the relationship.
|
|
766
711
|
|
|
767
712
|
|
|
768
|
-
**Usage:**
|
|
769
|
-
|
|
770
|
-
* Value set to `true`: Applies the global access levels defined in the Account Hierarchy settings to this child. These global settings are configured in the admin console
|
|
771
|
-
* Value set to `false`: Customizes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the settings. If you skip passing any parameters, the global settings are applied for them.
|
|
772
|
-
.
|
|
773
713
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
use_default_hierarchy_settings?:boolean;
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* @description Parameters for parent_account_access
|
|
780
|
-
|
|
781
|
-
*/
|
|
782
|
-
|
|
783
|
-
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* @description Parameters for child_account_access
|
|
714
|
+
**Note:** This endpoint cannot be used to change the `parent_id`, `invoice_owner_id` or `payment_owner_id` for the customer. To change them, [delink](/docs/api/customers#delink_a_customer) the customer and then call **Link a customer** again.
|
|
787
715
|
|
|
788
716
|
*/
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
export interface DeleteRelationshipResponse {
|
|
793
|
-
customer:Customer;
|
|
717
|
+
|
|
718
|
+
update_hierarchy_settings(customer_id:string, input?:UpdateHierarchySettingsInputParam):ChargebeeRequest<UpdateHierarchySettingsResponse>;
|
|
794
719
|
}
|
|
795
|
-
|
|
796
|
-
export interface DeleteContactResponse {
|
|
720
|
+
export interface CreateResponse {
|
|
797
721
|
customer:Customer;
|
|
798
722
|
|
|
799
723
|
card?:Card;
|
|
800
724
|
}
|
|
801
|
-
export interface
|
|
802
|
-
|
|
725
|
+
export interface CreateInputParam {
|
|
726
|
+
[key : string] : any;
|
|
803
727
|
/**
|
|
804
|
-
* @description
|
|
728
|
+
* @description Id for the new customer. If not given, this will be auto-generated.
|
|
805
729
|
|
|
806
730
|
*/
|
|
807
731
|
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
export interface AssignPaymentRoleResponse {
|
|
811
|
-
customer:Customer;
|
|
812
|
-
|
|
813
|
-
payment_source:PaymentSource;
|
|
814
|
-
}
|
|
815
|
-
export interface AssignPaymentRoleInputParam {
|
|
732
|
+
id?:string;
|
|
816
733
|
|
|
817
734
|
/**
|
|
818
|
-
* @description
|
|
735
|
+
* @description First name of the customer.
|
|
819
736
|
|
|
820
737
|
*/
|
|
821
738
|
|
|
822
|
-
|
|
739
|
+
first_name?:string;
|
|
823
740
|
|
|
824
741
|
/**
|
|
825
|
-
* @description
|
|
742
|
+
* @description Last name of the customer.
|
|
826
743
|
|
|
827
744
|
*/
|
|
828
745
|
|
|
829
|
-
|
|
830
|
-
}
|
|
831
|
-
export interface MoveResponse {
|
|
832
|
-
resource_migration:ResourceMigration;
|
|
833
|
-
}
|
|
834
|
-
export interface MoveInputParam {
|
|
746
|
+
last_name?:string;
|
|
835
747
|
|
|
836
748
|
/**
|
|
837
|
-
* @description
|
|
749
|
+
* @description Email of the customer. Configured email notifications will be sent to this email.
|
|
838
750
|
|
|
839
751
|
*/
|
|
840
752
|
|
|
841
|
-
|
|
753
|
+
email?:string;
|
|
842
754
|
|
|
843
755
|
/**
|
|
844
|
-
* @description
|
|
756
|
+
* @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
|
|
845
757
|
|
|
846
758
|
*/
|
|
847
759
|
|
|
848
|
-
|
|
849
|
-
}
|
|
850
|
-
export interface HierarchyResponse {
|
|
851
|
-
hierarchies:Hierarchy[];
|
|
852
|
-
}
|
|
853
|
-
export interface HierarchyInputParam {
|
|
760
|
+
preferred_currency_code?:string;
|
|
854
761
|
|
|
855
762
|
/**
|
|
856
|
-
* @description
|
|
763
|
+
* @description Phone number of the customer.
|
|
857
764
|
|
|
858
765
|
*/
|
|
859
|
-
|
|
860
|
-
hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
|
|
861
|
-
}
|
|
862
|
-
export interface UpdatePaymentMethodResponse {
|
|
863
|
-
customer:Customer;
|
|
864
766
|
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
export interface UpdatePaymentMethodInputParam {
|
|
767
|
+
phone?:string;
|
|
868
768
|
|
|
869
769
|
/**
|
|
870
|
-
* @description
|
|
770
|
+
* @description Company name of the customer.
|
|
871
771
|
|
|
872
772
|
*/
|
|
873
773
|
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
export interface RetrieveResponse {
|
|
877
|
-
customer:Customer;
|
|
774
|
+
company?:string;
|
|
878
775
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
776
|
+
/**
|
|
777
|
+
* @description Whether payments needs to be collected automatically for this customer. \* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline.
|
|
778
|
+
|
|
779
|
+
*/
|
|
780
|
+
|
|
781
|
+
auto_collection?:AutoCollection;
|
|
884
782
|
|
|
885
|
-
card?:Card;
|
|
886
|
-
}
|
|
887
|
-
export interface UpdateInputParam {
|
|
888
|
-
[key : string] : any;
|
|
889
783
|
/**
|
|
890
|
-
* @description
|
|
784
|
+
* @description The number of days within which the customer has to make payment for the invoice. .
|
|
891
785
|
|
|
892
786
|
*/
|
|
893
787
|
|
|
894
|
-
|
|
788
|
+
net_term_days?:number;
|
|
895
789
|
|
|
896
790
|
/**
|
|
897
|
-
* @description
|
|
791
|
+
* @description Whether the customer can pay via Direct Debit.
|
|
898
792
|
|
|
899
793
|
*/
|
|
900
794
|
|
|
901
|
-
|
|
795
|
+
allow_direct_debit?:boolean;
|
|
902
796
|
|
|
903
797
|
/**
|
|
904
|
-
* @description
|
|
798
|
+
* @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT
|
|
799
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
905
800
|
|
|
906
801
|
*/
|
|
907
802
|
|
|
908
|
-
|
|
803
|
+
vat_number?:string;
|
|
909
804
|
|
|
910
805
|
/**
|
|
911
|
-
* @description
|
|
806
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
807
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
808
|
+
|
|
809
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
810
|
+
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
811
|
+
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
912
812
|
|
|
913
813
|
*/
|
|
914
814
|
|
|
915
|
-
|
|
815
|
+
vat_number_prefix?:string;
|
|
916
816
|
|
|
917
817
|
/**
|
|
918
|
-
* @description
|
|
818
|
+
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
|
|
819
|
+
**Tip:**
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
823
|
+
.
|
|
919
824
|
|
|
920
825
|
*/
|
|
921
826
|
|
|
922
|
-
|
|
827
|
+
entity_identifier_scheme?:string;
|
|
923
828
|
|
|
924
829
|
/**
|
|
925
|
-
* @description
|
|
830
|
+
* @description The standard used for specifying the `entity_identifier_scheme`. Currently only `iso6523-actorid-upis` is supported and is used by default when not provided.
|
|
831
|
+
**Tip:**
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
835
|
+
.
|
|
926
836
|
|
|
927
837
|
*/
|
|
928
838
|
|
|
929
|
-
|
|
839
|
+
entity_identifier_standard?:string;
|
|
930
840
|
|
|
931
841
|
/**
|
|
932
|
-
* @description
|
|
842
|
+
* @description Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site.
|
|
933
843
|
|
|
934
844
|
*/
|
|
935
845
|
|
|
936
|
-
|
|
846
|
+
registered_for_gst?:boolean;
|
|
937
847
|
|
|
938
848
|
/**
|
|
939
|
-
* @description
|
|
849
|
+
* @description Determines whether the customer is e-invoiced. When set to `true` or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`). When set to `false`, the customer is not e-invoiced even if e-invoicing is enabled for their country.
|
|
850
|
+
**Tip:**
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
854
|
+
.
|
|
940
855
|
|
|
941
856
|
*/
|
|
942
857
|
|
|
943
|
-
|
|
858
|
+
is_einvoice_enabled?:boolean;
|
|
944
859
|
|
|
945
860
|
/**
|
|
946
|
-
* @description
|
|
861
|
+
* @description Determines whether to send an e-invoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level.
|
|
947
862
|
|
|
948
863
|
*/
|
|
949
864
|
|
|
950
|
-
|
|
865
|
+
einvoicing_method?:EinvoicingMethod;
|
|
951
866
|
|
|
952
867
|
/**
|
|
953
868
|
* @description Specifies if the customer is liable for tax. \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* exempt -
|
|
@@ -968,7 +883,7 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
968
883
|
exemption_details?:any[];
|
|
969
884
|
|
|
970
885
|
/**
|
|
971
|
-
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \*
|
|
886
|
+
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* industrial - When the purchase is made by an industrial business \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \* business - When the purchase is made at a place of business \* residential - When the purchase is made by a customer for home use
|
|
972
887
|
|
|
973
888
|
*/
|
|
974
889
|
|
|
@@ -982,12 +897,19 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
982
897
|
client_profile_id?:string;
|
|
983
898
|
|
|
984
899
|
/**
|
|
985
|
-
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \*
|
|
900
|
+
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* other - Other \* government - Government \* wholesale - Whole-sale
|
|
986
901
|
|
|
987
902
|
*/
|
|
988
903
|
|
|
989
904
|
taxjar_exemption_category?:TaxjarExemptionCategory;
|
|
990
905
|
|
|
906
|
+
/**
|
|
907
|
+
* @description Confirms that a customer is a valid business without an EU/UK VAT number.
|
|
908
|
+
|
|
909
|
+
*/
|
|
910
|
+
|
|
911
|
+
business_customer_without_vat_number?:boolean;
|
|
912
|
+
|
|
991
913
|
/**
|
|
992
914
|
* @description Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.
|
|
993
915
|
|
|
@@ -996,7 +918,7 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
996
918
|
locale?:string;
|
|
997
919
|
|
|
998
920
|
/**
|
|
999
|
-
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \*
|
|
921
|
+
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax \* d - Foreign diplomat \* e - Charitable or benevolent organization \* f - Religious organization \* g - Resale \* a - Federal government \* b - State government \* c - Tribe/Status Indian/Indian Band
|
|
1000
922
|
|
|
1001
923
|
*/
|
|
1002
924
|
|
|
@@ -1010,18 +932,20 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1010
932
|
exempt_number?:string;
|
|
1011
933
|
|
|
1012
934
|
/**
|
|
1013
|
-
* @description
|
|
935
|
+
* @description A collection of key-value pairs that provides extra information about the customer.
|
|
936
|
+
**Note:** There's a character limit of 65,535.
|
|
937
|
+
[Learn more](advanced-features?prod_cat_ver=2#metadata).
|
|
1014
938
|
|
|
1015
939
|
*/
|
|
1016
940
|
|
|
1017
|
-
|
|
941
|
+
meta_data?:object;
|
|
1018
942
|
|
|
1019
943
|
/**
|
|
1020
|
-
* @description
|
|
944
|
+
* @description The preferred offline payment method for the customer. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* boleto - Boleto \* check - Check \* ach_credit - ACH Credit
|
|
1021
945
|
|
|
1022
946
|
*/
|
|
1023
947
|
|
|
1024
|
-
|
|
948
|
+
offline_payment_method?:OfflinePaymentMethod;
|
|
1025
949
|
|
|
1026
950
|
/**
|
|
1027
951
|
* @description Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence.
|
|
@@ -1031,74 +955,82 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1031
955
|
auto_close_invoices?:boolean;
|
|
1032
956
|
|
|
1033
957
|
/**
|
|
1034
|
-
* @description
|
|
958
|
+
* @description Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled.
|
|
959
|
+
**Note:**
|
|
960
|
+
|
|
961
|
+
Any invoices raised when a subscription activates from `in_trial` or `future` `status`, are not consolidated by default. [Contact Support](https://chargebee.freshdesk.com/support/home) to enable consolidation for such invoices.
|
|
962
|
+
.
|
|
1035
963
|
|
|
1036
964
|
*/
|
|
1037
965
|
|
|
1038
|
-
|
|
966
|
+
consolidated_invoicing?:boolean;
|
|
1039
967
|
|
|
1040
968
|
/**
|
|
1041
|
-
* @description
|
|
969
|
+
* @description The Chargebee payment token generated by Chargebee JS.
|
|
1042
970
|
|
|
1043
971
|
*/
|
|
1044
972
|
|
|
1045
|
-
|
|
973
|
+
token_id?:string;
|
|
1046
974
|
|
|
1047
975
|
/**
|
|
1048
|
-
* @description
|
|
1049
|
-
**Note
|
|
976
|
+
* @description The unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe) this customer should be [linked](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-linked-be) to. Applicable only when multiple business entities have been created for the site. When not provided, the customer is linked to the [default business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-default-be) defined for the site.
|
|
977
|
+
**Note**
|
|
1050
978
|
|
|
1051
|
-
|
|
979
|
+
An alternative way of passing this parameter is by means of a [custom HTTP header](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).
|
|
1052
980
|
.
|
|
1053
981
|
|
|
1054
982
|
*/
|
|
1055
983
|
|
|
1056
|
-
|
|
1057
|
-
}
|
|
1058
|
-
export interface ChangeBillingDateResponse {
|
|
1059
|
-
customer:Customer;
|
|
1060
|
-
}
|
|
1061
|
-
export interface ChangeBillingDateInputParam {
|
|
984
|
+
business_entity_id?:string;
|
|
1062
985
|
|
|
1063
986
|
/**
|
|
1064
|
-
* @description
|
|
987
|
+
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
1065
988
|
|
|
1066
989
|
*/
|
|
1067
990
|
|
|
1068
|
-
|
|
991
|
+
invoice_notes?:string;
|
|
1069
992
|
|
|
1070
993
|
/**
|
|
1071
|
-
* @description
|
|
994
|
+
* @description Parameters for card
|
|
1072
995
|
|
|
1073
|
-
|
|
1074
|
-
|
|
996
|
+
*/
|
|
997
|
+
|
|
998
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* @description Parameters for bank_account
|
|
1075
1002
|
|
|
1076
|
-
|
|
1003
|
+
*/
|
|
1004
|
+
|
|
1005
|
+
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,issuing_country?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* @description Parameters for payment_method
|
|
1077
1009
|
|
|
1078
1010
|
*/
|
|
1079
1011
|
|
|
1080
|
-
|
|
1012
|
+
payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
|
|
1081
1013
|
|
|
1082
1014
|
/**
|
|
1083
|
-
* @description
|
|
1015
|
+
* @description Parameters for payment_intent
|
|
1084
1016
|
|
|
1085
1017
|
*/
|
|
1086
1018
|
|
|
1087
|
-
|
|
1019
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card',reference_id?:string};
|
|
1088
1020
|
|
|
1089
1021
|
/**
|
|
1090
|
-
* @description
|
|
1022
|
+
* @description Parameters for billing_address
|
|
1091
1023
|
|
|
1092
1024
|
*/
|
|
1093
1025
|
|
|
1094
|
-
|
|
1026
|
+
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
1095
1027
|
|
|
1096
1028
|
/**
|
|
1097
|
-
* @description
|
|
1029
|
+
* @description Parameters for entity_identifiers
|
|
1098
1030
|
|
|
1099
1031
|
*/
|
|
1100
1032
|
|
|
1101
|
-
|
|
1033
|
+
entity_identifiers?:{id?:string,scheme?:string,standard?:string,value?:string}[];
|
|
1102
1034
|
}
|
|
1103
1035
|
export interface ListResponse {
|
|
1104
1036
|
/**
|
|
@@ -1118,123 +1050,119 @@ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billi
|
|
|
1118
1050
|
export interface ListInputParam {
|
|
1119
1051
|
[key : string]: any;
|
|
1120
1052
|
/**
|
|
1121
|
-
* @description
|
|
1053
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1122
1054
|
|
|
1123
1055
|
*/
|
|
1124
1056
|
|
|
1125
1057
|
limit?:number;
|
|
1126
1058
|
|
|
1127
1059
|
/**
|
|
1128
|
-
* @description
|
|
1060
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1129
1061
|
|
|
1130
1062
|
*/
|
|
1131
1063
|
|
|
1132
1064
|
offset?:string;
|
|
1133
1065
|
|
|
1134
1066
|
/**
|
|
1135
|
-
* @description
|
|
1067
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1136
1068
|
|
|
1137
1069
|
*/
|
|
1138
1070
|
|
|
1139
1071
|
include_deleted?:boolean;
|
|
1140
1072
|
|
|
1141
1073
|
/**
|
|
1142
|
-
* @description
|
|
1074
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1143
1075
|
|
|
1144
1076
|
*/
|
|
1145
1077
|
|
|
1146
1078
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1147
1079
|
|
|
1148
1080
|
/**
|
|
1149
|
-
* @description
|
|
1081
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1150
1082
|
|
|
1151
1083
|
*/
|
|
1152
1084
|
|
|
1153
1085
|
first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1154
1086
|
|
|
1155
1087
|
/**
|
|
1156
|
-
* @description
|
|
1088
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1157
1089
|
|
|
1158
1090
|
*/
|
|
1159
1091
|
|
|
1160
1092
|
last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1161
1093
|
|
|
1162
1094
|
/**
|
|
1163
|
-
* @description
|
|
1095
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1164
1096
|
|
|
1165
1097
|
*/
|
|
1166
1098
|
|
|
1167
1099
|
email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1168
1100
|
|
|
1169
1101
|
/**
|
|
1170
|
-
* @description
|
|
1102
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1171
1103
|
|
|
1172
1104
|
*/
|
|
1173
1105
|
|
|
1174
1106
|
company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1175
1107
|
|
|
1176
1108
|
/**
|
|
1177
|
-
* @description
|
|
1109
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1178
1110
|
|
|
1179
1111
|
*/
|
|
1180
1112
|
|
|
1181
1113
|
phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1182
1114
|
|
|
1183
1115
|
/**
|
|
1184
|
-
* @description
|
|
1116
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1185
1117
|
|
|
1186
1118
|
*/
|
|
1187
1119
|
|
|
1188
1120
|
auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string};
|
|
1189
1121
|
|
|
1190
1122
|
/**
|
|
1191
|
-
* @description
|
|
1123
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1192
1124
|
|
|
1193
1125
|
*/
|
|
1194
1126
|
|
|
1195
1127
|
taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string};
|
|
1196
1128
|
|
|
1197
1129
|
/**
|
|
1198
|
-
* @description
|
|
1130
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1199
1131
|
|
|
1200
1132
|
*/
|
|
1201
1133
|
|
|
1202
1134
|
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1203
1135
|
|
|
1204
1136
|
/**
|
|
1205
|
-
* @description
|
|
1137
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1206
1138
|
|
|
1207
1139
|
*/
|
|
1208
1140
|
|
|
1209
1141
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1210
1142
|
|
|
1211
1143
|
/**
|
|
1212
|
-
* @description
|
|
1213
|
-
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
1214
|
-
**Note**
|
|
1215
|
-
|
|
1216
|
-
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
1144
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1217
1145
|
|
|
1218
1146
|
*/
|
|
1219
1147
|
|
|
1220
1148
|
business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
1221
1149
|
|
|
1222
1150
|
/**
|
|
1223
|
-
* @description The
|
|
1151
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1224
1152
|
|
|
1225
1153
|
*/
|
|
1226
1154
|
|
|
1227
1155
|
offline_payment_method?:{in?:string,is?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',is_not?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',not_in?:string};
|
|
1228
1156
|
|
|
1229
1157
|
/**
|
|
1230
|
-
* @description
|
|
1158
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1231
1159
|
|
|
1232
1160
|
*/
|
|
1233
1161
|
|
|
1234
1162
|
auto_close_invoices?:{is?:'true' | 'false'};
|
|
1235
1163
|
|
|
1236
1164
|
/**
|
|
1237
|
-
* @description The
|
|
1165
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1238
1166
|
|
|
1239
1167
|
*/
|
|
1240
1168
|
|
|
@@ -1248,26 +1176,25 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
|
|
|
1248
1176
|
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
1249
1177
|
|
|
1250
1178
|
/**
|
|
1251
|
-
* @description
|
|
1179
|
+
* @description Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.
|
|
1252
1180
|
|
|
1253
1181
|
*/
|
|
1254
1182
|
|
|
1255
1183
|
relationship?:{invoice_owner_id?:{is?:string,is_not?:string,starts_with?:string},parent_id?:{is?:string,is_not?:string,starts_with?:string},payment_owner_id?:{is?:string,is_not?:string,starts_with?:string}};
|
|
1256
1184
|
}
|
|
1257
|
-
export interface
|
|
1185
|
+
export interface RetrieveResponse {
|
|
1258
1186
|
customer:Customer;
|
|
1259
1187
|
|
|
1260
1188
|
card?:Card;
|
|
1261
1189
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
* @description Id for the new customer. If not given, this will be auto-generated.
|
|
1266
|
-
|
|
1267
|
-
*/
|
|
1268
|
-
|
|
1269
|
-
id?:string;
|
|
1190
|
+
|
|
1191
|
+
export interface UpdateResponse {
|
|
1192
|
+
customer:Customer;
|
|
1270
1193
|
|
|
1194
|
+
card?:Card;
|
|
1195
|
+
}
|
|
1196
|
+
export interface UpdateInputParam {
|
|
1197
|
+
[key : string] : any;
|
|
1271
1198
|
/**
|
|
1272
1199
|
* @description First name of the customer.
|
|
1273
1200
|
|
|
@@ -1317,13 +1244,6 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
|
|
|
1317
1244
|
|
|
1318
1245
|
auto_collection?:AutoCollection;
|
|
1319
1246
|
|
|
1320
|
-
/**
|
|
1321
|
-
* @description The number of days within which the customer has to make payment for the invoice. .
|
|
1322
|
-
|
|
1323
|
-
*/
|
|
1324
|
-
|
|
1325
|
-
net_term_days?:number;
|
|
1326
|
-
|
|
1327
1247
|
/**
|
|
1328
1248
|
* @description Whether the customer can pay via Direct Debit.
|
|
1329
1249
|
|
|
@@ -1332,74 +1252,11 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
|
|
|
1332
1252
|
allow_direct_debit?:boolean;
|
|
1333
1253
|
|
|
1334
1254
|
/**
|
|
1335
|
-
* @description The
|
|
1336
|
-
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
1337
|
-
|
|
1338
|
-
*/
|
|
1339
|
-
|
|
1340
|
-
vat_number?:string;
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* @description An overridden value for the first two characters of the [full VAT
|
|
1344
|
-
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
1345
|
-
|
|
1346
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1347
|
-
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
1348
|
-
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
1349
|
-
|
|
1350
|
-
*/
|
|
1351
|
-
|
|
1352
|
-
vat_number_prefix?:string;
|
|
1353
|
-
|
|
1354
|
-
/**
|
|
1355
|
-
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
|
|
1356
|
-
**Tip:**
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1360
|
-
.
|
|
1361
|
-
|
|
1362
|
-
*/
|
|
1363
|
-
|
|
1364
|
-
entity_identifier_scheme?:string;
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* @description The standard used for specifying the `entity_identifier_scheme`. Currently only `iso6523-actorid-upis` is supported and is used by default when not provided.
|
|
1368
|
-
**Tip:**
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1372
|
-
.
|
|
1373
|
-
|
|
1374
|
-
*/
|
|
1375
|
-
|
|
1376
|
-
entity_identifier_standard?:string;
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* @description Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site.
|
|
1380
|
-
|
|
1381
|
-
*/
|
|
1382
|
-
|
|
1383
|
-
registered_for_gst?:boolean;
|
|
1384
|
-
|
|
1385
|
-
/**
|
|
1386
|
-
* @description Determines whether the customer is e-invoiced. When set to `true` or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`). When set to `false`, the customer is not e-invoiced even if e-invoicing is enabled for their country.
|
|
1387
|
-
**Tip:**
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
1391
|
-
.
|
|
1392
|
-
|
|
1393
|
-
*/
|
|
1394
|
-
|
|
1395
|
-
is_einvoice_enabled?:boolean;
|
|
1396
|
-
|
|
1397
|
-
/**
|
|
1398
|
-
* @description Determines whether to send an e-invoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level.
|
|
1255
|
+
* @description The number of days within which the customer has to make payment for the invoice. .
|
|
1399
1256
|
|
|
1400
1257
|
*/
|
|
1401
1258
|
|
|
1402
|
-
|
|
1259
|
+
net_term_days?:number;
|
|
1403
1260
|
|
|
1404
1261
|
/**
|
|
1405
1262
|
* @description Specifies if the customer is liable for tax. \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* exempt -
|
|
@@ -1420,7 +1277,7 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1420
1277
|
exemption_details?:any[];
|
|
1421
1278
|
|
|
1422
1279
|
/**
|
|
1423
|
-
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \*
|
|
1280
|
+
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \* industrial - When the purchase is made by an industrial business \* business - When the purchase is made at a place of business \* residential - When the purchase is made by a customer for home use
|
|
1424
1281
|
|
|
1425
1282
|
*/
|
|
1426
1283
|
|
|
@@ -1434,19 +1291,12 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1434
1291
|
client_profile_id?:string;
|
|
1435
1292
|
|
|
1436
1293
|
/**
|
|
1437
|
-
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \*
|
|
1294
|
+
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* government - Government \* other - Other \* wholesale - Whole-sale
|
|
1438
1295
|
|
|
1439
1296
|
*/
|
|
1440
1297
|
|
|
1441
1298
|
taxjar_exemption_category?:TaxjarExemptionCategory;
|
|
1442
1299
|
|
|
1443
|
-
/**
|
|
1444
|
-
* @description Confirms that a customer is a valid business without an EU/UK VAT number.
|
|
1445
|
-
|
|
1446
|
-
*/
|
|
1447
|
-
|
|
1448
|
-
business_customer_without_vat_number?:boolean;
|
|
1449
|
-
|
|
1450
1300
|
/**
|
|
1451
1301
|
* @description Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.
|
|
1452
1302
|
|
|
@@ -1455,7 +1305,7 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1455
1305
|
locale?:string;
|
|
1456
1306
|
|
|
1457
1307
|
/**
|
|
1458
|
-
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \*
|
|
1308
|
+
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax \* d - Foreign diplomat \* e - Charitable or benevolent organization \* f - Religious organization \* g - Resale \* a - Federal government \* b - State government \* c - Tribe/Status Indian/Indian Band \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident
|
|
1459
1309
|
|
|
1460
1310
|
*/
|
|
1461
1311
|
|
|
@@ -1469,18 +1319,18 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1469
1319
|
exempt_number?:string;
|
|
1470
1320
|
|
|
1471
1321
|
/**
|
|
1472
|
-
* @description
|
|
1322
|
+
* @description The preferred offline payment method for the customer. \* bank_transfer - Bank Transfer \* boleto - Boleto \* sepa_credit - SEPA Credit \* cash - Cash \* check - Check \* no_preference - No Preference \* ach_credit - ACH Credit
|
|
1473
1323
|
|
|
1474
1324
|
*/
|
|
1475
1325
|
|
|
1476
|
-
|
|
1326
|
+
offline_payment_method?:OfflinePaymentMethod;
|
|
1477
1327
|
|
|
1478
1328
|
/**
|
|
1479
|
-
* @description
|
|
1329
|
+
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
1480
1330
|
|
|
1481
1331
|
*/
|
|
1482
1332
|
|
|
1483
|
-
|
|
1333
|
+
invoice_notes?:string;
|
|
1484
1334
|
|
|
1485
1335
|
/**
|
|
1486
1336
|
* @description Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence.
|
|
@@ -1489,6 +1339,22 @@ To know more about what values you need to provide, refer to this [Avalara'
|
|
|
1489
1339
|
|
|
1490
1340
|
auto_close_invoices?:boolean;
|
|
1491
1341
|
|
|
1342
|
+
/**
|
|
1343
|
+
* @description A collection of key-value pairs that provides extra information about the customer.
|
|
1344
|
+
**Note:** There's a character limit of 65,535.
|
|
1345
|
+
[Learn more](advanced-features?prod_cat_ver=2#metadata).
|
|
1346
|
+
|
|
1347
|
+
*/
|
|
1348
|
+
|
|
1349
|
+
meta_data?:object;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* @description Indicates whether or not the customer has been identified as fraudulent. \* fraudulent - The customer has been marked as fraudulent \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe
|
|
1353
|
+
|
|
1354
|
+
*/
|
|
1355
|
+
|
|
1356
|
+
fraud_flag?:'safe' | 'fraudulent';
|
|
1357
|
+
|
|
1492
1358
|
/**
|
|
1493
1359
|
* @description Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled.
|
|
1494
1360
|
**Note:**
|
|
@@ -1499,87 +1365,118 @@ Any invoices raised when a subscription activates from `in_trial` or &
|
|
|
1499
1365
|
*/
|
|
1500
1366
|
|
|
1501
1367
|
consolidated_invoicing?:boolean;
|
|
1368
|
+
}
|
|
1369
|
+
export interface UpdatePaymentMethodResponse {
|
|
1370
|
+
customer:Customer;
|
|
1371
|
+
|
|
1372
|
+
card?:Card;
|
|
1373
|
+
}
|
|
1374
|
+
export interface UpdatePaymentMethodInputParam {
|
|
1502
1375
|
|
|
1503
1376
|
/**
|
|
1504
|
-
* @description
|
|
1377
|
+
* @description Parameters for payment_method
|
|
1505
1378
|
|
|
1506
1379
|
*/
|
|
1507
1380
|
|
|
1508
|
-
|
|
1381
|
+
payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
|
|
1382
|
+
}
|
|
1383
|
+
export interface UpdateBillingInfoResponse {
|
|
1384
|
+
customer:Customer;
|
|
1385
|
+
|
|
1386
|
+
card?:Card;
|
|
1387
|
+
}
|
|
1388
|
+
export interface UpdateBillingInfoInputParam {
|
|
1509
1389
|
|
|
1510
1390
|
/**
|
|
1511
|
-
* @description The
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
An alternative way of passing this parameter is by means of a [custom HTTP header](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).
|
|
1515
|
-
.
|
|
1391
|
+
* @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT
|
|
1392
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
1516
1393
|
|
|
1517
1394
|
*/
|
|
1518
1395
|
|
|
1519
|
-
|
|
1396
|
+
vat_number?:string;
|
|
1520
1397
|
|
|
1521
1398
|
/**
|
|
1522
|
-
* @description
|
|
1399
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
1400
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
1401
|
+
|
|
1402
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1403
|
+
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
1404
|
+
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
1523
1405
|
|
|
1524
1406
|
*/
|
|
1525
1407
|
|
|
1526
|
-
|
|
1408
|
+
vat_number_prefix?:string;
|
|
1527
1409
|
|
|
1528
1410
|
/**
|
|
1529
|
-
* @description
|
|
1411
|
+
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
|
|
1412
|
+
**Tip:**
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1416
|
+
.
|
|
1530
1417
|
|
|
1531
1418
|
*/
|
|
1532
1419
|
|
|
1533
|
-
|
|
1420
|
+
entity_identifier_scheme?:string;
|
|
1534
1421
|
|
|
1535
1422
|
/**
|
|
1536
|
-
* @description
|
|
1423
|
+
* @description The standard used for specifying the `entity_identifier_scheme`. Currently only `iso6523-actorid-upis` is supported and is used by default when not provided.
|
|
1424
|
+
**Tip:**
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1428
|
+
.
|
|
1537
1429
|
|
|
1538
1430
|
*/
|
|
1539
1431
|
|
|
1540
|
-
|
|
1432
|
+
entity_identifier_standard?:string;
|
|
1541
1433
|
|
|
1542
1434
|
/**
|
|
1543
|
-
* @description
|
|
1435
|
+
* @description Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site.
|
|
1544
1436
|
|
|
1545
1437
|
*/
|
|
1546
1438
|
|
|
1547
|
-
|
|
1439
|
+
registered_for_gst?:boolean;
|
|
1548
1440
|
|
|
1549
1441
|
/**
|
|
1550
|
-
* @description
|
|
1442
|
+
* @description Confirms that a customer is a valid business without an EU/UK VAT number.
|
|
1551
1443
|
|
|
1552
1444
|
*/
|
|
1553
1445
|
|
|
1554
|
-
|
|
1446
|
+
business_customer_without_vat_number?:boolean;
|
|
1555
1447
|
|
|
1556
1448
|
/**
|
|
1557
|
-
* @description
|
|
1449
|
+
* @description Determines whether the customer is e-invoiced. When set to `true` or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`). When set to `false`, the customer is not e-invoiced even if e-invoicing is enabled for their country.
|
|
1450
|
+
**Tip:**
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
1454
|
+
.
|
|
1558
1455
|
|
|
1559
1456
|
*/
|
|
1560
1457
|
|
|
1561
|
-
|
|
1458
|
+
is_einvoice_enabled?:boolean;
|
|
1562
1459
|
|
|
1563
1460
|
/**
|
|
1564
|
-
* @description
|
|
1461
|
+
* @description Determines whether to send einvoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level.
|
|
1565
1462
|
|
|
1566
1463
|
*/
|
|
1567
1464
|
|
|
1568
|
-
|
|
1569
|
-
}
|
|
1570
|
-
export interface AddContactResponse {
|
|
1571
|
-
customer:Customer;
|
|
1465
|
+
einvoicing_method?:EinvoicingMethod;
|
|
1572
1466
|
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1467
|
+
/**
|
|
1468
|
+
* @description Parameters for billing_address
|
|
1469
|
+
|
|
1470
|
+
*/
|
|
1471
|
+
|
|
1472
|
+
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
1576
1473
|
|
|
1577
1474
|
/**
|
|
1578
|
-
* @description Parameters for
|
|
1475
|
+
* @description Parameters for entity_identifiers
|
|
1579
1476
|
|
|
1580
1477
|
*/
|
|
1581
1478
|
|
|
1582
|
-
|
|
1479
|
+
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
1583
1480
|
}
|
|
1584
1481
|
export interface ContactsForCustomerResponse {
|
|
1585
1482
|
/**
|
|
@@ -1599,41 +1496,102 @@ An alternative way of passing this parameter is by means of a [custom HTTP heade
|
|
|
1599
1496
|
export interface ContactsForCustomerInputParam {
|
|
1600
1497
|
[key : string]: any;
|
|
1601
1498
|
/**
|
|
1602
|
-
* @description
|
|
1499
|
+
* @description This API retrieves all the contacts for a customer.
|
|
1603
1500
|
|
|
1604
1501
|
*/
|
|
1605
1502
|
|
|
1606
1503
|
limit?:number;
|
|
1607
1504
|
|
|
1608
1505
|
/**
|
|
1609
|
-
* @description
|
|
1506
|
+
* @description This API retrieves all the contacts for a customer.
|
|
1610
1507
|
|
|
1611
1508
|
*/
|
|
1612
1509
|
|
|
1613
1510
|
offset?:string;
|
|
1614
1511
|
}
|
|
1615
|
-
export interface
|
|
1512
|
+
export interface AssignPaymentRoleResponse {
|
|
1616
1513
|
customer:Customer;
|
|
1514
|
+
|
|
1515
|
+
payment_source:PaymentSource;
|
|
1617
1516
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1517
|
+
export interface AssignPaymentRoleInputParam {
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* @description Payment source id this role will be assigned to.
|
|
1521
|
+
|
|
1522
|
+
*/
|
|
1523
|
+
|
|
1524
|
+
payment_source_id:string;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* @description Indicates whether the payment source is Primary, Backup, or neither. \* backup - Backup \* none - None \* primary - Primary
|
|
1528
|
+
|
|
1529
|
+
*/
|
|
1530
|
+
|
|
1531
|
+
role:Role;
|
|
1532
|
+
}
|
|
1533
|
+
export interface AddContactResponse {
|
|
1620
1534
|
customer:Customer;
|
|
1535
|
+
|
|
1536
|
+
card?:Card;
|
|
1621
1537
|
}
|
|
1622
|
-
export interface
|
|
1538
|
+
export interface AddContactInputParam {
|
|
1623
1539
|
|
|
1624
1540
|
/**
|
|
1625
|
-
* @description
|
|
1541
|
+
* @description Parameters for contact
|
|
1626
1542
|
|
|
1627
1543
|
*/
|
|
1628
1544
|
|
|
1629
|
-
|
|
1545
|
+
contact?:{email:string,enabled?:boolean,first_name?:string,id?:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
|
|
1546
|
+
}
|
|
1547
|
+
export interface UpdateContactResponse {
|
|
1548
|
+
customer:Customer;
|
|
1549
|
+
|
|
1550
|
+
card?:Card;
|
|
1551
|
+
}
|
|
1552
|
+
export interface UpdateContactInputParam {
|
|
1630
1553
|
|
|
1631
1554
|
/**
|
|
1632
|
-
* @description
|
|
1555
|
+
* @description Parameters for contact
|
|
1633
1556
|
|
|
1634
1557
|
*/
|
|
1635
1558
|
|
|
1636
|
-
|
|
1559
|
+
contact?:{email?:string,enabled?:boolean,first_name?:string,id:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
|
|
1560
|
+
}
|
|
1561
|
+
export interface DeleteContactResponse {
|
|
1562
|
+
customer:Customer;
|
|
1563
|
+
|
|
1564
|
+
card?:Card;
|
|
1565
|
+
}
|
|
1566
|
+
export interface DeleteContactInputParam {
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* @description Parameters for contact
|
|
1570
|
+
|
|
1571
|
+
*/
|
|
1572
|
+
|
|
1573
|
+
contact?:{id:string};
|
|
1574
|
+
}
|
|
1575
|
+
export interface RecordExcessPaymentResponse {
|
|
1576
|
+
customer:Customer;
|
|
1577
|
+
|
|
1578
|
+
transaction:Transaction;
|
|
1579
|
+
}
|
|
1580
|
+
export interface RecordExcessPaymentInputParam {
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* @description Remarks, if any, on the payment.
|
|
1584
|
+
|
|
1585
|
+
*/
|
|
1586
|
+
|
|
1587
|
+
comment?:string;
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* @description Parameters for transaction
|
|
1591
|
+
|
|
1592
|
+
*/
|
|
1593
|
+
|
|
1594
|
+
transaction?:{amount:number,currency_code?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
1637
1595
|
}
|
|
1638
1596
|
export interface CollectPaymentResponse {
|
|
1639
1597
|
customer:Customer;
|
|
@@ -1678,7 +1636,7 @@ An alternative way of passing this parameter is by means of a [custom HTTP heade
|
|
|
1678
1636
|
retain_payment_source?:boolean;
|
|
1679
1637
|
|
|
1680
1638
|
/**
|
|
1681
|
-
* @description
|
|
1639
|
+
* @description The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant
|
|
1682
1640
|
|
|
1683
1641
|
*/
|
|
1684
1642
|
|
|
@@ -1703,7 +1661,7 @@ An alternative way of passing this parameter is by means of a [custom HTTP heade
|
|
|
1703
1661
|
|
|
1704
1662
|
*/
|
|
1705
1663
|
|
|
1706
|
-
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
1664
|
+
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card',reference_id?:string};
|
|
1707
1665
|
|
|
1708
1666
|
/**
|
|
1709
1667
|
* @description Parameters for invoice_allocations
|
|
@@ -1712,168 +1670,210 @@ An alternative way of passing this parameter is by means of a [custom HTTP heade
|
|
|
1712
1670
|
|
|
1713
1671
|
invoice_allocations?:{allocation_amount?:number,invoice_id:string}[];
|
|
1714
1672
|
}
|
|
1715
|
-
export interface
|
|
1673
|
+
export interface DeleteResponse {
|
|
1716
1674
|
customer:Customer;
|
|
1717
1675
|
|
|
1718
|
-
|
|
1676
|
+
card?:Card;
|
|
1719
1677
|
}
|
|
1720
|
-
export interface
|
|
1678
|
+
export interface DeleteInputParam {
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* @description Deletes the Payment Method from the gateway/vault.
|
|
1682
|
+
|
|
1683
|
+
*/
|
|
1684
|
+
|
|
1685
|
+
delete_payment_method?:boolean;
|
|
1686
|
+
}
|
|
1687
|
+
export interface MoveResponse {
|
|
1688
|
+
resource_migration:ResourceMigration;
|
|
1689
|
+
}
|
|
1690
|
+
export interface MoveInputParam {
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* @description Id of the customer to be copied.
|
|
1694
|
+
|
|
1695
|
+
*/
|
|
1696
|
+
|
|
1697
|
+
id_at_from_site:string;
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* @description Name of the site from which this customer need to be copied.
|
|
1701
|
+
|
|
1702
|
+
*/
|
|
1703
|
+
|
|
1704
|
+
from_site:string;
|
|
1705
|
+
}
|
|
1706
|
+
export interface ChangeBillingDateResponse {
|
|
1707
|
+
customer:Customer;
|
|
1708
|
+
}
|
|
1709
|
+
export interface ChangeBillingDateInputParam {
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the monthly and yearly subscriptions of this customer will be aligned to this date.
|
|
1713
|
+
|
|
1714
|
+
*/
|
|
1715
|
+
|
|
1716
|
+
billing_date?:number;
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* @description `billing_month`, together with `billing_date`, specify, for this customer, the day of the year when the renewals of all the year-based subscriptions take place.
|
|
1720
|
+
|
|
1721
|
+
For example, the renewals happen on 15th July when `billing_month` is `7` and `billing_date` is `15`.
|
|
1722
|
+
**Note**
|
|
1723
|
+
|
|
1724
|
+
Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.html) (with customer-specific billing date support) is enabled and `billing_date_mode` is `manually_set`.
|
|
1725
|
+
|
|
1726
|
+
*/
|
|
1727
|
+
|
|
1728
|
+
billing_month?:number;
|
|
1721
1729
|
|
|
1722
1730
|
/**
|
|
1723
|
-
* @description
|
|
1731
|
+
* @description Indicates whether this customer's *billing_date* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_date* will not be reset even when all of the monthly/yearly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured.
|
|
1724
1732
|
|
|
1725
1733
|
*/
|
|
1726
1734
|
|
|
1727
|
-
|
|
1735
|
+
billing_date_mode?:BillingDateMode;
|
|
1728
1736
|
|
|
1729
1737
|
/**
|
|
1730
|
-
* @description
|
|
1738
|
+
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the weekly subscriptions of this customer will be aligned to this week day. \* sunday - Sunday \* wednesday - Wednesday \* tuesday - Tuesday \* monday - Monday \* saturday - Saturday \* friday - Friday \* thursday - Thursday
|
|
1731
1739
|
|
|
1732
1740
|
*/
|
|
1733
1741
|
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1736
|
-
export interface UpdateContactResponse {
|
|
1737
|
-
customer:Customer;
|
|
1738
|
-
|
|
1739
|
-
card?:Card;
|
|
1740
|
-
}
|
|
1741
|
-
export interface UpdateContactInputParam {
|
|
1742
|
+
billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
|
|
1742
1743
|
|
|
1743
1744
|
/**
|
|
1744
|
-
* @description
|
|
1745
|
+
* @description Indicates whether this customer's *billing_day_of_week* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week* will not be reset even when all of the weekly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured.
|
|
1745
1746
|
|
|
1746
1747
|
*/
|
|
1747
1748
|
|
|
1748
|
-
|
|
1749
|
+
billing_day_of_week_mode?:BillingDayOfWeekMode;
|
|
1749
1750
|
}
|
|
1750
|
-
export interface
|
|
1751
|
+
export interface MergeResponse {
|
|
1751
1752
|
customer:Customer;
|
|
1752
1753
|
}
|
|
1753
|
-
export interface
|
|
1754
|
-
|
|
1755
|
-
/**
|
|
1756
|
-
* @description Determines whether the site default settings are applied for the access levels.
|
|
1757
|
-
|
|
1758
|
-
* Value set to `true`: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
|
|
1759
|
-
* Value set to `false`: Changes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the new settings. If you skip passing any parameters, they will remain unchanged.
|
|
1760
|
-
.
|
|
1761
|
-
|
|
1762
|
-
*/
|
|
1763
|
-
|
|
1764
|
-
use_default_hierarchy_settings?:boolean;
|
|
1754
|
+
export interface MergeInputParam {
|
|
1765
1755
|
|
|
1766
1756
|
/**
|
|
1767
|
-
* @description
|
|
1757
|
+
* @description From customer id.
|
|
1768
1758
|
|
|
1769
1759
|
*/
|
|
1770
1760
|
|
|
1771
|
-
|
|
1761
|
+
from_customer_id:string;
|
|
1772
1762
|
|
|
1773
1763
|
/**
|
|
1774
|
-
* @description
|
|
1764
|
+
* @description To customer id.
|
|
1775
1765
|
|
|
1776
1766
|
*/
|
|
1777
1767
|
|
|
1778
|
-
|
|
1768
|
+
to_customer_id:string;
|
|
1779
1769
|
}
|
|
1780
|
-
export interface
|
|
1770
|
+
export interface ClearPersonalDataResponse {
|
|
1781
1771
|
customer:Customer;
|
|
1782
|
-
|
|
1783
|
-
card?:Card;
|
|
1784
1772
|
}
|
|
1785
|
-
|
|
1773
|
+
|
|
1774
|
+
export interface RelationshipsResponse {
|
|
1775
|
+
customer:Customer;
|
|
1776
|
+
}
|
|
1777
|
+
export interface RelationshipsInputParam {
|
|
1786
1778
|
|
|
1787
1779
|
/**
|
|
1788
|
-
* @description The
|
|
1789
|
-
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
1780
|
+
* @description The `id` of the customer which is to be set as the immediate parent.
|
|
1790
1781
|
|
|
1791
1782
|
*/
|
|
1792
1783
|
|
|
1793
|
-
|
|
1784
|
+
parent_id?:string;
|
|
1794
1785
|
|
|
1795
1786
|
/**
|
|
1796
|
-
* @description
|
|
1797
|
-
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
1798
|
-
|
|
1799
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1800
|
-
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
1801
|
-
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
1787
|
+
* @description The `id` of the customer who will pay the invoices for this customer. Can be the child itself or the `invoice_owner_id`.
|
|
1802
1788
|
|
|
1803
1789
|
*/
|
|
1804
1790
|
|
|
1805
|
-
|
|
1791
|
+
payment_owner_id?:string;
|
|
1806
1792
|
|
|
1807
1793
|
/**
|
|
1808
|
-
* @description The
|
|
1809
|
-
**Tip:**
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1813
|
-
.
|
|
1794
|
+
* @description The `id` of the customer who will be invoiced for charges incurred. Can be the child itself or any parent in its hierarchy.
|
|
1814
1795
|
|
|
1815
1796
|
*/
|
|
1816
1797
|
|
|
1817
|
-
|
|
1798
|
+
invoice_owner_id?:string;
|
|
1818
1799
|
|
|
1819
1800
|
/**
|
|
1820
|
-
* @description The
|
|
1821
|
-
|
|
1801
|
+
* @description The level of access that the parent and the child itself have to the child's information can be set here. This data falls into two categories:
|
|
1802
|
+
|
|
1803
|
+
* **Self-Serve Portal data:** subscriptions and invoices of the child.
|
|
1804
|
+
* **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
|
|
1822
1805
|
|
|
1823
1806
|
|
|
1824
|
-
|
|
1807
|
+
|
|
1808
|
+
**Usage:**
|
|
1809
|
+
|
|
1810
|
+
* Value set to `true`: Applies the global access levels defined in the Account Hierarchy settings to this child. These global settings are configured in the admin console
|
|
1811
|
+
* Value set to `false`: Customizes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the settings. If you skip passing any parameters, the global settings are applied for them.
|
|
1825
1812
|
.
|
|
1826
1813
|
|
|
1827
1814
|
*/
|
|
1828
1815
|
|
|
1829
|
-
|
|
1816
|
+
use_default_hierarchy_settings?:boolean;
|
|
1830
1817
|
|
|
1831
1818
|
/**
|
|
1832
|
-
* @description
|
|
1819
|
+
* @description Parameters for parent_account_access
|
|
1833
1820
|
|
|
1834
1821
|
*/
|
|
1835
1822
|
|
|
1836
|
-
|
|
1823
|
+
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1837
1824
|
|
|
1838
1825
|
/**
|
|
1839
|
-
* @description
|
|
1826
|
+
* @description Parameters for child_account_access
|
|
1840
1827
|
|
|
1841
1828
|
*/
|
|
1842
1829
|
|
|
1843
|
-
|
|
1830
|
+
child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1831
|
+
}
|
|
1832
|
+
export interface DeleteRelationshipResponse {
|
|
1833
|
+
customer:Customer;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
export interface HierarchyResponse {
|
|
1837
|
+
hierarchies:Hierarchy[];
|
|
1838
|
+
}
|
|
1839
|
+
export interface HierarchyInputParam {
|
|
1844
1840
|
|
|
1845
1841
|
/**
|
|
1846
|
-
* @description
|
|
1847
|
-
**Tip:**
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
1851
|
-
.
|
|
1842
|
+
* @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
|
|
1852
1843
|
|
|
1853
1844
|
*/
|
|
1854
|
-
|
|
1855
|
-
|
|
1845
|
+
|
|
1846
|
+
hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
|
|
1847
|
+
}
|
|
1848
|
+
export interface UpdateHierarchySettingsResponse {
|
|
1849
|
+
customer:Customer;
|
|
1850
|
+
}
|
|
1851
|
+
export interface UpdateHierarchySettingsInputParam {
|
|
1856
1852
|
|
|
1857
1853
|
/**
|
|
1858
|
-
* @description Determines whether
|
|
1854
|
+
* @description Determines whether the site default settings are applied for the access levels.
|
|
1855
|
+
|
|
1856
|
+
* Value set to `true`: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
|
|
1857
|
+
* Value set to `false`: Changes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the new settings. If you skip passing any parameters, they will remain unchanged.
|
|
1858
|
+
.
|
|
1859
1859
|
|
|
1860
1860
|
*/
|
|
1861
1861
|
|
|
1862
|
-
|
|
1862
|
+
use_default_hierarchy_settings?:boolean;
|
|
1863
1863
|
|
|
1864
1864
|
/**
|
|
1865
|
-
* @description Parameters for
|
|
1865
|
+
* @description Parameters for parent_account_access
|
|
1866
1866
|
|
|
1867
1867
|
*/
|
|
1868
1868
|
|
|
1869
|
-
|
|
1869
|
+
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1870
1870
|
|
|
1871
1871
|
/**
|
|
1872
|
-
* @description Parameters for
|
|
1872
|
+
* @description Parameters for child_account_access
|
|
1873
1873
|
|
|
1874
1874
|
*/
|
|
1875
1875
|
|
|
1876
|
-
|
|
1876
|
+
child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1877
1877
|
}
|
|
1878
1878
|
export interface BillingAddress {
|
|
1879
1879
|
/**
|
|
@@ -1982,40 +1982,125 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
1982
1982
|
validation_status?:ValidationStatus;
|
|
1983
1983
|
}
|
|
1984
1984
|
export interface ReferralUrl {
|
|
1985
|
+
/**
|
|
1986
|
+
* @description External customer id in the referral system
|
|
1987
|
+
|
|
1988
|
+
*/
|
|
1989
|
+
|
|
1985
1990
|
external_customer_id?:string;
|
|
1986
1991
|
|
|
1987
|
-
|
|
1992
|
+
/**
|
|
1993
|
+
* @description Referral sharing url for the customer
|
|
1994
|
+
|
|
1995
|
+
*/
|
|
1996
|
+
|
|
1997
|
+
referral_sharing_url:string;
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* @description The referral url creation time
|
|
2001
|
+
|
|
2002
|
+
*/
|
|
2003
|
+
|
|
2004
|
+
created_at:number;
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* @description The referral url updation time
|
|
2008
|
+
|
|
2009
|
+
*/
|
|
2010
|
+
|
|
2011
|
+
updated_at:number;
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* @description Referral campaign id
|
|
2015
|
+
|
|
2016
|
+
*/
|
|
1988
2017
|
|
|
1989
|
-
|
|
2018
|
+
referral_campaign_id:string;
|
|
1990
2019
|
|
|
1991
|
-
|
|
2020
|
+
/**
|
|
2021
|
+
* @description Referral account id
|
|
2022
|
+
|
|
2023
|
+
*/
|
|
1992
2024
|
|
|
1993
|
-
|
|
2025
|
+
referral_account_id:string;
|
|
1994
2026
|
|
|
1995
|
-
|
|
2027
|
+
/**
|
|
2028
|
+
* @description Referral external campaign id
|
|
2029
|
+
|
|
2030
|
+
*/
|
|
1996
2031
|
|
|
1997
2032
|
referral_external_campaign_id?:string;
|
|
1998
2033
|
|
|
1999
|
-
|
|
2034
|
+
/**
|
|
2035
|
+
* @description Url for the referral system account \* referral_saasquatch - Referral Saasquatch \* friendbuy - Friendbuy \* referral_candy - Referral Candy
|
|
2036
|
+
|
|
2037
|
+
*/
|
|
2038
|
+
|
|
2039
|
+
referral_system:'referral_candy' | 'friendbuy' | 'referral_saasquatch';
|
|
2000
2040
|
}
|
|
2001
2041
|
export interface Contact {
|
|
2002
|
-
|
|
2042
|
+
/**
|
|
2043
|
+
* @description Unique reference ID provided for the contact.
|
|
2044
|
+
|
|
2045
|
+
*/
|
|
2046
|
+
|
|
2047
|
+
id:string;
|
|
2048
|
+
|
|
2049
|
+
/**
|
|
2050
|
+
* @description First name of the contact.
|
|
2051
|
+
|
|
2052
|
+
*/
|
|
2003
2053
|
|
|
2004
2054
|
first_name?:string;
|
|
2005
2055
|
|
|
2056
|
+
/**
|
|
2057
|
+
* @description Last name of the contact.
|
|
2058
|
+
|
|
2059
|
+
*/
|
|
2060
|
+
|
|
2006
2061
|
last_name?:string;
|
|
2007
2062
|
|
|
2008
|
-
|
|
2063
|
+
/**
|
|
2064
|
+
* @description Email of the contact.
|
|
2065
|
+
|
|
2066
|
+
*/
|
|
2067
|
+
|
|
2068
|
+
email:string;
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* @description Phone number of the contact.
|
|
2072
|
+
|
|
2073
|
+
*/
|
|
2009
2074
|
|
|
2010
2075
|
phone?:string;
|
|
2011
2076
|
|
|
2077
|
+
/**
|
|
2078
|
+
* @description Label/Tag provided for contact.
|
|
2079
|
+
|
|
2080
|
+
*/
|
|
2081
|
+
|
|
2012
2082
|
label?:string;
|
|
2013
2083
|
|
|
2014
|
-
|
|
2084
|
+
/**
|
|
2085
|
+
* @description Contact enabled / disabled
|
|
2086
|
+
|
|
2087
|
+
*/
|
|
2088
|
+
|
|
2089
|
+
enabled:boolean;
|
|
2015
2090
|
|
|
2016
|
-
|
|
2091
|
+
/**
|
|
2092
|
+
* @description Whether Account Emails option is enabled for the contact.
|
|
2093
|
+
|
|
2094
|
+
*/
|
|
2095
|
+
|
|
2096
|
+
send_account_email:boolean;
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* @description Whether Billing Emails option is enabled for the contact.
|
|
2100
|
+
|
|
2101
|
+
*/
|
|
2017
2102
|
|
|
2018
|
-
send_billing_email
|
|
2103
|
+
send_billing_email:boolean;
|
|
2019
2104
|
}
|
|
2020
2105
|
export interface PaymentMethod {
|
|
2021
2106
|
/**
|
|
@@ -2023,14 +2108,14 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2023
2108
|
|
|
2024
2109
|
*/
|
|
2025
2110
|
|
|
2026
|
-
type
|
|
2111
|
+
type:Type;
|
|
2027
2112
|
|
|
2028
2113
|
/**
|
|
2029
2114
|
* @description Name of the gateway the payment method is associated with. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* sage_pay - Sage Pay is a payment gateway. \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* migs - MasterCard Internet Gateway Service payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* adyen - Adyen is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* chargebee_payments - Chargebee Payments gateway \* bluepay - BluePay is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* bank_of_america - Bank of America is a payment gateway. \* paypal_pro - PayPal Pro Account is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* moneris_us - Moneris USA is a payment gateway. \* exact - Exact Payments is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* tco - 2Checkout is a payment gateway. \* chargebee - Chargebee test gateway. \* stripe - Stripe is a payment gateway. \* eway - eWAY Account is a payment gateway. \* authorize_net - Authorize.net is a payment gateway \* moneris - Moneris is a payment gateway. \* worldpay - WorldPay is a payment gateway \* pin - Pin is a payment gateway \* gocardless - GoCardless is a payment service provider. \* elavon - Elavon Virtual Merchant is a payment solution. \* cybersource - CyberSource is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* global_payments - Global Payments is a payment service provider. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* checkout_com - Checkout.com is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* mollie - Mollie is a payment gateway. \* bluesnap - BlueSnap is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* hdfc - HDFC Account is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ingenico_direct - Worldline Online Payments is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US.
|
|
2030
2115
|
|
|
2031
2116
|
*/
|
|
2032
2117
|
|
|
2033
|
-
gateway
|
|
2118
|
+
gateway:Gateway;
|
|
2034
2119
|
|
|
2035
2120
|
/**
|
|
2036
2121
|
* @description The gateway account this payment method is stored with.
|
|
@@ -2044,7 +2129,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2044
2129
|
|
|
2045
2130
|
*/
|
|
2046
2131
|
|
|
2047
|
-
status
|
|
2132
|
+
status:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
2048
2133
|
|
|
2049
2134
|
/**
|
|
2050
2135
|
* @description The reference id. In the case of Amazon and PayPal this will be the 'billing agreement id'. For GoCardless direct debit this will be 'mandate id'. In the case of card payments this will be the identifier provided by the gateway/card vault for the specific payment method resource.
|
|
@@ -2052,25 +2137,82 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2052
2137
|
|
|
2053
2138
|
*/
|
|
2054
2139
|
|
|
2055
|
-
reference_id
|
|
2140
|
+
reference_id:string;
|
|
2056
2141
|
}
|
|
2057
2142
|
export interface CustomerBalance {
|
|
2058
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* @description Promotional credits balance of this customer.
|
|
2145
|
+
|
|
2146
|
+
*/
|
|
2147
|
+
|
|
2148
|
+
promotional_credits:number;
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* @description Total unused payments associated with the customer.
|
|
2152
|
+
|
|
2153
|
+
*/
|
|
2059
2154
|
|
|
2060
|
-
excess_payments
|
|
2155
|
+
excess_payments:number;
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* @description Refundable credits balance of this customer
|
|
2159
|
+
|
|
2160
|
+
*/
|
|
2161
|
+
|
|
2162
|
+
refundable_credits:number;
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* @description Total unbilled charges for this customer.
|
|
2166
|
+
|
|
2167
|
+
*/
|
|
2061
2168
|
|
|
2062
|
-
|
|
2169
|
+
unbilled_charges:number;
|
|
2063
2170
|
|
|
2064
|
-
|
|
2171
|
+
/**
|
|
2172
|
+
* @description The currency code (ISO 4217 format) for balance
|
|
2173
|
+
|
|
2174
|
+
*/
|
|
2065
2175
|
|
|
2066
|
-
currency_code
|
|
2176
|
+
currency_code:string;
|
|
2067
2177
|
}
|
|
2068
2178
|
export interface EntityIdentifier {
|
|
2069
|
-
|
|
2179
|
+
/**
|
|
2180
|
+
* @description The unique id for the `entity_identifier` in Chargebee. When not provided, it is autogenerated.
|
|
2181
|
+
|
|
2182
|
+
*/
|
|
2183
|
+
|
|
2184
|
+
id:string;
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* @description The value of the `entity_identifier`. This identifies the customer entity on the Peppol network. For example: `10101010-STO-10`.
|
|
2188
|
+
**Tip:**
|
|
2189
|
+
|
|
2190
|
+
|
|
2191
|
+
If there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).
|
|
2192
|
+
|
|
2193
|
+
*/
|
|
2070
2194
|
|
|
2071
2195
|
value?:string;
|
|
2072
2196
|
|
|
2073
|
-
|
|
2197
|
+
/**
|
|
2198
|
+
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
|
|
2199
|
+
**Tip:**
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
If there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).
|
|
2203
|
+
|
|
2204
|
+
*/
|
|
2205
|
+
|
|
2206
|
+
scheme:string;
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* @description The standard used for specifying the `entity_identifier` `scheme`. Currently, only `iso6523-actorid-upis` is supported and is used by default when not provided.
|
|
2210
|
+
**Tip:**
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
If there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).
|
|
2214
|
+
|
|
2215
|
+
*/
|
|
2074
2216
|
|
|
2075
2217
|
standard?:string;
|
|
2076
2218
|
}
|
|
@@ -2087,14 +2229,14 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2087
2229
|
|
|
2088
2230
|
*/
|
|
2089
2231
|
|
|
2090
|
-
payment_owner_id
|
|
2232
|
+
payment_owner_id:string;
|
|
2091
2233
|
|
|
2092
2234
|
/**
|
|
2093
2235
|
* @description The `id` of the customer who is invoiced for charges incurred. Can be the customer itself or any parent in its hierarchy.
|
|
2094
2236
|
|
|
2095
2237
|
*/
|
|
2096
2238
|
|
|
2097
|
-
invoice_owner_id
|
|
2239
|
+
invoice_owner_id:string;
|
|
2098
2240
|
}
|
|
2099
2241
|
export interface ParentAccountAccess {
|
|
2100
2242
|
/**
|
|
@@ -2116,21 +2258,21 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2116
2258
|
|
|
2117
2259
|
*/
|
|
2118
2260
|
|
|
2119
|
-
send_subscription_emails
|
|
2261
|
+
send_subscription_emails:boolean;
|
|
2120
2262
|
|
|
2121
2263
|
/**
|
|
2122
2264
|
* @description If `true`, the parent account will receive invoice-related emails sent to the child account.
|
|
2123
2265
|
|
|
2124
2266
|
*/
|
|
2125
2267
|
|
|
2126
|
-
send_invoice_emails
|
|
2268
|
+
send_invoice_emails:boolean;
|
|
2127
2269
|
|
|
2128
2270
|
/**
|
|
2129
2271
|
* @description If `true`, the parent account will receive payment-related emails sent to the child account.
|
|
2130
2272
|
|
|
2131
2273
|
*/
|
|
2132
2274
|
|
|
2133
|
-
send_payment_emails
|
|
2275
|
+
send_payment_emails:boolean;
|
|
2134
2276
|
}
|
|
2135
2277
|
export interface ChildAccountAccess {
|
|
2136
2278
|
/**
|
|
@@ -2152,21 +2294,21 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
2152
2294
|
|
|
2153
2295
|
*/
|
|
2154
2296
|
|
|
2155
|
-
send_subscription_emails
|
|
2297
|
+
send_subscription_emails:boolean;
|
|
2156
2298
|
|
|
2157
2299
|
/**
|
|
2158
2300
|
* @description If `true`, the child account will receive invoice-related emails for its own invoices.
|
|
2159
2301
|
|
|
2160
2302
|
*/
|
|
2161
2303
|
|
|
2162
|
-
send_invoice_emails
|
|
2304
|
+
send_invoice_emails:boolean;
|
|
2163
2305
|
|
|
2164
2306
|
/**
|
|
2165
2307
|
* @description If `true`, the child account will receive payment-related emails for its own invoices.
|
|
2166
2308
|
|
|
2167
2309
|
*/
|
|
2168
2310
|
|
|
2169
|
-
send_payment_emails
|
|
2311
|
+
send_payment_emails:boolean;
|
|
2170
2312
|
}
|
|
2171
2313
|
}
|
|
2172
2314
|
}
|