chargebee 2.28.0 → 2.30.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.
Files changed (54) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +6 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  5. package/.github/workflows/greeting.yml +47 -0
  6. package/CHANGELOG.md +59 -0
  7. package/SECURITY.md +8 -0
  8. package/lib/chargebee.js +1 -1
  9. package/lib/resources/api_endpoints.js +0 -14
  10. package/package.json +1 -1
  11. package/types/core.d.ts +4 -4
  12. package/types/resources/AttachedItem.d.ts +88 -88
  13. package/types/resources/Card.d.ts +68 -68
  14. package/types/resources/Comment.d.ts +50 -44
  15. package/types/resources/Coupon.d.ts +242 -207
  16. package/types/resources/CouponSet.d.ts +72 -68
  17. package/types/resources/CreditNote.d.ts +612 -236
  18. package/types/resources/Customer.d.ts +655 -513
  19. package/types/resources/DifferentialPrice.d.ts +99 -74
  20. package/types/resources/EntitlementOverride.d.ts +27 -12
  21. package/types/resources/Estimate.d.ts +450 -450
  22. package/types/resources/Event.d.ts +30 -12
  23. package/types/resources/Export.d.ts +200 -200
  24. package/types/resources/Feature.d.ts +66 -35
  25. package/types/resources/Gift.d.ts +54 -44
  26. package/types/resources/HostedPage.d.ts +381 -381
  27. package/types/resources/InAppSubscription.d.ts +94 -90
  28. package/types/resources/Invoice.d.ts +1242 -660
  29. package/types/resources/Item.d.ts +148 -142
  30. package/types/resources/ItemEntitlement.d.ts +36 -36
  31. package/types/resources/ItemFamily.d.ts +45 -45
  32. package/types/resources/ItemPrice.d.ts +317 -273
  33. package/types/resources/PaymentIntent.d.ts +60 -60
  34. package/types/resources/PaymentReferenceNumber.d.ts +1 -1
  35. package/types/resources/PaymentVoucher.d.ts +74 -59
  36. package/types/resources/PortalSession.d.ts +45 -20
  37. package/types/resources/PromotionalCredit.d.ts +68 -68
  38. package/types/resources/Purchase.d.ts +3 -3
  39. package/types/resources/Quote.d.ts +655 -366
  40. package/types/resources/QuoteLineGroup.d.ts +245 -0
  41. package/types/resources/QuotedCharge.d.ts +170 -0
  42. package/types/resources/QuotedSubscription.d.ts +219 -0
  43. package/types/resources/SiteMigrationDetail.d.ts +7 -7
  44. package/types/resources/Subscription.d.ts +1219 -932
  45. package/types/resources/SubscriptionEntitlement.d.ts +33 -12
  46. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
  47. package/types/resources/TimeMachine.d.ts +15 -15
  48. package/types/resources/Token.d.ts +0 -116
  49. package/types/resources/Transaction.d.ts +229 -112
  50. package/types/resources/UnbilledCharge.d.ts +112 -67
  51. package/types/resources/Usage.d.ts +46 -47
  52. package/types/resources/VirtualBankAccount.d.ts +66 -66
  53. package/types/resources/Media.d.ts +0 -33
  54. package/types/resources/NonSubscription.d.ts +0 -65
@@ -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 Deletes a particular customer identified by the a unique identifier.
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 &#x60;customer_id&#x60; 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
- * In the descriptions for &#x60;use_default_hierarchy_settings&#x60;, &#x60;parent_account_access&#x60;, and &#x60;child_account_access&#x60; parameters, the &quot;parent&quot; is the customer whose ID is [payment_owner_id](/docs/api/customers?prod_cat_ver&#x3D;2#link_a_customer_payment_owner_id). However, if the &#x60;payment_owner_id&#x60; is set as the ID of the child itself (&#x60;{customer_id}&#x60;), then the &quot;parent&quot; is [parent_id](/docs/api/customers?prod_cat_ver&#x3D;2#link_a_customer_parent_id).
492
- * The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver&#x3D;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. &#x60;customer_id&#x60; is the [id](/docs/api/customers#customer_id) of the child.
487
+ Here&#x27;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
- delete_relationship(customer_id:string):ChargebeeRequest<DeleteRelationshipResponse>;
504
-
505
- /**
506
- * @description Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter.
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&#x27;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 &#x60;adyen.encrypted.data&#x60;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&#x27;re picked up from the customer details.
507
498
 
508
499
  */
509
500
 
510
- delete_contact(customer_id:string, input?:DeleteContactInputParam):ChargebeeRequest<DeleteContactResponse>;
501
+ create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
511
502
 
