chargebee 2.25.3 → 2.26.1

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 (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +55 -49
  3. package/lib/chargebee.js +1 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +1 -0
  6. package/types/resources/Address.d.ts +245 -5
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  8. package/types/resources/AttachedItem.d.ts +305 -13
  9. package/types/resources/Card.d.ts +485 -13
  10. package/types/resources/Comment.d.ts +177 -11
  11. package/types/resources/Contact.d.ts +54 -0
  12. package/types/resources/ContractTerm.d.ts +83 -0
  13. package/types/resources/Coupon.d.ts +665 -20
  14. package/types/resources/CouponCode.d.ts +56 -5
  15. package/types/resources/CouponSet.d.ts +224 -17
  16. package/types/resources/CreditNote.d.ts +1202 -44
  17. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  18. package/types/resources/Customer.d.ts +2132 -73
  19. package/types/resources/DifferentialPrice.d.ts +266 -15
  20. package/types/resources/Discount.d.ts +107 -0
  21. package/types/resources/Download.d.ts +18 -0
  22. package/types/resources/EntitlementOverride.d.ts +101 -7
  23. package/types/resources/Estimate.d.ts +1181 -27
  24. package/types/resources/Event.d.ts +145 -8
  25. package/types/resources/Export.d.ts +703 -32
  26. package/types/resources/Feature.d.ts +356 -22
  27. package/types/resources/Gift.d.ts +351 -24
  28. package/types/resources/Hierarchy.d.ts +30 -0
  29. package/types/resources/HostedPage.d.ts +1212 -37
  30. package/types/resources/ImpactedItem.d.ts +41 -1
  31. package/types/resources/ImpactedSubscription.d.ts +36 -1
  32. package/types/resources/InAppSubscription.d.ts +636 -9
  33. package/types/resources/Invoice.d.ts +2293 -93
  34. package/types/resources/InvoiceEstimate.d.ts +75 -6
  35. package/types/resources/Item.d.ts +542 -16
  36. package/types/resources/ItemEntitlement.d.ts +172 -13
  37. package/types/resources/ItemFamily.d.ts +173 -15
  38. package/types/resources/ItemPrice.d.ts +971 -26
  39. package/types/resources/Media.d.ts +24 -0
  40. package/types/resources/NonSubscription.d.ts +51 -3
  41. package/types/resources/Order.d.ts +1224 -32
  42. package/types/resources/PaymentIntent.d.ts +318 -8
  43. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  44. package/types/resources/PaymentSource.d.ts +1259 -55
  45. package/types/resources/PaymentVoucher.d.ts +262 -14
  46. package/types/resources/PortalSession.d.ts +187 -10
  47. package/types/resources/PromotionalCredit.d.ts +351 -16
  48. package/types/resources/Purchase.d.ts +274 -5
  49. package/types/resources/Quote.d.ts +1595 -62
  50. package/types/resources/QuoteLineGroup.d.ts +134 -5
  51. package/types/resources/QuotedCharge.d.ts +63 -5
  52. package/types/resources/QuotedSubscription.d.ts +192 -5
  53. package/types/resources/ResourceMigration.d.ts +73 -3
  54. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  55. package/types/resources/Subscription.d.ts +3462 -137
  56. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  57. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  58. package/types/resources/TaxWithheld.d.ts +32 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  60. package/types/resources/TimeMachine.d.ts +99 -7
  61. package/types/resources/Token.d.ts +179 -7
  62. package/types/resources/Transaction.d.ts +597 -25
  63. package/types/resources/UnbilledCharge.d.ts +355 -14
  64. package/types/resources/Usage.d.ts +259 -13
  65. package/types/resources/VirtualBankAccount.d.ts +255 -17
@@ -2,424 +2,2483 @@
2
2
  declare module 'chargebee' {
3
3
  export interface Customer {
4
4
  [key : string] : any;
5
+ /**
6
+ * @description Identifier of the customer.
7
+
8
+ */
9
+
5
10
  id:string;
11
+
12
+ /**
13
+ * @description First name of the customer
14
+
15
+ */
16
+
6
17
  first_name?:string;
18
+
19
+ /**
20
+ * @description Last name of the customer
21
+
22
+ */
23
+
7
24
  last_name?:string;
25
+
26
+ /**
27
+ * @description Email of the customer. Configured email notifications will be sent to this email.
28
+
29
+ */
30
+
8
31
  email?:string;
32
+
33
+ /**
34
+ * @description Phone number of the customer
35
+
36
+ */
37
+
9
38
  phone?:string;
39
+
40
+ /**
41
+ * @description Company name of the customer.
42
+
43
+ */
44
+
10
45
  company?:string;
46
+
47
+ /**
48
+ * @description The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT
49
+ number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
50
+
51
+ */
52
+
11
53
  vat_number?:string;
54
+
55
+ /**
56
+ * @description Whether payments needs to be collected automatically for this customer \* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline.
57
+
58
+ */
59
+
12
60
  auto_collection:AutoCollection;
61
+
62
+ /**
63
+ * @description The preferred offline payment method for the customer. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* check - Check \* boleto - Boleto \* ach_credit - ACH Credit
64
+
65
+ */
66
+
13
67
  offline_payment_method?:OfflinePaymentMethod;
68
+
69
+ /**
70
+ * @description The number of days within which the customer has to make payment for the invoice.
71
+
72
+ */
73
+
14
74
  net_term_days:number;
75
+
76
+ /**
77
+ * @description Returns the recent VAT number validation time.
78
+
79
+ */
80
+
15
81
  vat_number_validated_time?:number;
82
+
83
+ /**
84
+ * @description Represents the VAT validation status. This is applicable if you have configured EU, UK or Australian taxes and the [VAT number validation](https://www.chargebee.com/docs/2.0/uk-vat.html#uk-vat-validation) is enabled. \* not_validated - This status is only applicable for countries in European Zone. This is applicable when both the customer's billing address and the organization's address should be of the same European Zone and EU tax should be configured with the "'Also validate VAT Number for Country of Business'" option in the disabled status. \* undetermined - When Chargebee is not able to validate the VAT number it is stored as 'undetermined'. This can occur due to reasons like service outage etc. VAT numbers with 'undetermined' status will be in queue for validation on daily basis. \* valid - If the given VAT number is valid. \* invalid - If the given VAT number is invalid.
85
+
86
+ */
87
+
16
88
  vat_number_status?:'valid' | 'undetermined' | 'invalid' | 'not_validated';
89
+
90
+ /**
91
+ * @description Whether the customer can pay via Direct Debit
92
+
93
+ */
94
+
17
95
  allow_direct_debit:boolean;
96
+
97
+ /**
98
+ * @description Customer location is validated based on IP address and Card issuing country. If the location is valid, it returns True. If not, it returns False. Applicable only for EU, New Zealand and Australia.
99
+
100
+ */
101
+
18
102
  is_location_valid?:boolean;
103
+
104
+ /**
105
+ * @description Timestamp indicating when this customer resource is created.
106
+
107
+ */
108
+
19
109
  created_at:number;
110
+
111
+ /**
112
+ * @description The IP address of the customer. Used primarily for [referral integrations](https://www.chargebee.com/docs/marketing-integration-index.html) and EU/UK VAT validation.
113
+
114
+ */
115
+
20
116
  created_from_ip?:string;
117
+
118
+ /**
119
+ * @description Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
120
+ To know more about what values you need to provide, refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).
121
+
122
+ */
123
+
21
124
  exemption_details?:any[];
125
+
126
+ /**
127
+ * @description Specifies if the customer is liable for tax \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* exempt -
128
+
129
+ * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.
130
+ * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.
131
+
132
+ */
133
+
22
134
  taxability?:Taxability;
135
+
136
+ /**
137
+ * @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident \* 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 \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax
138
+
139
+ */
140
+
23
141
  entity_code?:EntityCode;
142
+
143
+ /**
144
+ * @description Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption).
145
+
146
+ */
147
+
24
148
  exempt_number?:string;
149
+
150
+ /**
151
+ * @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
152
+
153
+ */
154
+
25
155
  resource_version?:number;
156
+
157
+ /**
158
+ * @description Timestamp indicating when this customer was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.
159
+
160
+ */
161
+
26
162
  updated_at?:number;
163
+
164
+ /**
165
+ * @description Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.
166
+
167
+ */
168
+
27
169
  locale?:string;
170
+
171
+ /**
172
+ * @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.
173
+
174
+ */
175
+
28
176
  billing_date?:number;
177
+
178
+ /**
179
+ * @description `billing_month`, together with `billing_date`, specify, for this customer, the day of the year when the renewals of all the year-based subscriptions take place.
180
+
181
+ For example, the renewals happen on 15th July when `billing_month` is `7` and `billing_date` is `15`.
182
+ **Note**
183
+
184
+ Applicable when [Calendar Billing](https://www.chargebee.com/docs/calendar-billing.html) (with customer-specific billing date support) is enabled and `billing_date_mode` is `manually_set`.
185
+
186
+ */
187
+
29
188
  billing_month?:number;
189
+
190
+ /**
191
+ * @description Indicates whether this customer's *billing_date* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_date* will not be reset even when all of the monthly/yearly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured.
192
+
193
+ */
194
+
30
195
  billing_date_mode?:BillingDateMode;
196
+
197
+ /**
198
+ * @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. \* saturday - Saturday \* monday - Monday \* friday - Friday \* sunday - Sunday \* wednesday - Wednesday \* thursday - Thursday \* tuesday - Tuesday
199
+
200
+ */
201
+
31
202
  billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
203
+
204
+ /**
205
+ * @description Indicates whether this customer's *billing_day_of_week* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week* will not be reset even when all of the weekly subscriptions are cancelled. \* using_defaults - Billing date is set based on defaults configured. \* manually_set - Billing date is specifically set (default configuration is overridden)
206
+
207
+ */
208
+
32
209
  billing_day_of_week_mode?:BillingDayOfWeekMode;
210
+
211
+ /**
212
+ * @description Indicates whether this customer's personal information has been cleared \* cleared - Cleared \* scheduled_for_clear - Scheduled For Clear \* active - Active
213
+
214
+ */
215
+
33
216
  pii_cleared?:'active' | 'scheduled_for_clear' | 'cleared';
217
+
218
+ /**
219
+ * @description Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence.
220
+
221
+ */
222
+
34
223
  auto_close_invoices?:boolean;
224
+
225
+ /**
226
+ * @description The subscription channel this object originated from and is maintained in. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
227
+
228
+ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
229
+ \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.
230
+
231
+ */
232
+
35
233
  channel?:Channel;
234
+
235
+ /**
236
+ * @description Indicates whether or not the customer has been identified as fraudulent. \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe \* fraudulent - The customer has been marked as fraudulent
237
+
238
+ */
239
+
36
240
  fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
241
+
242
+ /**
243
+ * @description Primary payment source for the customer.
244
+
245
+ */
246
+
37
247
  primary_payment_source_id?:string;
248
+
249
+ /**
250
+ * @description Backup payment source for the customer. Used to collect payment if primary payment source fails.
251
+
252
+ */
253
+
38
254
  backup_payment_source_id?:string;
255
+
256
+ /**
257
+ * @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.
258
+
259
+ */
260
+
39
261
  invoice_notes?:string;
262
+
263
+ /**
264
+ * @description The unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
265
+
266
+ */
267
+
40
268
  business_entity_id?:string;
269
+
270
+ /**
271
+ * @description The currency code of the customer's preferred currency (ISO 4217 format). Applicable if the Multicurrency feature is enabled.
272
+
273
+ */
274
+
41
275
  preferred_currency_code?:string;
276
+
277
+ /**
278
+ * @description Promotional credits balance of this customer
279
+
280
+ */
281
+
42
282
  promotional_credits:number;
283
+
284
+ /**
285
+ * @description Total unbilled charges for this customer
286
+
287
+ */
288
+
43
289
  unbilled_charges:number;
290
+
291
+ /**
292
+ * @description Refundable credits balance of this customer
293
+
294
+ */
295
+
44
296
  refundable_credits:number;
297
+
298
+ /**
299
+ * @description Total unused payments associated with the customer
300
+
301
+ */
302
+
45
303
  excess_payments:number;
304
+
305
+ /**
306
+ * @description Determines whether the customer is e-invoiced. When set to `true` or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`). When set to `false`, the customer is not e-invoiced even if e-invoicing is enabled for their country.
307
+ **Tip:**
308
+
309
+
310
+ 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.
311
+
312
+ */
313
+
46
314
  is_einvoice_enabled?:boolean;
315
+
316
+ /**
317
+ * @description Determines whether to send 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.
318
+
319
+ */
320
+
47
321
  einvoicing_method?:EinvoicingMethod;
322
+
323
+ /**
324
+ * @description Indicates that this resource has been deleted.
325
+
326
+ */
327
+
48
328
  deleted:boolean;
329
+
330
+ /**
331
+ * @description Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site.
332
+
333
+ */
334
+
49
335
  registered_for_gst?:boolean;
336
+
337
+ /**
338
+ * @description Indicates whether invoices raised on the same day for the `customer` are consolidated. When present, this value overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This attribute is applicable only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled.
339
+ **Note:**
340
+
341
+
342
+ Any invoices raised when a subscription activates from `in_trial` or `future` `status`, are not consolidated by default. [Contact Support](https://chargebee.freshdesk.com/support/home) to enable consolidation for such invoices.
343
+
344
+ */
345
+
50
346
  consolidated_invoicing?:boolean;
347
+
348
+ /**
349
+ * @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* industrial - When the purchase is made by an industrial business \* residential - When the purchase is made by a customer for home use \* 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
350
+
351
+ */
352
+
51
353
  customer_type?:CustomerType;
354
+
355
+ /**
356
+ * @description Confirms that a customer is a valid business without an EU/UK VAT number.
357
+
358
+ */
359
+
52
360
  business_customer_without_vat_number?:boolean;
361
+
362
+ /**
363
+ * @description Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
364
+
365
+ */
366
+
53
367
  client_profile_id?:string;
368
+
369
+ /**
370
+ * @description Indicates whether the site-default settings are being used for controlling access to the customer's information.
371
+ The level of access is for data falling into two categories:
372
+
373
+ * **Self-Serve Portal data:** subscriptions and invoices of the customer.
374
+ * **Email Notifications:** subscription-, invoice- and payment-related notifications for the customer.
375
+
376
+ */
377
+
54
378
  use_default_hierarchy_settings?:boolean;
379
+
380
+ /**
381
+ * @description An overridden value for the first two characters of the [full VAT
382
+ number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
383
+
384
+ When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
385
+ enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
386
+ Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
387
+
388
+ */
389
+
55
390
  vat_number_prefix?:string;
391
+
392
+ /**
393
+ * @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
394
+ **Tip:**
395
+
396
+
397
+ If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
398
+
399
+ */
400
+
56
401
  entity_identifier_scheme?:string;
402
+
403
+ /**
404
+ * @description The standard used for specifying the `entity_identifier_scheme`. Currently only `iso6523-actorid-upis` is supported and is used by default when not provided.
405
+ **Tip:**
406
+
407
+
408
+ If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
409
+
410
+ */
411
+
57
412
  entity_identifier_standard?:string;
413
+
414
+ /**
415
+ * @description Billing address for a customer.
416
+
417
+ */
418
+
58
419
  billing_address?:Customer.BillingAddress;
420
+
421
+ /**
422
+ * @description List of referral urls for the customer (if applicable)
423
+
424
+ */
425
+
59
426
  referral_urls?:Customer.ReferralUrl[];
427
+
428
+ /**
429
+ * @description contacts
430
+
431
+ */
432
+
60
433
  contacts?:Customer.Contact[];
434
+
435
+ /**
436
+ * @description Primary Payment Source of the customer.
437
+
438
+ */
439
+
61
440
  payment_method?:Customer.PaymentMethod;
441
+
442
+ /**
443
+ * @description The list of balances for this customer
444
+
445
+ */
446
+
62
447
  balances?:Customer.CustomerBalance[];
448
+
449
+ /**
450
+ * @description Each element of the `entity_identifiers[]` array identifies a specific customer entity with the e-invoicing system. If the customer has only one entity identifier whose `value` is the `vat_number`, then this array is not needed as the `scheme` can be provided via `entity_identifier_scheme`. This array holds any additional entity identifiers that the customer may have.
451
+
452
+ */
453
+
63
454
  entity_identifiers?:Customer.EntityIdentifier[];
455
+
456
+ /**
457
+ * @description The [Account Hierarchy](https://www.chargebee.com/docs/account-hierarchy.html) relationship that the customer is part of.
458
+
459
+ */
460
+
64
461
  relationship?:Customer.Relationship;
462
+
463
+ /**
464
+ * @description Defines the level of access that the parent account has to the customer's information.
465
+ **Note:** the 'parent' is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the customer itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id).
466
+
467
+ */
468
+
65
469
  parent_account_access?:Customer.ParentAccountAccess;
470
+
471
+ /**
472
+ * @description Defines the level of access that the customer has to its own information.
473
+
474
+ */
475
+
66
476
  child_account_access?:Customer.ChildAccountAccess;
67
477
  }
68
478
  export namespace Customer {
69
- export class CustomerResource {
479
+ export class CustomerResource {
480
+ /**
481
+ * @description Deletes a particular customer identified by the a unique identifier.
482
+
483
+ */
484
+
70
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**
490
+
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).
493
+
494
+ */
495
+
71
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.
500
+
501
+ */
502
+
72
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.
507
+
508
+ */
509
+
73
510
  delete_contact(customer_id:string, input?:DeleteContactInputParam):ChargebeeRequest<DeleteContactResponse>;
511
+
512
+ /**
513
+ * @description Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.
514
+
515
+ */
516
+
74
517
  assign_payment_role(customer_id:string, input:AssignPaymentRoleInputParam):ChargebeeRequest<AssignPaymentRoleResponse>;
518
+
519
+ /**
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;.
521
+
522
+ */
523
+
75
524
  move(input:MoveInputParam):ChargebeeRequest<MoveResponse>;
525
+
526
+ /**
527
+ * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
528
+
529
+ */
530
+
76
531
  hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
532
+
533
+ /**
534
+ * @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.
535
+
536
+ Updates payment method details for a customer.
537
+
538
+ **Note:** If you wish to pass the card number, CVV, or the single-use card tokens provided by gateways like Stripe, then use the [Update card for a customer](cards#update_card_for_a_customer) API under Cards resource. This API is not supported for Chargebee Test Gateway, it is provided to help you understand the billing workflow in Chargebee.
539
+
540
+ **PayPal Express Checkout**
541
+ You can use this API if you are directly integrating PayPal Express Checkout in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates his payment method using PayPal Express Checkout, you will be provided with the *Billing Agreement ID* by PayPal. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;paypal_express_checkout&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
542
+
543
+ **Login and Pay with Amazon**
544
+ You can use this API if you are directly integrating *Login and Pay with Amazon* in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates Amazon as a payment method, you will be provided with the *Billing Agreement ID* by Amazon. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;amazon_payments&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
545
+
546
+ **Card Payments**
547
+ When the card details of your customer are stored in the vault of gateways such as Stripe or Braintree, you can use this API to update the *reference id* provided by them in Chargebee. To use this API, pass
548
+
549
+ * &#x60;type&#x60; as &#x60;card&#x60;.
550
+ * &#x60;gateway&#x60; with the gateway associated with the card. If the gateway is not specified, the default gateway will be used.
551
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway/Spreedly to reference that specific card.
552
+
553
+ **Reference id format for Card Payments**
554
+ The format of reference_id will differ based on where the card is stored.
555
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Card ID separated by forward slash (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*). If you are passing Stripe Customer ID alone, then Chargebee will store the card marked as active for that customer in Stripe.
556
+
557
+ **Braintree:** In case of Braintree, the reference_id consists of combination of Braintree Customer ID and Braintree Payment Method Token separated by forward slash
558
+ (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G* ). If you are passing Braintree Customer ID alone, then Chargebee will store the card marked as default for that customer in Braintree.
559
+
560
+ **Spreedly Card vault:** If the card details are stored in Spreedly vault, then you need to provide the Spreedly token as &#x60;reference_id&#x60;.
561
+
562
+ **Direct Debit Payments**
563
+ When the bank account details of your customer are stored in the gateway vault, you can use this API to update the reference id provided by them in Chargebee. To use this API, pass
564
+
565
+ * &#x60;type&#x60; as &#x60;direct_debit&#x60;.
566
+ * &#x60;gateway&#x60; with the gateway where the bank account details are stored (e.g. *authorize_net*). If the gateway is not specified, the gateway supporting the direct debit will be used.
567
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway to reference the customer&#x27;s bank account details.
568
+ * &#x60;tmp_token&#x60; with the single use token provided by the gateway ( Should be passed only if reference_id is not passed ).
569
+
570
+ **Reference id format for Direct Debit Payments**
571
+ The format of reference_id will differ based on where the bank account is stored.
572
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Bank Account ID separated by forward slash
573
+ (e.g. *cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW*). If you are passing Stripe Customer ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Stripe.
574
+
575
+ **Authorize.Net:** The reference_id consists of combination of Authorize.Net&#x27;s Customer Profile ID and Payment Profile ID separated by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net&#x27;s Customer Profile ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Authorize.Net.
576
+
577
+ **GoCardless:** The reference_id is the GoCardless Customer Mandate ID (e.g. *MD0077Z99TTQXK*).
578
+
579
+ **Note:** While using this API to update payment method details, [Card Verification](https://www.chargebee.com/docs/cards.html#card-verification) will not happen even if it is enabled for that particular gateway.
580
+
581
+ */
582
+
77
583
  update_payment_method(customer_id:string, input?:UpdatePaymentMethodInputParam):ChargebeeRequest<UpdatePaymentMethodResponse>;
584
+
585
+ /**
586
+ * @description Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.
587
+
588
+ */
589
+
78
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.
594
+
595
+ */
596
+
79
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*.
601
+
602
+ */
603
+
80
604
  change_billing_date(customer_id:string, input?:ChangeBillingDateInputParam):ChargebeeRequest<ChangeBillingDateResponse>;
605
+
606
+ /**
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.
608
+
609
+ */
610
+
81
611
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
612
+
613
+ /**
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.
631
+
632
+ */
633
+
82
634
  create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
635
+
636
+ /**
637
+ * @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.
638
+
639
+ */
640
+
83
641
  add_contact(customer_id:string, input?:AddContactInputParam):ChargebeeRequest<AddContactResponse>;
642
+
643
+ /**
644
+ * @description This API retrieves all the contacts for a customer.
645
+
646
+ */
647
+
84
648
  contacts_for_customer(customer_id:string, input?:ContactsForCustomerInputParam):ChargebeeRequest<ContactsForCustomerResponse>;
649
+
650
+ /**
651
+ * @description Clear personal details of a customer using this API.
652
+
653
+ */
654
+
85
655
  clear_personal_data(customer_id:string):ChargebeeRequest<ClearPersonalDataResponse>;
656
+
657
+ /**
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.
663
+
664
+ */
665
+
86
666
  merge(input:MergeInputParam):ChargebeeRequest<MergeResponse>;
667
+
668
+ /**
669
+ * @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.
670
+
671
+ This API can be used to collect the payments for customer&#x27;s **payment_due** and **not_paid** invoices. You can either choose to collect the payment from an existing payment source or a new payment source. You can choose to either retain or discard the new payment source, which is being used for payment. If the amount collected exceeds the invoice amount, the surplus will be counted in as excess payments.
672
+
673
+ */
674
+
87
675
  collect_payment(customer_id:string, input?:CollectPaymentInputParam):ChargebeeRequest<CollectPaymentResponse>;
676
+
677
+ /**
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.
679
+
680
+ */
681
+
88
682
  record_excess_payment(customer_id:string, input?:RecordExcessPaymentInputParam):ChargebeeRequest<RecordExcessPaymentResponse>;
683
+
684
+ /**
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.
686
+
687
+ */
688
+
89
689
  update_contact(customer_id:string, input?:UpdateContactInputParam):ChargebeeRequest<UpdateContactResponse>;
690
+
691
+ /**
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.
704
+
705
+ */
706
+
90
707
  update_hierarchy_settings(customer_id:string, input?:UpdateHierarchySettingsInputParam):ChargebeeRequest<UpdateHierarchySettingsResponse>;
708
+
709
+ /**
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;.
713
+
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.
715
+
716
+ */
717
+
91
718
  update_billing_info(customer_id:string, input?:UpdateBillingInfoInputParam):ChargebeeRequest<UpdateBillingInfoResponse>;
92
719
  }
93
- export interface DeleteResponse {
94
- customer:Customer;
95
- card?:Card;
720
+ export interface DeleteResponse {
721
+ /**
722
+ * @description Deletes a particular customer identified by the a unique identifier.
723
+
724
+ */
725
+
726
+ customer:Customer;
727
+
728
+ /**
729
+ * @description Deletes a particular customer identified by the a unique identifier.
730
+
731
+ */
732
+
733
+ card?:Card;
96
734
  }
97
735
  export interface DeleteInputParam {
736
+
737
+ /**
738
+ * @description Deletes the Payment Method from the gateway/vault.
739
+
740
+ */
741
+
98
742
  delete_payment_method?:boolean;
99
743
  }
100
- export interface RelationshipsResponse {
101
- customer:Customer;
744
+ export interface RelationshipsResponse {
745
+ /**
746
+ * @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.
747
+ **Note**
748
+
749
+ * 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).
750
+ * The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver&#x3D;2#mbe).
751
+
752
+ */
753
+
754
+ customer:Customer;
102
755
  }
103
756
  export interface RelationshipsInputParam {
757
+
758
+ /**
759
+ * @description The &#x60;id&#x60; of the customer which is to be set as the immediate parent.
760
+
761
+ */
762
+
104
763
  parent_id?:string;
764
+
765
+ /**
766
+ * @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;.
767
+
768
+ */
769
+
105
770
  payment_owner_id?:string;
771
+
772
+ /**
773
+ * @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.
774
+
775
+ */
776
+
106
777
  invoice_owner_id?:string;
778
+
779
+ /**
780
+ * @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:
781
+
782
+ * **Self-Serve Portal data:** subscriptions and invoices of the child.
783
+ * **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
784
+
785
+
786
+
787
+ **Usage:**
788
+
789
+ * 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
790
+ * 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.
791
+ .
792
+
793
+ */
794
+
107
795
  use_default_hierarchy_settings?:boolean;
796
+
797
+ /**
798
+ * @description Parameters for parent_account_access
799
+
800
+ */
801
+
108
802
  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};
803
+
804
+ /**
805
+ * @description Parameters for child_account_access
806
+
807
+ */
808
+
109
809
  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};
110
810
  }
111
- export interface DeleteRelationshipResponse {
112
- customer:Customer;
811
+ export interface DeleteRelationshipResponse {
812
+ /**
813
+ * @description Disconnects a child customer from its parent. &#x60;customer_id&#x60; is the [id](/docs/api/customers#customer_id) of the child.
814
+
815
+ */
816
+
817
+ customer:Customer;
113
818
  }
114
819
 
115
- export interface DeleteContactResponse {
116
- customer:Customer;
117
- card?:Card;
820
+ export interface DeleteContactResponse {
821
+ /**
822
+ * @description Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter.
823
+
824
+ */
825
+
826
+ customer:Customer;
827
+
828
+ /**
829
+ * @description Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter.
830
+
831
+ */
832
+
833
+ card?:Card;
118
834
  }
119
835
  export interface DeleteContactInputParam {
836
+
837
+ /**
838
+ * @description Parameters for contact
839
+
840
+ */
841
+
120
842
  contact?:{id:string};
121
843
  }
122
- export interface AssignPaymentRoleResponse {
123
- customer:Customer;
124
- payment_source:PaymentSource;
844
+ export interface AssignPaymentRoleResponse {
845
+ /**
846
+ * @description Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.
847
+
848
+ */
849
+
850
+ customer:Customer;
851
+
852
+ /**
853
+ * @description Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.
854
+
855
+ */
856
+
857
+ payment_source:PaymentSource;
125
858
  }
126
859
  export interface AssignPaymentRoleInputParam {
860
+
861
+ /**
862
+ * @description Payment source id this role will be assigned to.
863
+
864
+ */
865
+
127
866
  payment_source_id:string;
867
+
868
+ /**
869
+ * @description Indicates whether the payment source is Primary, Backup, or neither. \* backup - Backup \* none - None \* primary - Primary
870
+
871
+ */
872
+
128
873
  role:Role;
129
874
  }
130
- export interface MoveResponse {
131
- resource_migration:ResourceMigration;
875
+ export interface MoveResponse {
876
+ /**
877
+ * @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;.
878
+
879
+ */
880
+
881
+ resource_migration:ResourceMigration;
132
882
  }
133
883
  export interface MoveInputParam {
884
+
885
+ /**
886
+ * @description Id of the customer to be copied.
887
+
888
+ */
889
+
134
890
  id_at_from_site:string;
891
+
892
+ /**
893
+ * @description Name of the site from which this customer need to be copied.
894
+
895
+ */
896
+
135
897
  from_site:string;
136
898
  }
137
- export interface HierarchyResponse {
138
- hierarchies:Hierarchy[];
899
+ export interface HierarchyResponse {
900
+ /**
901
+ * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
902
+
903
+ */
904
+
905
+ hierarchies:Hierarchy[];
139
906
  }
140
907
  export interface HierarchyInputParam {
908
+
909
+ /**
910
+ * @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
911
+
912
+ */
913
+
141
914
  hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
142
915
  }
143
- export interface UpdatePaymentMethodResponse {
144
- customer:Customer;
145
- card?:Card;
916
+ export interface UpdatePaymentMethodResponse {
917
+ /**
918
+ * @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.
919
+
920
+ Updates payment method details for a customer.
921
+
922
+ **Note:** If you wish to pass the card number, CVV, or the single-use card tokens provided by gateways like Stripe, then use the [Update card for a customer](cards#update_card_for_a_customer) API under Cards resource. This API is not supported for Chargebee Test Gateway, it is provided to help you understand the billing workflow in Chargebee.
923
+
924
+ **PayPal Express Checkout**
925
+ You can use this API if you are directly integrating PayPal Express Checkout in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates his payment method using PayPal Express Checkout, you will be provided with the *Billing Agreement ID* by PayPal. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;paypal_express_checkout&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
926
+
927
+ **Login and Pay with Amazon**
928
+ You can use this API if you are directly integrating *Login and Pay with Amazon* in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates Amazon as a payment method, you will be provided with the *Billing Agreement ID* by Amazon. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;amazon_payments&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
929
+
930
+ **Card Payments**
931
+ When the card details of your customer are stored in the vault of gateways such as Stripe or Braintree, you can use this API to update the *reference id* provided by them in Chargebee. To use this API, pass
932
+
933
+ * &#x60;type&#x60; as &#x60;card&#x60;.
934
+ * &#x60;gateway&#x60; with the gateway associated with the card. If the gateway is not specified, the default gateway will be used.
935
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway/Spreedly to reference that specific card.
936
+
937
+ **Reference id format for Card Payments**
938
+ The format of reference_id will differ based on where the card is stored.
939
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Card ID separated by forward slash (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*). If you are passing Stripe Customer ID alone, then Chargebee will store the card marked as active for that customer in Stripe.
940
+
941
+ **Braintree:** In case of Braintree, the reference_id consists of combination of Braintree Customer ID and Braintree Payment Method Token separated by forward slash
942
+ (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G* ). If you are passing Braintree Customer ID alone, then Chargebee will store the card marked as default for that customer in Braintree.
943
+
944
+ **Spreedly Card vault:** If the card details are stored in Spreedly vault, then you need to provide the Spreedly token as &#x60;reference_id&#x60;.
945
+
946
+ **Direct Debit Payments**
947
+ When the bank account details of your customer are stored in the gateway vault, you can use this API to update the reference id provided by them in Chargebee. To use this API, pass
948
+
949
+ * &#x60;type&#x60; as &#x60;direct_debit&#x60;.
950
+ * &#x60;gateway&#x60; with the gateway where the bank account details are stored (e.g. *authorize_net*). If the gateway is not specified, the gateway supporting the direct debit will be used.
951
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway to reference the customer&#x27;s bank account details.
952
+ * &#x60;tmp_token&#x60; with the single use token provided by the gateway ( Should be passed only if reference_id is not passed ).
953
+
954
+ **Reference id format for Direct Debit Payments**
955
+ The format of reference_id will differ based on where the bank account is stored.
956
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Bank Account ID separated by forward slash
957
+ (e.g. *cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW*). If you are passing Stripe Customer ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Stripe.
958
+
959
+ **Authorize.Net:** The reference_id consists of combination of Authorize.Net&#x27;s Customer Profile ID and Payment Profile ID separated by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net&#x27;s Customer Profile ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Authorize.Net.
960
+
961
+ **GoCardless:** The reference_id is the GoCardless Customer Mandate ID (e.g. *MD0077Z99TTQXK*).
962
+
963
+ **Note:** While using this API to update payment method details, [Card Verification](https://www.chargebee.com/docs/cards.html#card-verification) will not happen even if it is enabled for that particular gateway.
964
+
965
+ */
966
+
967
+ customer:Customer;
968
+
969
+ /**
970
+ * @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.
971
+
972
+ Updates payment method details for a customer.
973
+
974
+ **Note:** If you wish to pass the card number, CVV, or the single-use card tokens provided by gateways like Stripe, then use the [Update card for a customer](cards#update_card_for_a_customer) API under Cards resource. This API is not supported for Chargebee Test Gateway, it is provided to help you understand the billing workflow in Chargebee.
975
+
976
+ **PayPal Express Checkout**
977
+ You can use this API if you are directly integrating PayPal Express Checkout in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates his payment method using PayPal Express Checkout, you will be provided with the *Billing Agreement ID* by PayPal. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;paypal_express_checkout&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
978
+
979
+ **Login and Pay with Amazon**
980
+ You can use this API if you are directly integrating *Login and Pay with Amazon* in your website instead of using Chargebee&#x27;s hosted pages. When your customer updates Amazon as a payment method, you will be provided with the *Billing Agreement ID* by Amazon. You can update the payment method for that customer in Chargebee by passing &#x60;type&#x60; as &#x60;amazon_payments&#x60; and &#x60;reference_id&#x60; with the *Billing Agreement ID*.
981
+
982
+ **Card Payments**
983
+ When the card details of your customer are stored in the vault of gateways such as Stripe or Braintree, you can use this API to update the *reference id* provided by them in Chargebee. To use this API, pass
984
+
985
+ * &#x60;type&#x60; as &#x60;card&#x60;.
986
+ * &#x60;gateway&#x60; with the gateway associated with the card. If the gateway is not specified, the default gateway will be used.
987
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway/Spreedly to reference that specific card.
988
+
989
+ **Reference id format for Card Payments**
990
+ The format of reference_id will differ based on where the card is stored.
991
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Card ID separated by forward slash (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*). If you are passing Stripe Customer ID alone, then Chargebee will store the card marked as active for that customer in Stripe.
992
+
993
+ **Braintree:** In case of Braintree, the reference_id consists of combination of Braintree Customer ID and Braintree Payment Method Token separated by forward slash
994
+ (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G* ). If you are passing Braintree Customer ID alone, then Chargebee will store the card marked as default for that customer in Braintree.
995
+
996
+ **Spreedly Card vault:** If the card details are stored in Spreedly vault, then you need to provide the Spreedly token as &#x60;reference_id&#x60;.
997
+
998
+ **Direct Debit Payments**
999
+ When the bank account details of your customer are stored in the gateway vault, you can use this API to update the reference id provided by them in Chargebee. To use this API, pass
1000
+
1001
+ * &#x60;type&#x60; as &#x60;direct_debit&#x60;.
1002
+ * &#x60;gateway&#x60; with the gateway where the bank account details are stored (e.g. *authorize_net*). If the gateway is not specified, the gateway supporting the direct debit will be used.
1003
+ * &#x60;reference_id&#x60; with the identifier provided by the gateway to reference the customer&#x27;s bank account details.
1004
+ * &#x60;tmp_token&#x60; with the single use token provided by the gateway ( Should be passed only if reference_id is not passed ).
1005
+
1006
+ **Reference id format for Direct Debit Payments**
1007
+ The format of reference_id will differ based on where the bank account is stored.
1008
+ **Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Bank Account ID separated by forward slash
1009
+ (e.g. *cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW*). If you are passing Stripe Customer ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Stripe.
1010
+
1011
+ **Authorize.Net:** The reference_id consists of combination of Authorize.Net&#x27;s Customer Profile ID and Payment Profile ID separated by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net&#x27;s Customer Profile ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Authorize.Net.
1012
+
1013
+ **GoCardless:** The reference_id is the GoCardless Customer Mandate ID (e.g. *MD0077Z99TTQXK*).
1014
+
1015
+ **Note:** While using this API to update payment method details, [Card Verification](https://www.chargebee.com/docs/cards.html#card-verification) will not happen even if it is enabled for that particular gateway.
1016
+
1017
+ */
1018
+
1019
+ card?:Card;
146
1020
  }
147
1021
  export interface UpdatePaymentMethodInputParam {
1022
+
1023
+ /**
1024
+ * @description Parameters for payment_method
1025
+
1026
+ */
1027
+
148
1028
  payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
149
1029
  }
150
- export interface RetrieveResponse {
151
- customer:Customer;
152
- card?:Card;
1030
+ export interface RetrieveResponse {
1031
+ /**
1032
+ * @description Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.
1033
+
1034
+ */
1035
+
1036
+ customer:Customer;
1037
+
1038
+ /**
1039
+ * @description Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.
1040
+
1041
+ */
1042
+
1043
+ card?:Card;
153
1044
  }
154
1045
 
155
- export interface UpdateResponse {
156
- customer:Customer;
157
- card?:Card;
1046
+ export interface UpdateResponse {
1047
+ /**
1048
+ * @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.
1049
+
1050
+ */
1051
+
1052
+ customer:Customer;
1053
+
1054
+ /**
1055
+ * @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.
1056
+
1057
+ */
1058
+
1059
+ card?:Card;
158
1060
  }
159
1061
  export interface UpdateInputParam {
160
- [key : string] : any;
1062
+ [key : string] : any;
1063
+ /**
1064
+ * @description First name of the customer.
1065
+
1066
+ */
1067
+
161
1068
  first_name?:string;
1069
+
1070
+ /**
1071
+ * @description Last name of the customer.
1072
+
1073
+ */
1074
+
162
1075
  last_name?:string;
1076
+
1077
+ /**
1078
+ * @description Email of the customer. Configured email notifications will be sent to this email.
1079
+
1080
+ */
1081
+
163
1082
  email?:string;
1083
+
1084
+ /**
1085
+ * @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
1086
+
1087
+ */
1088
+
164
1089
  preferred_currency_code?:string;
1090
+
1091
+ /**
1092
+ * @description Phone number of the customer.
1093
+
1094
+ */
1095
+
165
1096
  phone?:string;
1097
+
1098
+ /**
1099
+ * @description Company name of the customer.
1100
+
1101
+ */
1102
+
166
1103
  company?:string;
1104
+
1105
+ /**
1106
+ * @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.
1107
+
1108
+ */
1109
+
167
1110
  auto_collection?:AutoCollection;
1111
+
1112
+ /**
1113
+ * @description Whether the customer can pay via Direct Debit.
1114
+
1115
+ */
1116
+
168
1117
  allow_direct_debit?:boolean;
1118
+
1119
+ /**
1120
+ * @description The number of days within which the customer has to make payment for the invoice. .
1121
+
1122
+ */
1123
+
169
1124
  net_term_days?:number;
1125
+
1126
+ /**
1127
+ * @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 -
1128
+
1129
+ * Customer is exempted from tax. When using Chargebee&#x27;s native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.
1130
+ * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify &#x60;entity_code&#x60; or &#x60;exempt_number&#x60; attributes if you use Chargebee&#x27;s [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify &#x60;exemption_details&#x60; attribute if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of &#x60;entity_code&#x60;/&#x60;exempt_number&#x60;/&#x60;exemption_details&#x60; based on the state/region/province of the taxable address.
1131
+
1132
+ */
1133
+
170
1134
  taxability?:Taxability;
1135
+
1136
+ /**
1137
+ * @description Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
1138
+ To know more about what values you need to provide, refer to this [Avalara&#x27;s API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).
1139
+
1140
+ */
1141
+
171
1142
  exemption_details?:any[];
1143
+
1144
+ /**
1145
+ * @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
1146
+
1147
+ */
1148
+
172
1149
  customer_type?:CustomerType;
1150
+
1151
+ /**
1152
+ * @description Indicates the Client profile id for 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.
1153
+
1154
+ */
1155
+
173
1156
  client_profile_id?:string;
1157
+
1158
+ /**
1159
+ * @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
1160
+
1161
+ */
1162
+
174
1163
  taxjar_exemption_category?:TaxjarExemptionCategory;
1164
+
1165
+ /**
1166
+ * @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.
1167
+
1168
+ */
1169
+
175
1170
  locale?:string;
1171
+
1172
+ /**
1173
+ * @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
1174
+
1175
+ */
1176
+
176
1177
  entity_code?:EntityCode;
1178
+
1179
+ /**
1180
+ * @description Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee&#x27;s [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption).
1181
+
1182
+ */
1183
+
177
1184
  exempt_number?:string;
1185
+
1186
+ /**
1187
+ * @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
1188
+
1189
+ */
1190
+
178
1191
  offline_payment_method?:OfflinePaymentMethod;
1192
+
1193
+ /**
1194
+ * @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.
1195
+
1196
+ */
1197
+
179
1198
  invoice_notes?:string;
1199
+
1200
+ /**
1201
+ * @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.
1202
+
1203
+ */
1204
+
180
1205
  auto_close_invoices?:boolean;
1206
+
1207
+ /**
1208
+ * @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
1209
+
1210
+ */
1211
+
181
1212
  meta_data?:object;
1213
+
1214
+ /**
1215
+ * @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
1216
+
1217
+ */
1218
+
182
1219
  fraud_flag?:'safe' | 'fraudulent';
1220
+
1221
+ /**
1222
+ * @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.
1223
+ **Note:**
1224
+
1225
+ 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.
1226
+ .
1227
+
1228
+ */
1229
+
183
1230
  consolidated_invoicing?:boolean;
184
1231
  }
185
- export interface ChangeBillingDateResponse {
186
- customer:Customer;
1232
+ export interface ChangeBillingDateResponse {
1233
+ /**
1234
+ * @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*.
1235
+
1236
+ */
1237
+
1238
+ customer:Customer;
187
1239
  }
188
1240
  export interface ChangeBillingDateInputParam {
1241
+
1242
+ /**
1243
+ * @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.
1244
+
1245
+ */
1246
+
189
1247
  billing_date?:number;
1248
+
1249
+ /**
1250
+ * @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.
1251
+
1252
+ 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;.
1253
+ **Note**
1254
+
1255
+ 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;.
1256
+
1257
+ */
1258
+
190
1259
  billing_month?:number;
1260
+
1261
+ /**
1262
+ * @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.
1263
+
1264
+ */
1265
+
191
1266
  billing_date_mode?:BillingDateMode;
1267
+
1268
+ /**
1269
+ * @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
1270
+
1271
+ */
1272
+
192
1273
  billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
1274
+
1275
+ /**
1276
+ * @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.
1277
+
1278
+ */
1279
+
193
1280
  billing_day_of_week_mode?:BillingDayOfWeekMode;
194
1281
  }
195
- export interface ListResponse {
196
- list:{customer:Customer,card?:Card}[];
197
- next_offset?:string;
1282
+ export interface ListResponse {
1283
+ /**
1284
+ * @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.
1285
+
1286
+ */
1287
+
1288
+ list:{customer:Customer,card?:Card}[];
1289
+
1290
+ /**
1291
+ * @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.
1292
+
1293
+ */
1294
+
1295
+ next_offset?:string;
198
1296
  }
199
1297
  export interface ListInputParam {
200
- [key : string]: any;
1298
+ [key : string]: any;
1299
+ /**
1300
+ * @description The number of resources to be returned.
1301
+
1302
+ */
1303
+
201
1304
  limit?:number;
1305
+
1306
+ /**
1307
+ * @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.
1308
+
1309
+ */
1310
+
202
1311
  offset?:string;
1312
+
1313
+ /**
1314
+ * @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
1315
+
1316
+ */
1317
+
203
1318
  include_deleted?:boolean;
1319
+
1320
+ /**
1321
+ * @description Identifier of the customer.
1322
+
1323
+ */
1324
+
204
1325
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
1326
+
1327
+ /**
1328
+ * @description First name of the customer
1329
+
1330
+ */
1331
+
205
1332
  first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
1333
+
1334
+ /**
1335
+ * @description Last name of the customer
1336
+
1337
+ */
1338
+
206
1339
  last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
1340
+
1341
+ /**
1342
+ * @description Email of the customer. Configured email notifications will be sent to this email.
1343
+
1344
+ */
1345
+
207
1346
  email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
1347
+
1348
+ /**
1349
+ * @description Company name of the customer.
1350
+
1351
+ */
1352
+
208
1353
  company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
1354
+
1355
+ /**
1356
+ * @description Phone number of the customer
1357
+
1358
+ */
1359
+
209
1360
  phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
1361
+
1362
+ /**
1363
+ * @description Whether payments needs to be collected automatically for this customer
1364
+
1365
+ */
1366
+
210
1367
  auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string};
1368
+
1369
+ /**
1370
+ * @description Specifies if the customer is liable for tax
1371
+
1372
+ */
1373
+
211
1374
  taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string};
1375
+
1376
+ /**
1377
+ * @description Timestamp indicating when this customer resource is created.
1378
+
1379
+ */
1380
+
212
1381
  created_at?:{after?:string,before?:string,between?:string,on?:string};
1382
+
1383
+ /**
1384
+ * @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.
1385
+
1386
+ */
1387
+
213
1388
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
1389
+
1390
+ /**
1391
+ * @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.
1392
+ 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.
1393
+ **Note**
1394
+
1395
+ [Multiple Business Entities](/docs/api?prod_cat_ver&#x3D;2#mbe) is a feature available only on Product Catalog 2.0.
1396
+
1397
+ */
1398
+
214
1399
  business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
1400
+
1401
+ /**
1402
+ * @description The preferred offline payment method for the customer.
1403
+
1404
+ */
1405
+
215
1406
  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};
1407
+
1408
+ /**
1409
+ * @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.
1410
+
1411
+ */
1412
+
216
1413
  auto_close_invoices?:{is?:'true' | 'false'};
1414
+
1415
+ /**
1416
+ * @description The subscription channel this object originated from and is maintained in.
1417
+
1418
+ */
1419
+
217
1420
  channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
1421
+
1422
+ /**
1423
+ * @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.
1424
+
1425
+ */
1426
+
218
1427
  sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
1428
+
1429
+ /**
1430
+ * @description Parameters for relationship
1431
+
1432
+ */
1433
+
219
1434
  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}};
220
1435
  }
221
- export interface CreateResponse {
222
- customer:Customer;
223
- card?:Card;
1436
+ export interface CreateResponse {
1437
+ /**
1438
+ * @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.
1439
+
1440
+ 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.
1441
+
1442
+ 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:
1443
+
1444
+ Here&#x27;s some resources you can use to collect card information within your checkout form based on the payment gateway you use:
1445
+
1446
+ * [Stripe.js](https://stripe.com/docs/js) for Stripe users.
1447
+ * [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users.
1448
+ * [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/).
1449
+ * 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.
1450
+ * You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration.
1451
+
1452
+ 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).
1453
+
1454
+ **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.
1455
+
1456
+ */
1457
+
1458
+ customer:Customer;
1459
+
1460
+ /**
1461
+ * @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.
1462
+
1463
+ 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.
1464
+
1465
+ 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:
1466
+
1467
+ Here&#x27;s some resources you can use to collect card information within your checkout form based on the payment gateway you use:
1468
+
1469
+ * [Stripe.js](https://stripe.com/docs/js) for Stripe users.
1470
+ * [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users.
1471
+ * [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/).
1472
+ * 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.
1473
+ * You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration.
1474
+
1475
+ 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).
1476
+
1477
+ **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.
1478
+
1479
+ */
1480
+
1481
+ card?:Card;
224
1482
  }
225
1483
  export interface CreateInputParam {
226
- [key : string] : any;
1484
+ [key : string] : any;
1485
+ /**
1486
+ * @description Id for the new customer. If not given, this will be auto-generated.
1487
+
1488
+ */
1489
+
227
1490
  id?:string;
1491
+
1492
+ /**
1493
+ * @description First name of the customer.
1494
+
1495
+ */
1496
+
228
1497
  first_name?:string;
1498
+
1499
+ /**
1500
+ * @description Last name of the customer.
1501
+
1502
+ */
1503
+
229
1504
  last_name?:string;
1505
+
1506
+ /**
1507
+ * @description Email of the customer. Configured email notifications will be sent to this email.
1508
+
1509
+ */
1510
+
230
1511
  email?:string;
1512
+
1513
+ /**
1514
+ * @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
1515
+
1516
+ */
1517
+
231
1518
  preferred_currency_code?:string;
1519
+
1520
+ /**
1521
+ * @description Phone number of the customer.
1522
+
1523
+ */
1524
+
232
1525
  phone?:string;
1526
+
1527
+ /**
1528
+ * @description Company name of the customer.
1529
+
1530
+ */
1531
+
233
1532
  company?:string;
1533
+
1534
+ /**
1535
+ * @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.
1536
+
1537
+ */
1538
+
234
1539
  auto_collection?:AutoCollection;
1540
+
1541
+ /**
1542
+ * @description The number of days within which the customer has to make payment for the invoice. .
1543
+
1544
+ */
1545
+
235
1546
  net_term_days?:number;
1547
+
1548
+ /**
1549
+ * @description Whether the customer can pay via Direct Debit.
1550
+
1551
+ */
1552
+
236
1553
  allow_direct_debit?:boolean;
1554
+
1555
+ /**
1556
+ * @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
1557
+ number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
1558
+
1559
+ */
1560
+
237
1561
  vat_number?:string;
1562
+
1563
+ /**
1564
+ * @description An overridden value for the first two characters of the [full VAT
1565
+ 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** ).
1566
+
1567
+ When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
1568
+ 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
1569
+ 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.
1570
+
1571
+ */
1572
+
238
1573
  vat_number_prefix?:string;
1574
+
1575
+ /**
1576
+ * @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).
1577
+ **Tip:**
1578
+
1579
+
1580
+ 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.
1581
+ .
1582
+
1583
+ */
1584
+
239
1585
  entity_identifier_scheme?:string;
1586
+
1587
+ /**
1588
+ * @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.
1589
+ **Tip:**
1590
+
1591
+
1592
+ 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.
1593
+ .
1594
+
1595
+ */
1596
+
240
1597
  entity_identifier_standard?:string;
1598
+
1599
+ /**
1600
+ * @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.
1601
+
1602
+ */
1603
+
241
1604
  registered_for_gst?:boolean;
1605
+
1606
+ /**
1607
+ * @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.
1608
+ **Tip:**
1609
+
1610
+
1611
+ 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.
1612
+ .
1613
+
1614
+ */
1615
+
242
1616
  is_einvoice_enabled?:boolean;
1617
+
1618
+ /**
1619
+ * @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.
1620
+
1621
+ */
1622
+
243
1623
  einvoicing_method?:EinvoicingMethod;
1624
+
1625
+ /**
1626
+ * @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 -
1627
+
1628
+ * Customer is exempted from tax. When using Chargebee&#x27;s native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.
1629
+ * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify &#x60;entity_code&#x60; or &#x60;exempt_number&#x60; attributes if you use Chargebee&#x27;s [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify &#x60;exemption_details&#x60; attribute if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of &#x60;entity_code&#x60;/&#x60;exempt_number&#x60;/&#x60;exemption_details&#x60; based on the state/region/province of the taxable address.
1630
+
1631
+ */
1632
+
244
1633
  taxability?:Taxability;
1634
+
1635
+ /**
1636
+ * @description Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
1637
+ To know more about what values you need to provide, refer to this [Avalara&#x27;s API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).
1638
+
1639
+ */
1640
+
245
1641
  exemption_details?:any[];
1642
+
1643
+ /**
1644
+ * @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
1645
+
1646
+ */
1647
+
246
1648
  customer_type?:CustomerType;
1649
+
1650
+ /**
1651
+ * @description Indicates the Client profile id for 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.
1652
+
1653
+ */
1654
+
247
1655
  client_profile_id?:string;
1656
+
1657
+ /**
1658
+ * @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
1659
+
1660
+ */
1661
+
248
1662
  taxjar_exemption_category?:TaxjarExemptionCategory;
1663
+
1664
+ /**
1665
+ * @description Confirms that a customer is a valid business without an EU/UK VAT number.
1666
+
1667
+ */
1668
+
249
1669
  business_customer_without_vat_number?:boolean;
1670
+
1671
+ /**
1672
+ * @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.
1673
+
1674
+ */
1675
+
250
1676
  locale?:string;
1677
+
1678
+ /**
1679
+ * @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
1680
+
1681
+ */
1682
+
251
1683
  entity_code?:EntityCode;
1684
+
1685
+ /**
1686
+ * @description Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee&#x27;s [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption).
1687
+
1688
+ */
1689
+
252
1690
  exempt_number?:string;
1691
+
1692
+ /**
1693
+ * @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
1694
+
1695
+ */
1696
+
253
1697
  meta_data?:object;
1698
+
1699
+ /**
1700
+ * @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
1701
+
1702
+ */
1703
+
254
1704
  offline_payment_method?:OfflinePaymentMethod;
1705
+
1706
+ /**
1707
+ * @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.
1708
+
1709
+ */
1710
+
255
1711
  auto_close_invoices?:boolean;
1712
+
1713
+ /**
1714
+ * @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.
1715
+ **Note:**
1716
+
1717
+ 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.
1718
+ .
1719
+
1720
+ */
1721
+
256
1722
  consolidated_invoicing?:boolean;
1723
+
1724
+ /**
1725
+ * @description The Chargebee payment token generated by Chargebee JS.
1726
+
1727
+ */
1728
+
257
1729
  token_id?:string;
1730
+
1731
+ /**
1732
+ * @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.
1733
+ **Note**
1734
+
1735
+ 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).
1736
+ .
1737
+
1738
+ */
1739
+
258
1740
  business_entity_id?:string;
1741
+
1742
+ /**
1743
+ * @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.
1744
+
1745
+ */
1746
+
259
1747
  invoice_notes?:string;
1748
+
1749
+ /**
1750
+ * @description Parameters for card
1751
+
1752
+ */
1753
+
260
1754
  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};
1755
+
1756
+ /**
1757
+ * @description Parameters for bank_account
1758
+
1759
+ */
1760
+
261
1761
  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};
1762
+
1763
+ /**
1764
+ * @description Parameters for payment_method
1765
+
1766
+ */
1767
+
262
1768
  payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
1769
+
1770
+ /**
1771
+ * @description Parameters for payment_intent
1772
+
1773
+ */
1774
+
263
1775
  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};
1776
+
1777
+ /**
1778
+ * @description Parameters for billing_address
1779
+
1780
+ */
1781
+
264
1782
  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};
1783
+
1784
+ /**
1785
+ * @description Parameters for entity_identifiers
1786
+
1787
+ */
1788
+
265
1789
  entity_identifiers?:{id?:string,scheme?:string,standard?:string,value?:string}[];
266
1790
  }
267
- export interface AddContactResponse {
268
- customer:Customer;
269
- card?:Card;
1791
+ export interface AddContactResponse {
1792
+ /**
1793
+ * @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.
1794
+
1795
+ */
1796
+
1797
+ customer:Customer;
1798
+
1799
+ /**
1800
+ * @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.
1801
+
1802
+ */
1803
+
1804
+ card?:Card;
270
1805
  }
271
1806
  export interface AddContactInputParam {
1807
+
1808
+ /**
1809
+ * @description Parameters for contact
1810
+
1811
+ */
1812
+
272
1813
  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};
273
1814
  }
274
- export interface ContactsForCustomerResponse {
275
- list:{contact:Contact}[];
276
- next_offset?:string;
1815
+ export interface ContactsForCustomerResponse {
1816
+ /**
1817
+ * @description This API retrieves all the contacts for a customer.
1818
+
1819
+ */
1820
+
1821
+ list:{contact:Contact}[];
1822
+
1823
+ /**
1824
+ * @description This API retrieves all the contacts for a customer.
1825
+
1826
+ */
1827
+
1828
+ next_offset?:string;
277
1829
  }
278
1830
  export interface ContactsForCustomerInputParam {
279
- [key : string]: any;
1831
+ [key : string]: any;
1832
+ /**
1833
+ * @description The number of resources to be returned.
1834
+
1835
+ */
1836
+
280
1837
  limit?:number;
1838
+
1839
+ /**
1840
+ * @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.
1841
+
1842
+ */
1843
+
281
1844
  offset?:string;
282
1845
  }
283
- export interface ClearPersonalDataResponse {
284
- customer:Customer;
1846
+ export interface ClearPersonalDataResponse {
1847
+ /**
1848
+ * @description Clear personal details of a customer using this API.
1849
+
1850
+ */
1851
+
1852
+ customer:Customer;
285
1853
  }
286
1854
 
287
- export interface MergeResponse {
288
- customer:Customer;
1855
+ export interface MergeResponse {
1856
+ /**
1857
+ * @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.
1858
+ **Note**
1859
+
1860
+ * Moving virtual bank accounts from one customer to another is not supported in this API.
1861
+ * Merging customers from different [business entities](/docs/api?prod_cat_ver&#x3D;2#mbe) is not permitted.
1862
+
1863
+ */
1864
+
1865
+ customer:Customer;
289
1866
  }
290
1867
  export interface MergeInputParam {
1868
+
1869
+ /**
1870
+ * @description From customer id.
1871
+
1872
+ */
1873
+
291
1874
  from_customer_id:string;
1875
+
1876
+ /**
1877
+ * @description To customer id.
1878
+
1879
+ */
1880
+
292
1881
  to_customer_id:string;
293
1882
  }
294
- export interface CollectPaymentResponse {
295
- customer:Customer;
296
- transaction:Transaction;
1883
+ export interface CollectPaymentResponse {
1884
+ /**
1885
+ * @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.
1886
+
1887
+ This API can be used to collect the payments for customer&#x27;s **payment_due** and **not_paid** invoices. You can either choose to collect the payment from an existing payment source or a new payment source. You can choose to either retain or discard the new payment source, which is being used for payment. If the amount collected exceeds the invoice amount, the surplus will be counted in as excess payments.
1888
+
1889
+ */
1890
+
1891
+ customer:Customer;
1892
+
1893
+ /**
1894
+ * @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.
1895
+
1896
+ This API can be used to collect the payments for customer&#x27;s **payment_due** and **not_paid** invoices. You can either choose to collect the payment from an existing payment source or a new payment source. You can choose to either retain or discard the new payment source, which is being used for payment. If the amount collected exceeds the invoice amount, the surplus will be counted in as excess payments.
1897
+
1898
+ */
1899
+
1900
+ transaction:Transaction;
297
1901
  }
298
1902
  export interface CollectPaymentInputParam {
1903
+
1904
+ /**
1905
+ * @description Amount to be collected. If this parameter is not passed then the invoice(s) amount to collect will be collected.
1906
+
1907
+ */
1908
+
299
1909
  amount?:number;
1910
+
1911
+ /**
1912
+ * @description Payment source used for the payment.
1913
+
1914
+ */
1915
+
300
1916
  payment_source_id?:string;
1917
+
1918
+ /**
1919
+ * @description Token generated by Chargebee JS representing payment method details.
1920
+
1921
+ */
1922
+
301
1923
  token_id?:string;
1924
+
1925
+ /**
1926
+ * @description Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
1927
+
1928
+ */
1929
+
302
1930
  replace_primary_payment_source?:boolean;
1931
+
1932
+ /**
1933
+ * @description Indicates whether the payment source should be retained for the customer.
1934
+
1935
+ */
1936
+
303
1937
  retain_payment_source?:boolean;
304
- payment_initiator?:'merchant' | 'customer';
1938
+
1939
+ /**
1940
+ * @description null
1941
+
1942
+ */
1943
+
1944
+ payment_initiator?:PaymentInitiator;
1945
+
1946
+ /**
1947
+ * @description Parameters for payment_method
1948
+
1949
+ */
1950
+
305
1951
  payment_method?:{additional_information?:object,gateway_account_id?:string,reference_id?:string,tmp_token?:string,type?:Type};
1952
+
1953
+ /**
1954
+ * @description Parameters for card
1955
+
1956
+ */
1957
+
306
1958
  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};
1959
+
1960
+ /**
1961
+ * @description Parameters for payment_intent
1962
+
1963
+ */
1964
+
307
1965
  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};
1966
+
1967
+ /**
1968
+ * @description Parameters for invoice_allocations
1969
+
1970
+ */
1971
+
308
1972
  invoice_allocations?:{allocation_amount?:number,invoice_id:string}[];
309
1973
  }
310
- export interface RecordExcessPaymentResponse {
311
- customer:Customer;
312
- transaction:Transaction;
1974
+ export interface RecordExcessPaymentResponse {
1975
+ /**
1976
+ * @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.
1977
+
1978
+ */
1979
+
1980
+ customer:Customer;
1981
+
1982
+ /**
1983
+ * @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.
1984
+
1985
+ */
1986
+
1987
+ transaction:Transaction;
313
1988
  }
314
1989
  export interface RecordExcessPaymentInputParam {
1990
+
1991
+ /**
1992
+ * @description Remarks, if any, on the payment.
1993
+
1994
+ */
1995
+
315
1996
  comment?:string;
1997
+
1998
+ /**
1999
+ * @description Parameters for transaction
2000
+
2001
+ */
2002
+
316
2003
  transaction?:{amount:number,currency_code?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
317
2004
  }
318
- export interface UpdateContactResponse {
319
- customer:Customer;
320
- card?:Card;
2005
+ export interface UpdateContactResponse {
2006
+ /**
2007
+ * @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.
2008
+
2009
+ */
2010
+
2011
+ customer:Customer;
2012
+
2013
+ /**
2014
+ * @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.
2015
+
2016
+ */
2017
+
2018
+ card?:Card;
321
2019
  }
322
2020
  export interface UpdateContactInputParam {
2021
+
2022
+ /**
2023
+ * @description Parameters for contact
2024
+
2025
+ */
2026
+
323
2027
  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};
324
2028
  }
325
- export interface UpdateHierarchySettingsResponse {
326
- customer:Customer;
2029
+ export interface UpdateHierarchySettingsResponse {
2030
+ /**
2031
+ * @description Changes the level of access that the parent or the child itself has to the child&#x27;s information.
2032
+
2033
+ This data falls into two categories:
2034
+
2035
+ * **Self-Serve Portal data:** subscriptions and invoices of the child.
2036
+ * **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
2037
+
2038
+ 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.
2039
+
2040
+
2041
+
2042
+ **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.
2043
+
2044
+ */
2045
+
2046
+ customer:Customer;
327
2047
  }
328
2048
  export interface UpdateHierarchySettingsInputParam {
2049
+
2050
+ /**
2051
+ * @description Determines whether the site default settings are applied for the access levels.
2052
+
2053
+ * Value set to &#x60;true&#x60;: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
2054
+ * 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.
2055
+ .
2056
+
2057
+ */
2058
+
329
2059
  use_default_hierarchy_settings?:boolean;
2060
+
2061
+ /**
2062
+ * @description Parameters for parent_account_access
2063
+
2064
+ */
2065
+
330
2066
  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};
2067
+
2068
+ /**
2069
+ * @description Parameters for child_account_access
2070
+
2071
+ */
2072
+
331
2073
  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};
332
2074
  }
333
- export interface UpdateBillingInfoResponse {
334
- customer:Customer;
335
- card?:Card;
2075
+ export interface UpdateBillingInfoResponse {
2076
+ /**
2077
+ * @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).
2078
+
2079
+ 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;.
2080
+
2081
+ **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.
2082
+
2083
+ */
2084
+
2085
+ customer:Customer;
2086
+
2087
+ /**
2088
+ * @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).
2089
+
2090
+ 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;.
2091
+
2092
+ **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.
2093
+
2094
+ */
2095
+
2096
+ card?:Card;
336
2097
  }
337
2098
  export interface UpdateBillingInfoInputParam {
2099
+
2100
+ /**
2101
+ * @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
2102
+ number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
2103
+
2104
+ */
2105
+
338
2106
  vat_number?:string;
2107
+
2108
+ /**
2109
+ * @description An overridden value for the first two characters of the [full VAT
2110
+ 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** ).
2111
+
2112
+ When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
2113
+ 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
2114
+ 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.
2115
+
2116
+ */
2117
+
339
2118
  vat_number_prefix?:string;
2119
+
2120
+ /**
2121
+ * @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).
2122
+ **Tip:**
2123
+
2124
+
2125
+ 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.
2126
+ .
2127
+
2128
+ */
2129
+
340
2130
  entity_identifier_scheme?:string;
2131
+
2132
+ /**
2133
+ * @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.
2134
+ **Tip:**
2135
+
2136
+
2137
+ 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.
2138
+ .
2139
+
2140
+ */
2141
+
341
2142
  entity_identifier_standard?:string;
2143
+
2144
+ /**
2145
+ * @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.
2146
+
2147
+ */
2148
+
342
2149
  registered_for_gst?:boolean;
2150
+
2151
+ /**
2152
+ * @description Confirms that a customer is a valid business without an EU/UK VAT number.
2153
+
2154
+ */
2155
+
343
2156
  business_customer_without_vat_number?:boolean;
2157
+
2158
+ /**
2159
+ * @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.
2160
+ **Tip:**
2161
+
2162
+
2163
+ 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.
2164
+ .
2165
+
2166
+ */
2167
+
344
2168
  is_einvoice_enabled?:boolean;
2169
+
2170
+ /**
2171
+ * @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.
2172
+
2173
+ */
2174
+
345
2175
  einvoicing_method?:EinvoicingMethod;
2176
+
2177
+ /**
2178
+ * @description Parameters for billing_address
2179
+
2180
+ */
2181
+
346
2182
  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};
2183
+
2184
+ /**
2185
+ * @description Parameters for entity_identifiers
2186
+
2187
+ */
2188
+
347
2189
  entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
348
2190
  }
349
- export interface BillingAddress {
2191
+ export interface BillingAddress {
2192
+ /**
2193
+ * @description The first name of the billing contact.
2194
+
2195
+ */
2196
+
350
2197
  first_name?:string;
2198
+
2199
+ /**
2200
+ * @description The last name of the billing contact.
2201
+
2202
+ */
2203
+
351
2204
  last_name?:string;
2205
+
2206
+ /**
2207
+ * @description The email address.
2208
+
2209
+ */
2210
+
352
2211
  email?:string;
2212
+
2213
+ /**
2214
+ * @description The company name.
2215
+
2216
+ */
2217
+
353
2218
  company?:string;
2219
+
2220
+ /**
2221
+ * @description The phone number.
2222
+
2223
+ */
2224
+
354
2225
  phone?:string;
2226
+
2227
+ /**
2228
+ * @description Address line 1
2229
+
2230
+ */
2231
+
355
2232
  line1?:string;
2233
+
2234
+ /**
2235
+ * @description Address line 2
2236
+
2237
+ */
2238
+
356
2239
  line2?:string;
2240
+
2241
+ /**
2242
+ * @description Address line 3
2243
+
2244
+ */
2245
+
357
2246
  line3?:string;
2247
+
2248
+ /**
2249
+ * @description The name of the city.
2250
+
2251
+ */
2252
+
358
2253
  city?:string;
2254
+
2255
+ /**
2256
+ * @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set &#x60;state_code&#x60; as &#x60;AZ&#x60; (not &#x60;US-AZ&#x60;). For Tamil Nadu (India), set as &#x60;TN&#x60; (not &#x60;IN-TN&#x60;). For British Columbia (Canada), set as &#x60;BC&#x60; (not &#x60;CA-BC&#x60;).
2257
+
2258
+ */
2259
+
359
2260
  state_code?:string;
2261
+
2262
+ /**
2263
+ * @description State or Province
2264
+
2265
+ */
2266
+
360
2267
  state?:string;
2268
+
2269
+ /**
2270
+ * @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
2271
+
2272
+ **Note** : If you enter an invalid country code, the system will return an error.
2273
+
2274
+ **Brexit**
2275
+
2276
+
2277
+ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then &#x60;XI&#x60; (the code for **United Kingdom -- Northern Ireland**) is available as an option.
2278
+
2279
+ */
2280
+
361
2281
  country?:string;
2282
+
2283
+ /**
2284
+ * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
2285
+
2286
+ */
2287
+
362
2288
  zip?:string;
2289
+
2290
+ /**
2291
+ * @description The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
2292
+
2293
+ */
2294
+
363
2295
  validation_status?:ValidationStatus;
364
2296
  }
365
- export interface ReferralUrl {
2297
+ export interface ReferralUrl {
366
2298
  external_customer_id?:string;
2299
+
367
2300
  referral_sharing_url?:string;
2301
+
368
2302
  created_at?:number;
2303
+
369
2304
  updated_at?:number;
2305
+
370
2306
  referral_campaign_id?:string;
2307
+
371
2308
  referral_account_id?:string;
2309
+
372
2310
  referral_external_campaign_id?:string;
2311
+
373
2312
  referral_system?:'referral_candy' | 'friendbuy' | 'referral_saasquatch';
374
2313
  }
375
- export interface Contact {
2314
+ export interface Contact {
376
2315
  id?:string;
2316
+
377
2317
  first_name?:string;
2318
+
378
2319
  last_name?:string;
2320
+
379
2321
  email?:string;
2322
+
380
2323
  phone?:string;
2324
+
381
2325
  label?:string;
2326
+
382
2327
  enabled?:boolean;
2328
+
383
2329
  send_account_email?:boolean;
2330
+
384
2331
  send_billing_email?:boolean;
385
2332
  }
386
- export interface PaymentMethod {
2333
+ export interface PaymentMethod {
2334
+ /**
2335
+ * @description Type of payment source \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* wechat_pay - Payments made via WeChat Pay. \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.
2336
+
2337
+ */
2338
+
387
2339
  type?:Type;
2340
+
2341
+ /**
2342
+ * @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.
2343
+
2344
+ */
2345
+
388
2346
  gateway?:Gateway;
2347
+
2348
+ /**
2349
+ * @description The gateway account this payment method is stored with.
2350
+
2351
+ */
2352
+
389
2353
  gateway_account_id?:string;
2354
+
2355
+ /**
2356
+ * @description Current status of the payment source. \* expired - A payment source that has expired \* invalid - The billing agreement cannot be used. It might become valid again either automatically or due to customer action. \* valid - A payment source that is valid and active. \* pending_verification - The payment source needs to be verified \* expiring - A payment source that is expiring (like card&#x27;s status based on its expiry date).
2357
+
2358
+ */
2359
+
390
2360
  status?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
2361
+
2362
+ /**
2363
+ * @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.
2364
+ **Note:** This is not the one time temporary token provided by gateways like Stripe.
2365
+
2366
+ */
2367
+
391
2368
  reference_id?:string;
392
2369
  }
393
- export interface CustomerBalance {
2370
+ export interface CustomerBalance {
394
2371
  promotional_credits?:number;
2372
+
395
2373
  excess_payments?:number;
2374
+
396
2375
  refundable_credits?:number;
2376
+
397
2377
  unbilled_charges?:number;
2378
+
398
2379
  currency_code?:string;
399
2380
  }
400
- export interface EntityIdentifier {
2381
+ export interface EntityIdentifier {
401
2382
  id?:string;
2383
+
402
2384
  value?:string;
2385
+
403
2386
  scheme?:string;
2387
+
404
2388
  standard?:string;
405
2389
  }
406
- export interface Relationship {
2390
+ export interface Relationship {
2391
+ /**
2392
+ * @description The &#x60;id&#x60; of the customer who is the immediate parent.
2393
+
2394
+ */
2395
+
407
2396
  parent_id?:string;
2397
+
2398
+ /**
2399
+ * @description The &#x60;id&#x60; of the customer who pays the invoices for this customer. Can be the customer itself or the &#x60;invoice_owner_id&#x60;
2400
+
2401
+ */
2402
+
408
2403
  payment_owner_id?:string;
2404
+
2405
+ /**
2406
+ * @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.
2407
+
2408
+ */
2409
+
409
2410
  invoice_owner_id?:string;
410
2411
  }
411
- export interface ParentAccountAccess {
2412
+ export interface ParentAccountAccess {
2413
+ /**
2414
+ * @description Sets parent&#x27;s level of access to child subscriptions on the Self-Serve Portal. \* no - The parent account cannot view or edit the subscriptions of the child account. \* view_only - The parent account can only view the subscriptions of the child account. \* yes - The parent account can view and edit the subscriptions of the child account.
2415
+
2416
+ */
2417
+
412
2418
  portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only';
2419
+
2420
+ /**
2421
+ * @description Sets parent&#x27;s level of access to child invoices on the Self-Serve Portal. \* no - The parent account can neither view nor download the invoices of the child account. \* yes - The parent account can view and download the invoices of the child account. \* view_only - The parent account can only view the invoices of the child account.
2422
+
2423
+ */
2424
+
413
2425
  portal_download_child_invoices?:'no' | 'yes' | 'view_only';
2426
+
2427
+ /**
2428
+ * @description If &#x60;true&#x60;, the parent account will receive subscription-related emails sent to the child account.
2429
+
2430
+ */
2431
+
414
2432
  send_subscription_emails?:boolean;
2433
+
2434
+ /**
2435
+ * @description If &#x60;true&#x60;, the parent account will receive invoice-related emails sent to the child account.
2436
+
2437
+ */
2438
+
415
2439
  send_invoice_emails?:boolean;
2440
+
2441
+ /**
2442
+ * @description If &#x60;true&#x60;, the parent account will receive payment-related emails sent to the child account.
2443
+
2444
+ */
2445
+
416
2446
  send_payment_emails?:boolean;
417
2447
  }
418
- export interface ChildAccountAccess {
2448
+ export interface ChildAccountAccess {
2449
+ /**
2450
+ * @description Sets the child&#x27;s level of access to its own subscriptions on the Self-Serve Portal. \* yes - The child account can view and edit its own subscriptions. \* view_only - The child account can only view its own subscriptions.
2451
+
2452
+ */
2453
+
419
2454
  portal_edit_subscriptions?:'yes' | 'view_only';
2455
+
2456
+ /**
2457
+ * @description Sets the child&#x27;s level of access to its own invoices on the Self-Serve Portal. \* view_only - The child account can only view its invoices and not download them. \* yes - The child account can view and download its own invoices. \* no - The child account can neither view nor download its own invoices.
2458
+
2459
+ */
2460
+
420
2461
  portal_download_invoices?:'no' | 'yes' | 'view_only';
2462
+
2463
+ /**
2464
+ * @description If &#x60;true&#x60;, the child account will receive subscription-related emails for its own subscriptions.
2465
+
2466
+ */
2467
+
421
2468
  send_subscription_emails?:boolean;
2469
+
2470
+ /**
2471
+ * @description If &#x60;true&#x60;, the child account will receive invoice-related emails for its own invoices.
2472
+
2473
+ */
2474
+
422
2475
  send_invoice_emails?:boolean;
2476
+
2477
+ /**
2478
+ * @description If &#x60;true&#x60;, the child account will receive payment-related emails for its own invoices.
2479
+
2480
+ */
2481
+
423
2482
  send_payment_emails?:boolean;
424
2483
  }
425
2484
  }