512
503
  /**
513
- * @description Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.
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
- assign_payment_role(customer_id:string, input:AssignPaymentRoleInputParam):ChargebeeRequest<AssignPaymentRoleResponse>;
508
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
518
509
 
519
510
  /**
520
- * @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 &#x60;{site}&#x60;; whereas, the source site (the site from which the customer is copied) is specified by the query parameter &#x60;from_site&#x60;.
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
- move(input:MoveInputParam):ChargebeeRequest<MoveResponse>;
515
+ retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
525
516
 
526
517
  /**
527
- * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
518
+ * @description Updates the customer resource. However, this method cannot be used for updating the &#x27;Billing Info&#x27; - the Billing Address and &#x27;vat_number&#x27; 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
- hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
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 Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.
577
+ * @description This method is used for updating the &#x60;billing_address&#x60; and &#x60;vat_number&#x60; attributes of the &#x60;customer&#x60;. 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 &#x27;Billing Info&#x27; - the Billing Address and &#x27;vat_number&#x27; 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 &#x60;billing_address&#x60; and &#x60;vat_number&#x60; are not already present, they&#x27;re added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for &#x60;entity_identifiers[i]&#x60; when &#x60;entity_identifiers[operation][i]&#x60; is passed as &#x60;delete&#x60;.
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&#x27;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
- change_billing_date(customer_id:string, input?:ChangeBillingDateInputParam):ChargebeeRequest<ChangeBillingDateResponse>;
585
+ update_billing_info(customer_id:string, input?:UpdateBillingInfoInputParam):ChargebeeRequest<UpdateBillingInfoResponse>;
605
586
 
606
587
  /**
607
- * @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.
588
+ * @description This API retrieves all the contacts for a customer.
608
589
 
609
590
  */
610
591
 
611
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
592
+ contacts_for_customer(customer_id:string, input?:ContactsForCustomerInputParam):ChargebeeRequest<ContactsForCustomerResponse>;
612
593
 
613
594
  /**
614
- * @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&#x3D;1) and pass it as input parameter to this API.
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&#x27;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&#x27;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 &#x60;adyen.encrypted.data&#x60;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&#x27;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
- create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
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 This API retrieves all the contacts for a customer.
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
- contacts_for_customer(customer_id:string, input?:ContactsForCustomerInputParam):ChargebeeRequest<ContactsForCustomerResponse>;
613
+ update_contact(customer_id:string, input?:UpdateContactInputParam):ChargebeeRequest<UpdateContactResponse>;
649
614
 
650
615
  /**
651
- * @description Clear personal details of a customer using this API.
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
- clear_personal_data(customer_id:string):ChargebeeRequest<ClearPersonalDataResponse>;
620
+ delete_contact(customer_id:string, input?:DeleteContactInputParam):ChargebeeRequest<DeleteContactResponse>;
656
621
 
657
622
  /**
658
- * @description This API moves a customer&#x27;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.
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&#x3D;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
- merge(input:MergeInputParam):ChargebeeRequest<MergeResponse>;
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&#x27;s **payment_due**
675
636
  collect_payment(customer_id:string, input?:CollectPaymentInputParam):ChargebeeRequest<CollectPaymentResponse>;
676
637
 
677
638
  /**
678
- * @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.
639
+ * @description Deletes a particular customer identified by the a unique identifier.
679
640
 
680
641
  */
681
642
 
682
- record_excess_payment(customer_id:string, input?:RecordExcessPaymentInputParam):ChargebeeRequest<RecordExcessPaymentResponse>;
643
+ delete(customer_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
683
644
 
684
645
  /**
685
- * @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.
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 &#x60;{site}&#x60;; whereas, the source site (the site from which the customer is copied) is specified by the query parameter &#x60;from_site&#x60;.
686
647
 
687
648
  */
688
649
 
689
- update_contact(customer_id:string, input?:UpdateContactInputParam):ChargebeeRequest<UpdateContactResponse>;
650
+ move(input:MoveInputParam):ChargebeeRequest<MoveResponse>;
690
651
 
691
652
  /**
692
- * @description Changes the level of access that the parent or the child itself has to the child&#x27;s information.
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 &#x27;parent&#x27; is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the &#x60;payment_owner_id&#x60; is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter &#x60;customer_id&#x60; 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 &#x60;parent_id&#x60;, &#x60;invoice_owner_id&#x60; or &#x60;payment_owner_id&#x60; 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&#x27;s *billing_date* and/or *billing_day_of_week*.
704
654
 
705
655
  */
706
656
 
707
- update_hierarchy_settings(customer_id:string, input?:UpdateHierarchySettingsInputParam):ChargebeeRequest<UpdateHierarchySettingsResponse>;
657
+ change_billing_date(customer_id:string, input?:ChangeBillingDateInputParam):ChargebeeRequest<ChangeBillingDateResponse>;
708
658
 
709
659
  /**
710
- * @description This method is used for updating the &#x60;billing_address&#x60; and &#x60;vat_number&#x60; attributes of the &#x60;customer&#x60;. For updating the other customer attributes use [Update Customer API](customers#update_a_customer).
711
-
712
- During this operation, if &#x60;billing_address&#x60; and &#x60;vat_number&#x60; are not already present, they&#x27;re added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for &#x60;entity_identifiers[i]&#x60; when &#x60;entity_identifiers[operation][i]&#x60; is passed as &#x60;delete&#x60;.
660
+ * @description This API moves a customer&#x27;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
- **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.
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&#x3D;2#mbe) is not permitted.
715
665
 
716
666
  */
717
667
 
718
- update_billing_info(customer_id:string, input?:UpdateBillingInfoInputParam):ChargebeeRequest<UpdateBillingInfoResponse>;
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 Deletes the Payment Method from the gateway/vault.
671
+ * @description Clear personal details of a customer using this API.
729
672
 
730
673
  */
731
-
732
- delete_payment_method?:boolean;
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 &#x60;id&#x60; of the customer which is to be set as the immediate parent.
678
+ * @description Sets a customer into a [hierarchical relationship](https://www.chargebee.com/docs/account-hierarchy.html) with another. The path parameter &#x60;customer_id&#x60; is the ID of the child in the relationship.
679
+ **Note**
680
+
681
+ * In the descriptions for &#x60;use_default_hierarchy_settings&#x60;, &#x60;parent_account_access&#x60;, and &#x60;child_account_access&#x60; parameters, the &quot;parent&quot; is the customer whose ID is [payment_owner_id](/docs/api/customers?prod_cat_ver&#x3D;2#link_a_customer_payment_owner_id). However, if the &#x60;payment_owner_id&#x60; is set as the ID of the child itself (&#x60;{customer_id}&#x60;), then the &quot;parent&quot; is [parent_id](/docs/api/customers?prod_cat_ver&#x3D;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&#x3D;2#mbe).
741
683
 
742
684
  */
743
-
744
- parent_id?:string;
685
+
686
+ relationships(customer_id:string, input?:RelationshipsInputParam):ChargebeeRequest<RelationshipsResponse>;
745
687
 
746
688
  /**
747
- * @description The &#x60;id&#x60; of the customer who will pay the invoices for this customer. Can be the child itself or the &#x60;invoice_owner_id&#x60;.
689
+ * @description Disconnects a child customer from its parent. &#x60;customer_id&#x60; is the [id](/docs/api/customers#customer_id) of the child.
748
690
 
749
691
  */
750
-
751
- payment_owner_id?:string;
692
+
693
+ delete_relationship(customer_id:string):ChargebeeRequest<DeleteRelationshipResponse>;
752
694
 
753
695
  /**
754
- * @description The &#x60;id&#x60; of the customer who will be invoiced for charges incurred. Can be the child itself or any parent in its hierarchy.
696
+ * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
755
697
 
756
698
  */
757
-
758
- invoice_owner_id?:string;
699
+
700
+ hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
759
701
 
760
702
  /**
761
- * @description The level of access that the parent and the child itself have to the child&#x27;s information can be set here. This data falls into two categories:
703
+ * @description Changes the level of access that the parent or the child itself has to the child&#x27;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 &#x27;parent&#x27; is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the &#x60;payment_owner_id&#x60; is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter &#x60;customer_id&#x60; 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 &#x60;true&#x60;: 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 &#x60;false&#x60;: Customizes the access levels for this customer. Pass the &#x60;parent_account_access&#x60; and &#x60;child_account_access&#x60; 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 &#x60;parent_id&#x60;, &#x60;invoice_owner_id&#x60; or &#x60;payment_owner_id&#x60; 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
- 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};
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 DeleteContactInputParam {
802
-
725
+ export interface CreateInputParam {
726
+ [key : string] : any;
803
727
  /**
804
- * @description Parameters for contact
728
+ * @description Id for the new customer. If not given, this will be auto-generated.
805
729
 
806
730
  */
807
731
 
808
- contact?:{id:string};
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 Payment source id this role will be assigned to.
735
+ * @description First name of the customer.
819
736
 
820
737
  */
821
738
 
822
- payment_source_id:string;
739
+ first_name?:string;
823
740
 
824
741
  /**
825
- * @description Indicates whether the payment source is Primary, Backup, or neither. \* backup - Backup \* none - None \* primary - Primary
742
+ * @description Last name of the customer.
826
743
 
827
744
  */
828
745
 
829
- role:Role;
830
- }
831
- export interface MoveResponse {
832
- resource_migration:ResourceMigration;
833
- }
834
- export interface MoveInputParam {
746
+ last_name?:string;
835
747
 
836
748
  /**
837
- * @description Id of the customer to be copied.
749
+ * @description Email of the customer. Configured email notifications will be sent to this email.
838
750
 
839
751
  */
840
752
 
841
- id_at_from_site:string;
753
+ email?:string;
842
754
 
843
755
  /**
844
- * @description Name of the site from which this customer need to be copied.
756
+ * @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
845
757
 
846
758
  */
847
759
 
848
- from_site:string;
849
- }
850
- export interface HierarchyResponse {
851
- hierarchies:Hierarchy[];
852
- }
853
- export interface HierarchyInputParam {
760
+ preferred_currency_code?:string;
854
761
 
855
762
  /**
856
- * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
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
- card?:Card;
866
- }
867
- export interface UpdatePaymentMethodInputParam {
767
+ phone?:string;
868
768
 
869
769
  /**
870
- * @description Parameters for payment_method
770
+ * @description Company name of the customer.
871
771
 
872
772
  */
873
773
 
874
- payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
875
- }
876
- export interface RetrieveResponse {
877
- customer:Customer;
774
+ company?:string;
878
775
 
879
- card?:Card;
880
- }
881
-
882
- export interface UpdateResponse {
883
- customer:Customer;
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&#x27;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 First name of the customer.
784
+ * @description The number of days within which the customer has to make payment for the invoice. .
891
785
 
892
786
  */
893
787
 
894
- first_name?:string;
788
+ net_term_days?:number;
895
789
 
896
790
  /**
897
- * @description Last name of the customer.
791
+ * @description Whether the customer can pay via Direct Debit.
898
792
 
899
793
  */
900
794
 
901
- last_name?:string;
795
+ allow_direct_debit?:boolean;
902
796
 
903
797
  /**
904
- * @description Email of the customer. Configured email notifications will be sent to this email.
798
+ * @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (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
- email?:string;
803
+ vat_number?:string;
909
804
 
910
805
  /**
911
- * @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
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) &#x60;country&#x60; as &#x60;XI&#x60; (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) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
811
+ Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
912
812
 
913
813
  */
914
814
 
915
- preferred_currency_code?:string;
815
+ vat_number_prefix?:string;
916
816
 
917
817
  /**
918
- * @description Phone number of the customer.
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, &#x60;DE:VAT&#x60; is used for a German business entity while &#x60;DE:LWID45&#x60; 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 &#x60;billing_address.country&#x60;. 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
823
+ .
919
824
 
920
825
  */
921
826
 
922
- phone?:string;
827
+ entity_identifier_scheme?:string;
923
828
 
924
829
  /**
925
- * @description Company name of the customer.
830
+ * @description The standard used for specifying the &#x60;entity_identifier_scheme&#x60;. Currently only &#x60;iso6523-actorid-upis&#x60; 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
835
+ .
926
836
 
927
837
  */
928
838
 
929
- company?:string;
839
+ entity_identifier_standard?:string;
930
840
 
931
841
  /**
932
- * @description Whether payments needs to be collected automatically for this customer. \* on - Whenever an invoice is created, an automatic attempt to charge the customer&#x27;s payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline.
842
+ * @description Confirms that a customer is registered under GST. If set to &#x60;true&#x60; 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
- auto_collection?:AutoCollection;
846
+ registered_for_gst?:boolean;
937
847
 
938
848
  /**
939
- * @description Whether the customer can pay via Direct Debit.
849
+ * @description Determines whether the customer is e-invoiced. When set to &#x60;true&#x60; or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (&#x60;billing_address.country&#x60;). When set to &#x60;false&#x60;, 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
- allow_direct_debit?:boolean;
858
+ is_einvoice_enabled?:boolean;
944
859
 
945
860
  /**
946
- * @description The number of days within which the customer has to make payment for the invoice. .
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
- net_term_days?:number;
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&#x27;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&#x27;
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&#x27;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
886
+ * @description Indicates the type of the customer. This is applicable only if you use [Chargebee&#x27;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&#x27;
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&#x27;s TaxJar integration. \* government - Government \* other - Other \* wholesale - Whole-sale
900
+ * @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee&#x27;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&#x27;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&#x27;
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&#x27;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
921
+ * @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee&#x27;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&#x27;
1010
932
  exempt_number?:string;
1011
933
 
1012
934
  /**
1013
- * @description The preferred offline payment method for the customer. \* bank_transfer - Bank Transfer \* sepa_credit - SEPA Credit \* cash - Cash \* check - Check \* no_preference - No Preference \* ach_credit - ACH Credit
935
+ * @description A collection of key-value pairs that provides extra information about the customer.
936
+ **Note:** There&#x27;s a character limit of 65,535.
937
+ [Learn more](advanced-features?prod_cat_ver&#x3D;2#metadata).
1014
938
 
1015
939
  */
1016
940
 
1017
- offline_payment_method?:OfflinePaymentMethod;
941
+ meta_data?:object;
1018
942
 
1019
943
  /**
1020
- * @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.
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
- invoice_notes?:string;
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&#x3D;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&#x27;
1031
955
  auto_close_invoices?:boolean;
1032
956
 
1033
957
  /**
1034
- * @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
958
+ * @description Indicates whether invoices raised on the same day for the &#x60;customer&#x60; 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 &#x60;in_trial&#x60; or &#x60;future&#x60; &#x60;status&#x60;, 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
- meta_data?:object;
966
+ consolidated_invoicing?:boolean;
1039
967
 
1040
968
  /**
1041
- * @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
969
+ * @description The Chargebee payment token generated by Chargebee JS.
1042
970
 
1043
971
  */
1044
972
 
1045
- fraud_flag?:'safe' | 'fraudulent';
973
+ token_id?:string;
1046
974
 
1047
975
  /**
1048
- * @description Indicates whether invoices raised on the same day for the &#x60;customer&#x60; 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.
1049
- **Note:**
976
+ * @description The unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) this customer should be [linked](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver&#x3D;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&#x3D;2#mbe-default-be) defined for the site.
977
+ **Note**
1050
978
 
1051
- Any invoices raised when a subscription activates from &#x60;in_trial&#x60; or &#x60;future&#x60; &#x60;status&#x60;, are not consolidated by default. [Contact Support](https://chargebee.freshdesk.com/support/home) to enable consolidation for such invoices.
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&#x3D;2#mbe-header-main).
1052
980
  .
1053
981
 
1054
982
  */
1055
983
 
1056
- consolidated_invoicing?:boolean;
1057
- }
1058
- export interface ChangeBillingDateResponse {
1059
- customer:Customer;
1060
- }
1061
- export interface ChangeBillingDateInputParam {
984
+ business_entity_id?:string;
1062
985
 
1063
986
  /**
1064
- * @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.
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
- billing_date?:number;
991
+ invoice_notes?:string;
1069
992
 
1070
993
  /**
1071
- * @description &#x60;billing_month&#x60;, together with &#x60;billing_date&#x60;, specify, for this customer, the day of the year when the renewals of all the year-based subscriptions take place.
994
+ * @description Parameters for card
1072
995
 
1073
- For example, the renewals happen on 15th July when &#x60;billing_month&#x60; is &#x60;7&#x60; and &#x60;billing_date&#x60; is &#x60;15&#x60;.
1074
- **Note**
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
- Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.html) (with customer-specific billing date support) is enabled and &#x60;billing_date_mode&#x60; is &#x60;manually_set&#x60;.
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
- billing_month?:number;
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 Indicates whether this customer&#x27;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.
1015
+ * @description Parameters for payment_intent
1084
1016
 
1085
1017
  */
1086
1018
 
1087
- billing_date_mode?:BillingDateMode;
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 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
1022
+ * @description Parameters for billing_address
1091
1023
 
1092
1024
  */
1093
1025
 
1094
- billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
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 Indicates whether this customer&#x27;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.
1029
+ * @description Parameters for entity_identifiers
1098
1030
 
1099
1031
  */
1100
1032
 
1101
- billing_day_of_week_mode?:BillingDayOfWeekMode;
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 The number of resources to be returned.
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 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
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 Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
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 Identifier of the customer.
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 First name of the customer
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 Last name of the customer
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 Email of the customer. Configured email notifications will be sent to this email.
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 Company name of the customer.
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 Phone number of the customer
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 Whether payments needs to be collected automatically for this customer
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 Specifies if the customer is liable for tax
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 Timestamp indicating when this customer resource is created.
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 To filter based on &#x60;updated_at&#x60;. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the &#x60;sort_by&#x60; input parameter as &#x60;updated_at&#x60; for a faster response.
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 The unique ID of the [business entity](/docs/api?prod_cat_ver&#x3D;2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_customer_id) of the customer.
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&#x3D;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 preferred offline payment method for the customer.
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 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&#x3D;2#subscription_auto_close_invoices) which takes precedence.
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 subscription channel this object originated from and is maintained in.
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 Parameters for relationship
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 CreateResponse {
1185
+ export interface RetrieveResponse {
1258
1186
  customer:Customer;
1259
1187
 
1260
1188
  card?:Card;
1261
1189
  }
1262
- export interface CreateInputParam {
1263
- [key : string] : any;
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 VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT
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) &#x60;country&#x60; as &#x60;XI&#x60; (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) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
1348
- Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; 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, &#x60;DE:VAT&#x60; is used for a German business entity while &#x60;DE:LWID45&#x60; 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 &#x60;billing_address.country&#x60;. 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
1360
- .
1361
-
1362
- */
1363
-
1364
- entity_identifier_scheme?:string;
1365
-
1366
- /**
1367
- * @description The standard used for specifying the &#x60;entity_identifier_scheme&#x60;. Currently only &#x60;iso6523-actorid-upis&#x60; 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; 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 &#x60;true&#x60; 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 &#x60;true&#x60; or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (&#x60;billing_address.country&#x60;). When set to &#x60;false&#x60;, 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
- einvoicing_method?:EinvoicingMethod;
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&#x27;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&#x27;
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&#x27;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
1280
+ * @description Indicates the type of the customer. This is applicable only if you use [Chargebee&#x27;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&#x27;
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&#x27;s TaxJar integration. \* other - Other \* government - Government \* wholesale - Whole-sale
1294
+ * @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee&#x27;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&#x27;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&#x27;
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&#x27;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
1308
+ * @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee&#x27;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&#x27;
1469
1319
  exempt_number?:string;
1470
1320
 
1471
1321
  /**
1472
- * @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
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
- meta_data?:object;
1326
+ offline_payment_method?:OfflinePaymentMethod;
1477
1327
 
1478
1328
  /**
1479
- * @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
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
- offline_payment_method?:OfflinePaymentMethod;
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&#x3D;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&#x27;
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&#x27;s a character limit of 65,535.
1345
+ [Learn more](advanced-features?prod_cat_ver&#x3D;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 &#x60;customer&#x60; 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 &#x60;in_trial&#x60; 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 The Chargebee payment token generated by Chargebee JS.
1377
+ * @description Parameters for payment_method
1505
1378
 
1506
1379
  */
1507
1380
 
1508
- token_id?:string;
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 unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) this customer should be [linked](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver&#x3D;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&#x3D;2#mbe-default-be) defined for the site.
1512
- **Note**
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&#x3D;2#mbe-header-main).
1515
- .
1391
+ * @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (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
- business_entity_id?:string;
1396
+ vat_number?:string;
1520
1397
 
1521
1398
  /**
1522
- * @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.
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) &#x60;country&#x60; as &#x60;XI&#x60; (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) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
1404
+ Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
1523
1405
 
1524
1406
  */
1525
1407
 
1526
- invoice_notes?:string;
1408
+ vat_number_prefix?:string;
1527
1409
 
1528
1410
  /**
1529
- * @description Parameters for card
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, &#x60;DE:VAT&#x60; is used for a German business entity while &#x60;DE:LWID45&#x60; 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 &#x60;billing_address.country&#x60;. 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
1416
+ .
1530
1417
 
1531
1418
  */
1532
1419
 
1533
- 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};
1420
+ entity_identifier_scheme?:string;
1534
1421
 
1535
1422
  /**
1536
- * @description Parameters for bank_account
1423
+ * @description The standard used for specifying the &#x60;entity_identifier_scheme&#x60;. Currently only &#x60;iso6523-actorid-upis&#x60; 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 &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
1428
+ .
1537
1429
 
1538
1430
  */
1539
1431
 
1540
- 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};
1432
+ entity_identifier_standard?:string;
1541
1433
 
1542
1434
  /**
1543
- * @description Parameters for payment_method
1435
+ * @description Confirms that a customer is registered under GST. If set to &#x60;true&#x60; 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
- payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
1439
+ registered_for_gst?:boolean;
1548
1440
 
1549
1441
  /**
1550
- * @description Parameters for payment_intent
1442
+ * @description Confirms that a customer is a valid business without an EU/UK VAT number.
1551
1443
 
1552
1444
  */
1553
1445
 
1554
- 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};
1446
+ business_customer_without_vat_number?:boolean;
1555
1447
 
1556
1448
  /**
1557
- * @description Parameters for billing_address
1449
+ * @description Determines whether the customer is e-invoiced. When set to &#x60;true&#x60; or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (&#x60;billing_address.country&#x60;). When set to &#x60;false&#x60;, 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
- 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};
1458
+ is_einvoice_enabled?:boolean;
1562
1459
 
1563
1460
  /**
1564
- * @description Parameters for entity_identifiers
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
- entity_identifiers?:{id?:string,scheme?:string,standard?:string,value?:string}[];
1569
- }
1570
- export interface AddContactResponse {
1571
- customer:Customer;
1465
+ einvoicing_method?:EinvoicingMethod;
1572
1466
 
1573
- card?:Card;
1574
- }
1575
- export interface AddContactInputParam {
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 contact
1475
+ * @description Parameters for entity_identifiers
1579
1476
 
1580
1477
  */
1581
1478
 
1582
- 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};
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 The number of resources to be returned.
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 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
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 ClearPersonalDataResponse {
1512
+ export interface AssignPaymentRoleResponse {
1616
1513
  customer:Customer;
1514
+
1515
+ payment_source:PaymentSource;
1617
1516
  }
1618
-
1619
- export interface MergeResponse {
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 MergeInputParam {
1538
+ export interface AddContactInputParam {
1623
1539
 
1624
1540
  /**
1625
- * @description From customer id.
1541
+ * @description Parameters for contact
1626
1542
 
1627
1543
  */
1628
1544
 
1629
- from_customer_id:string;
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 To customer id.
1555
+ * @description Parameters for contact
1633
1556
 
1634
1557
  */
1635
1558
 
1636
- to_customer_id:string;
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 null
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 RecordExcessPaymentResponse {
1673
+ export interface DeleteResponse {
1716
1674
  customer:Customer;
1717
1675
 
1718
- transaction:Transaction;
1676
+ card?:Card;
1719
1677
  }
1720
- export interface RecordExcessPaymentInputParam {
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 &#x60;billing_month&#x60;, together with &#x60;billing_date&#x60;, 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 &#x60;billing_month&#x60; is &#x60;7&#x60; and &#x60;billing_date&#x60; is &#x60;15&#x60;.
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 &#x60;billing_date_mode&#x60; is &#x60;manually_set&#x60;.
1725
+
1726
+ */
1727
+
1728
+ billing_month?:number;
1721
1729
 
1722
1730
  /**
1723
- * @description Remarks, if any, on the payment.
1731
+ * @description Indicates whether this customer&#x27;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
- comment?:string;
1735
+ billing_date_mode?:BillingDateMode;
1728
1736
 
1729
1737
  /**
1730
- * @description Parameters for transaction
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
- transaction?:{amount:number,currency_code?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
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 Parameters for contact
1745
+ * @description Indicates whether this customer&#x27;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
- 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};
1749
+ billing_day_of_week_mode?:BillingDayOfWeekMode;
1749
1750
  }
1750
- export interface UpdateHierarchySettingsResponse {
1751
+ export interface MergeResponse {
1751
1752
  customer:Customer;
1752
1753
  }
1753
- export interface UpdateHierarchySettingsInputParam {
1754
-
1755
- /**
1756
- * @description Determines whether the site default settings are applied for the access levels.
1757
-
1758
- * Value set to &#x60;true&#x60;: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
1759
- * Value set to &#x60;false&#x60;: Changes the access levels for this customer. Pass the &#x60;parent_account_access&#x60; and &#x60;child_account_access&#x60; 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 Parameters for parent_account_access
1757
+ * @description From customer id.
1768
1758
 
1769
1759
  */
1770
1760
 
1771
- 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};
1761
+ from_customer_id:string;
1772
1762
 
1773
1763
  /**
1774
- * @description Parameters for child_account_access
1764
+ * @description To customer id.
1775
1765
 
1776
1766
  */
1777
1767
 
1778
- 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};
1768
+ to_customer_id:string;
1779
1769
  }
1780
- export interface UpdateBillingInfoResponse {
1770
+ export interface ClearPersonalDataResponse {
1781
1771
  customer:Customer;
1782
-
1783
- card?:Card;
1784
1772
  }
1785
- export interface UpdateBillingInfoInputParam {
1773
+
1774
+ export interface RelationshipsResponse {
1775
+ customer:Customer;
1776
+ }
1777
+ export interface RelationshipsInputParam {
1786
1778
 
1787
1779
  /**
1788
- * @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT
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 &#x60;id&#x60; of the customer which is to be set as the immediate parent.
1790
1781
 
1791
1782
  */
1792
1783
 
1793
- vat_number?:string;
1784
+ parent_id?:string;
1794
1785
 
1795
1786
  /**
1796
- * @description An overridden value for the first two characters of the [full VAT
1797
- number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (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) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
1801
- Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
1787
+ * @description The &#x60;id&#x60; of the customer who will pay the invoices for this customer. Can be the child itself or the &#x60;invoice_owner_id&#x60;.
1802
1788
 
1803
1789
  */
1804
1790
 
1805
- vat_number_prefix?:string;
1791
+ payment_owner_id?:string;
1806
1792
 
1807
1793
  /**
1808
- * @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, &#x60;DE:VAT&#x60; is used for a German business entity while &#x60;DE:LWID45&#x60; 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 &#x60;billing_address.country&#x60;. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
1809
- **Tip:**
1810
-
1811
-
1812
- If there are additional entity identifiers for the customer not associated with the &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
1813
- .
1794
+ * @description The &#x60;id&#x60; 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
- entity_identifier_scheme?:string;
1798
+ invoice_owner_id?:string;
1818
1799
 
1819
1800
  /**
1820
- * @description The standard used for specifying the &#x60;entity_identifier_scheme&#x60;. Currently only &#x60;iso6523-actorid-upis&#x60; is supported and is used by default when not provided.
1821
- **Tip:**
1801
+ * @description The level of access that the parent and the child itself have to the child&#x27;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
- If there are additional entity identifiers for the customer not associated with the &#x60;vat_number&#x60;, they can be provided as the &#x60;entity_identifiers[]&#x60; array.
1807
+
1808
+ **Usage:**
1809
+
1810
+ * Value set to &#x60;true&#x60;: 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 &#x60;false&#x60;: Customizes the access levels for this customer. Pass the &#x60;parent_account_access&#x60; and &#x60;child_account_access&#x60; 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
- entity_identifier_standard?:string;
1816
+ use_default_hierarchy_settings?:boolean;
1830
1817
 
1831
1818
  /**
1832
- * @description Confirms that a customer is registered under GST. If set to &#x60;true&#x60; 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.
1819
+ * @description Parameters for parent_account_access
1833
1820
 
1834
1821
  */
1835
1822
 
1836
- registered_for_gst?:boolean;
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 Confirms that a customer is a valid business without an EU/UK VAT number.
1826
+ * @description Parameters for child_account_access
1840
1827
 
1841
1828
  */
1842
1829
 
1843
- business_customer_without_vat_number?:boolean;
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 Determines whether the customer is e-invoiced. When set to &#x60;true&#x60; or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (&#x60;billing_address.country&#x60;). When set to &#x60;false&#x60;, the customer is not e-invoiced even if e-invoicing is enabled for their country.
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
- is_einvoice_enabled?:boolean;
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 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.
1854
+ * @description Determines whether the site default settings are applied for the access levels.
1855
+
1856
+ * Value set to &#x60;true&#x60;: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
1857
+ * Value set to &#x60;false&#x60;: Changes the access levels for this customer. Pass the &#x60;parent_account_access&#x60; and &#x60;child_account_access&#x60; parameters to specify the new settings. If you skip passing any parameters, they will remain unchanged.
1858
+ .
1859
1859
 
1860
1860
  */
1861
1861
 
1862
- einvoicing_method?:EinvoicingMethod;
1862
+ use_default_hierarchy_settings?:boolean;
1863
1863
 
1864
1864
  /**
1865
- * @description Parameters for billing_address
1865
+ * @description Parameters for parent_account_access
1866
1866
 
1867
1867
  */
1868
1868
 
1869
- 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};
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 entity_identifiers
1872
+ * @description Parameters for child_account_access
1873
1873
 
1874
1874
  */
1875
1875
 
1876
- entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
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
- referral_sharing_url?:string;
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
- created_at?:number;
2018
+ referral_campaign_id:string;
1990
2019
 
1991
- updated_at?:number;
2020
+ /**
2021
+ * @description Referral account id
2022
+
2023
+ */
1992
2024
 
1993
- referral_campaign_id?:string;
2025
+ referral_account_id:string;
1994
2026
 
1995
- referral_account_id?:string;
2027
+ /**
2028
+ * @description Referral external campaign id
2029
+
2030
+ */
1996
2031
 
1997
2032
  referral_external_campaign_id?:string;
1998
2033
 
1999
- referral_system?:'referral_candy' | 'friendbuy' | 'referral_saasquatch';
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
- id?:string;
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
- email?:string;
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
- enabled?:boolean;
2084
+ /**
2085
+ * @description Contact enabled / disabled
2086
+
2087
+ */
2088
+
2089
+ enabled:boolean;
2015
2090
 
2016
- send_account_email?:boolean;
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?:boolean;
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?: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?: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?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
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 &#x27;billing agreement id&#x27;. For GoCardless direct debit this will be &#x27;mandate id&#x27;. 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?:string;
2140
+ reference_id:string;
2056
2141
  }
2057
2142
  export interface CustomerBalance {
2058
- promotional_credits?:number;
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?:number;
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
- refundable_credits?:number;
2169
+ unbilled_charges:number;
2063
2170
 
2064
- unbilled_charges?:number;
2171
+ /**
2172
+ * @description The currency code (ISO 4217 format) for balance
2173
+
2174
+ */
2065
2175
 
2066
- currency_code?:string;
2176
+ currency_code:string;
2067
2177
  }
2068
2178
  export interface EntityIdentifier {
2069
- id?:string;
2179
+ /**
2180
+ * @description The unique id for the &#x60;entity_identifier&#x60; in Chargebee. When not provided, it is autogenerated.
2181
+
2182
+ */
2183
+
2184
+ id:string;
2185
+
2186
+ /**
2187
+ * @description The value of the &#x60;entity_identifier&#x60;. This identifies the customer entity on the Peppol network. For example: &#x60;10101010-STO-10&#x60;.
2188
+ **Tip:**
2189
+
2190
+
2191
+ If there is only one entity identifier for the customer and the value is the same as &#x60;vat_number&#x60;, then there is no need to provide the &#x60;entity_identifiers[]&#x60; array. See [description for &#x60;entity_identifiers[]&#x60;](customers#customer_entity_identifiers).
2192
+
2193
+ */
2070
2194
 
2071
2195
  value?:string;
2072
2196
 
2073
- scheme?:string;
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, &#x60;DE:VAT&#x60; is used for a German business entity while &#x60;DE:LWID45&#x60; 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 &#x60;billing_address.country&#x60;. 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 &#x60;vat_number&#x60;, then there is no need to provide the &#x60;entity_identifiers[]&#x60; array. See [description for &#x60;entity_identifiers[]&#x60;](customers#customer_entity_identifiers).
2203
+
2204
+ */
2205
+
2206
+ scheme:string;
2207
+
2208
+ /**
2209
+ * @description The standard used for specifying the &#x60;entity_identifier&#x60; &#x60;scheme&#x60;. Currently, only &#x60;iso6523-actorid-upis&#x60; 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 &#x60;vat_number&#x60;, then there is no need to provide the &#x60;entity_identifiers[]&#x60; array. See [description for &#x60;entity_identifiers[]&#x60;](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?:string;
2232
+ payment_owner_id:string;
2091
2233
 
2092
2234
  /**
2093
2235
  * @description The &#x60;id&#x60; 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?:string;
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?:boolean;
2261
+ send_subscription_emails:boolean;
2120
2262
 
2121
2263
  /**
2122
2264
  * @description If &#x60;true&#x60;, the parent account will receive invoice-related emails sent to the child account.
2123
2265
 
2124
2266
  */
2125
2267
 
2126
- send_invoice_emails?:boolean;
2268
+ send_invoice_emails:boolean;
2127
2269
 
2128
2270
  /**
2129
2271
  * @description If &#x60;true&#x60;, the parent account will receive payment-related emails sent to the child account.
2130
2272
 
2131
2273
  */
2132
2274
 
2133
- send_payment_emails?:boolean;
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?:boolean;
2297
+ send_subscription_emails:boolean;
2156
2298
 
2157
2299
  /**
2158
2300
  * @description If &#x60;true&#x60;, the child account will receive invoice-related emails for its own invoices.
2159
2301
 
2160
2302
  */
2161
2303
 
2162
- send_invoice_emails?:boolean;
2304
+ send_invoice_emails:boolean;
2163
2305
 
2164
2306
  /**
2165
2307
  * @description If &#x60;true&#x60;, the child account will receive payment-related emails for its own invoices.
2166
2308
 
2167
2309
  */
2168
2310
 
2169
- send_payment_emails?:boolean;
2311
+ send_payment_emails:boolean;
2170
2312
  }
2171
2313
  }
2172
2314
  }