chargebee 2.26.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +8 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +235 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +285 -13
- package/types/resources/Card.d.ts +375 -13
- package/types/resources/Comment.d.ts +160 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +628 -20
- package/types/resources/CouponCode.d.ts +46 -5
- package/types/resources/CouponSet.d.ts +194 -17
- package/types/resources/CreditNote.d.ts +1100 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +1819 -73
- package/types/resources/DifferentialPrice.d.ts +246 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1021 -27
- package/types/resources/Event.d.ts +138 -8
- package/types/resources/Export.d.ts +622 -32
- package/types/resources/Feature.d.ts +287 -22
- package/types/resources/Gift.d.ts +296 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1046 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +369 -9
- package/types/resources/Invoice.d.ts +1942 -92
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +522 -16
- package/types/resources/ItemEntitlement.d.ts +162 -13
- package/types/resources/ItemFamily.d.ts +153 -15
- package/types/resources/ItemPrice.d.ts +951 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +46 -3
- package/types/resources/Order.d.ts +1172 -32
- package/types/resources/PaymentIntent.d.ts +293 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +984 -55
- package/types/resources/PaymentVoucher.d.ts +252 -14
- package/types/resources/PortalSession.d.ts +154 -10
- package/types/resources/PromotionalCredit.d.ts +300 -16
- package/types/resources/Purchase.d.ts +206 -5
- package/types/resources/Quote.d.ts +1430 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +68 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +2564 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +82 -7
- package/types/resources/Token.d.ts +164 -7
- package/types/resources/Transaction.d.ts +567 -25
- package/types/resources/UnbilledCharge.d.ts +309 -14
- package/types/resources/Usage.d.ts +237 -13
- package/types/resources/VirtualBankAccount.d.ts +220 -17
|
@@ -2,424 +2,2170 @@
|
|
|
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 `customer_id` is the ID of the child in the relationship.
|
|
489
|
+
**Note**
|
|
490
|
+
|
|
491
|
+
* In the descriptions for `use_default_hierarchy_settings`, `parent_account_access`, and `child_account_access` parameters, the "parent" is the customer whose ID is [payment_owner_id](/docs/api/customers?prod_cat_ver=2#link_a_customer_payment_owner_id). However, if the `payment_owner_id` is set as the ID of the child itself (`{customer_id}`), then the "parent" is [parent_id](/docs/api/customers?prod_cat_ver=2#link_a_customer_parent_id).
|
|
492
|
+
* The parent and the child customers must belong to the same [business entity](/docs/api?prod_cat_ver=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. `customer_id` 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 `{site}`; whereas, the source site (the site from which the customer is copied) is specified by the query parameter `from_site`.
|
|
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'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 `type` as `paypal_express_checkout` and `reference_id` 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'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 `type` as `amazon_payments` and `reference_id` 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
|
+
* `type` as `card`.
|
|
550
|
+
* `gateway` with the gateway associated with the card. If the gateway is not specified, the default gateway will be used.
|
|
551
|
+
* `reference_id` 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 `reference_id`.
|
|
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
|
+
* `type` as `direct_debit`.
|
|
566
|
+
* `gateway` 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
|
+
* `reference_id` with the identifier provided by the gateway to reference the customer's bank account details.
|
|
568
|
+
* `tmp_token` 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's Customer Profile ID and Payment Profile ID separated by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net'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 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our [Update Billing Info](/docs/api/customers#update_billing_info_for_a_customer) API.
|
|
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'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=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's some resources you can use to collect card information within your checkout form based on the payment gateway you use:
|
|
621
|
+
|
|
622
|
+
* [Stripe.js](https://stripe.com/docs/js) for Stripe users.
|
|
623
|
+
* [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users.
|
|
624
|
+
* [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/).
|
|
625
|
+
* If you are using the Adyen gateway, you will have to use the Adyen's [Client-Side Encryption](https://docs.adyen.com/developers/features/client-side-encryption) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in `adyen.encrypted.data`as temp token in this API.
|
|
626
|
+
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration.
|
|
627
|
+
|
|
628
|
+
When billing address is not passed (say, for customers making offline payments), you can always provide it later using the [Update billing info for a customer API](/docs/api/customers#update_billing_info_for_a_customer).
|
|
629
|
+
|
|
630
|
+
**Note:**When an invoice is generated for a customer, the billing address provided for the customer is stored with the invoice. If the First Name, Last Name, and Company fields of the billing address do not contain any information, they're picked up from the customer details.
|
|
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'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=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'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'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 'parent' is the customer whose id is [payment_owner_id](/docs/api/customers#customer_relationship_payment_owner_id). However, if the `payment_owner_id` is the child itself, then the parent is [parent_id](/docs/api/customers#customer_relationship_parent_id). The path parameter `customer_id` is the [id](/docs/api/customers#customer_id) of the child in the relationship.
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
**Note:** This endpoint cannot be used to change the `parent_id`, `invoice_owner_id` or `payment_owner_id` for the customer. To change them, [delink](/docs/api/customers#delink_a_customer) the customer and then call **Link a customer** again.
|
|
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 `billing_address` and `vat_number` attributes of the `customer`. For updating the other customer attributes use [Update Customer API](customers#update_a_customer).
|
|
711
|
+
|
|
712
|
+
During this operation, if `billing_address` and `vat_number` are not already present, they're added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for `entity_identifiers[i]` when `entity_identifiers[operation][i]` is passed as `delete`.
|
|
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
|
-
|
|
95
|
-
|
|
720
|
+
export interface DeleteResponse {
|
|
721
|
+
customer:Customer;
|
|
722
|
+
|
|
723
|
+
card?:Card;
|
|
96
724
|
}
|
|
97
725
|
export interface DeleteInputParam {
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* @description Deletes the Payment Method from the gateway/vault.
|
|
729
|
+
|
|
730
|
+
*/
|
|
731
|
+
|
|
98
732
|
delete_payment_method?:boolean;
|
|
99
733
|
}
|
|
100
|
-
export interface RelationshipsResponse {
|
|
101
|
-
|
|
734
|
+
export interface RelationshipsResponse {
|
|
735
|
+
customer:Customer;
|
|
102
736
|
}
|
|
103
737
|
export interface RelationshipsInputParam {
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* @description The `id` of the customer which is to be set as the immediate parent.
|
|
741
|
+
|
|
742
|
+
*/
|
|
743
|
+
|
|
104
744
|
parent_id?:string;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @description The `id` of the customer who will pay the invoices for this customer. Can be the child itself or the `invoice_owner_id`.
|
|
748
|
+
|
|
749
|
+
*/
|
|
750
|
+
|
|
105
751
|
payment_owner_id?:string;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* @description The `id` of the customer who will be invoiced for charges incurred. Can be the child itself or any parent in its hierarchy.
|
|
755
|
+
|
|
756
|
+
*/
|
|
757
|
+
|
|
106
758
|
invoice_owner_id?:string;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* @description The level of access that the parent and the child itself have to the child's information can be set here. This data falls into two categories:
|
|
762
|
+
|
|
763
|
+
* **Self-Serve Portal data:** subscriptions and invoices of the child.
|
|
764
|
+
* **Email Notifications:** subscription-, invoice- and payment-related notifications for the child.
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
**Usage:**
|
|
769
|
+
|
|
770
|
+
* Value set to `true`: Applies the global access levels defined in the Account Hierarchy settings to this child. These global settings are configured in the admin console
|
|
771
|
+
* Value set to `false`: Customizes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the settings. If you skip passing any parameters, the global settings are applied for them.
|
|
772
|
+
.
|
|
773
|
+
|
|
774
|
+
*/
|
|
775
|
+
|
|
107
776
|
use_default_hierarchy_settings?:boolean;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @description Parameters for parent_account_access
|
|
780
|
+
|
|
781
|
+
*/
|
|
782
|
+
|
|
108
783
|
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* @description Parameters for child_account_access
|
|
787
|
+
|
|
788
|
+
*/
|
|
789
|
+
|
|
109
790
|
child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
110
791
|
}
|
|
111
|
-
export interface DeleteRelationshipResponse {
|
|
112
|
-
|
|
792
|
+
export interface DeleteRelationshipResponse {
|
|
793
|
+
customer:Customer;
|
|
113
794
|
}
|
|
114
795
|
|
|
115
|
-
export interface DeleteContactResponse {
|
|
116
|
-
|
|
117
|
-
|
|
796
|
+
export interface DeleteContactResponse {
|
|
797
|
+
customer:Customer;
|
|
798
|
+
|
|
799
|
+
card?:Card;
|
|
118
800
|
}
|
|
119
801
|
export interface DeleteContactInputParam {
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @description Parameters for contact
|
|
805
|
+
|
|
806
|
+
*/
|
|
807
|
+
|
|
120
808
|
contact?:{id:string};
|
|
121
809
|
}
|
|
122
|
-
export interface AssignPaymentRoleResponse {
|
|
123
|
-
|
|
124
|
-
|
|
810
|
+
export interface AssignPaymentRoleResponse {
|
|
811
|
+
customer:Customer;
|
|
812
|
+
|
|
813
|
+
payment_source:PaymentSource;
|
|
125
814
|
}
|
|
126
815
|
export interface AssignPaymentRoleInputParam {
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* @description Payment source id this role will be assigned to.
|
|
819
|
+
|
|
820
|
+
*/
|
|
821
|
+
|
|
127
822
|
payment_source_id:string;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* @description Indicates whether the payment source is Primary, Backup, or neither. \* backup - Backup \* none - None \* primary - Primary
|
|
826
|
+
|
|
827
|
+
*/
|
|
828
|
+
|
|
128
829
|
role:Role;
|
|
129
830
|
}
|
|
130
|
-
export interface MoveResponse {
|
|
131
|
-
|
|
831
|
+
export interface MoveResponse {
|
|
832
|
+
resource_migration:ResourceMigration;
|
|
132
833
|
}
|
|
133
834
|
export interface MoveInputParam {
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* @description Id of the customer to be copied.
|
|
838
|
+
|
|
839
|
+
*/
|
|
840
|
+
|
|
134
841
|
id_at_from_site:string;
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* @description Name of the site from which this customer need to be copied.
|
|
845
|
+
|
|
846
|
+
*/
|
|
847
|
+
|
|
135
848
|
from_site:string;
|
|
136
849
|
}
|
|
137
|
-
export interface HierarchyResponse {
|
|
138
|
-
|
|
850
|
+
export interface HierarchyResponse {
|
|
851
|
+
hierarchies:Hierarchy[];
|
|
139
852
|
}
|
|
140
853
|
export interface HierarchyInputParam {
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* @description Retrieves the [account hierarchy tree](/docs/api/hierarchies) for the customer.
|
|
857
|
+
|
|
858
|
+
*/
|
|
859
|
+
|
|
141
860
|
hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
|
|
142
861
|
}
|
|
143
|
-
export interface UpdatePaymentMethodResponse {
|
|
144
|
-
|
|
145
|
-
|
|
862
|
+
export interface UpdatePaymentMethodResponse {
|
|
863
|
+
customer:Customer;
|
|
864
|
+
|
|
865
|
+
card?:Card;
|
|
146
866
|
}
|
|
147
867
|
export interface UpdatePaymentMethodInputParam {
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* @description Parameters for payment_method
|
|
871
|
+
|
|
872
|
+
*/
|
|
873
|
+
|
|
148
874
|
payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
|
|
149
875
|
}
|
|
150
|
-
export interface RetrieveResponse {
|
|
151
|
-
|
|
152
|
-
|
|
876
|
+
export interface RetrieveResponse {
|
|
877
|
+
customer:Customer;
|
|
878
|
+
|
|
879
|
+
card?:Card;
|
|
153
880
|
}
|
|
154
881
|
|
|
155
|
-
export interface UpdateResponse {
|
|
156
|
-
|
|
157
|
-
|
|
882
|
+
export interface UpdateResponse {
|
|
883
|
+
customer:Customer;
|
|
884
|
+
|
|
885
|
+
card?:Card;
|
|
158
886
|
}
|
|
159
887
|
export interface UpdateInputParam {
|
|
160
|
-
[key : string] : any;
|
|
888
|
+
[key : string] : any;
|
|
889
|
+
/**
|
|
890
|
+
* @description First name of the customer.
|
|
891
|
+
|
|
892
|
+
*/
|
|
893
|
+
|
|
161
894
|
first_name?:string;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* @description Last name of the customer.
|
|
898
|
+
|
|
899
|
+
*/
|
|
900
|
+
|
|
162
901
|
last_name?:string;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* @description Email of the customer. Configured email notifications will be sent to this email.
|
|
905
|
+
|
|
906
|
+
*/
|
|
907
|
+
|
|
163
908
|
email?:string;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
|
|
912
|
+
|
|
913
|
+
*/
|
|
914
|
+
|
|
164
915
|
preferred_currency_code?:string;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* @description Phone number of the customer.
|
|
919
|
+
|
|
920
|
+
*/
|
|
921
|
+
|
|
165
922
|
phone?:string;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* @description Company name of the customer.
|
|
926
|
+
|
|
927
|
+
*/
|
|
928
|
+
|
|
166
929
|
company?:string;
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* @description Whether payments needs to be collected automatically for this customer. \* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline.
|
|
933
|
+
|
|
934
|
+
*/
|
|
935
|
+
|
|
167
936
|
auto_collection?:AutoCollection;
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* @description Whether the customer can pay via Direct Debit.
|
|
940
|
+
|
|
941
|
+
*/
|
|
942
|
+
|
|
168
943
|
allow_direct_debit?:boolean;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* @description The number of days within which the customer has to make payment for the invoice. .
|
|
947
|
+
|
|
948
|
+
*/
|
|
949
|
+
|
|
169
950
|
net_term_days?:number;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @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 -
|
|
954
|
+
|
|
955
|
+
* 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.
|
|
956
|
+
* 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.
|
|
957
|
+
|
|
958
|
+
*/
|
|
959
|
+
|
|
170
960
|
taxability?:Taxability;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* @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.
|
|
964
|
+
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/).
|
|
965
|
+
|
|
966
|
+
*/
|
|
967
|
+
|
|
171
968
|
exemption_details?:any[];
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \* 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
|
|
972
|
+
|
|
973
|
+
*/
|
|
974
|
+
|
|
172
975
|
customer_type?:CustomerType;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* @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.
|
|
979
|
+
|
|
980
|
+
*/
|
|
981
|
+
|
|
173
982
|
client_profile_id?:string;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* government - Government \* other - Other \* wholesale - Whole-sale
|
|
986
|
+
|
|
987
|
+
*/
|
|
988
|
+
|
|
174
989
|
taxjar_exemption_category?:TaxjarExemptionCategory;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* @description Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.
|
|
993
|
+
|
|
994
|
+
*/
|
|
995
|
+
|
|
175
996
|
locale?:string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* 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
|
|
1000
|
+
|
|
1001
|
+
*/
|
|
1002
|
+
|
|
176
1003
|
entity_code?:EntityCode;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* @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).
|
|
1007
|
+
|
|
1008
|
+
*/
|
|
1009
|
+
|
|
177
1010
|
exempt_number?:string;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* @description The preferred offline payment method for the customer. \* bank_transfer - Bank Transfer \* sepa_credit - SEPA Credit \* cash - Cash \* check - Check \* no_preference - No Preference \* ach_credit - ACH Credit
|
|
1014
|
+
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
178
1017
|
offline_payment_method?:OfflinePaymentMethod;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
1021
|
+
|
|
1022
|
+
*/
|
|
1023
|
+
|
|
179
1024
|
invoice_notes?:string;
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* @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.
|
|
1028
|
+
|
|
1029
|
+
*/
|
|
1030
|
+
|
|
180
1031
|
auto_close_invoices?:boolean;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
|
|
1035
|
+
|
|
1036
|
+
*/
|
|
1037
|
+
|
|
181
1038
|
meta_data?:object;
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* @description Indicates whether or not the customer has been identified as fraudulent. \* fraudulent - The customer has been marked as fraudulent \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe
|
|
1042
|
+
|
|
1043
|
+
*/
|
|
1044
|
+
|
|
182
1045
|
fraud_flag?:'safe' | 'fraudulent';
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* @description Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled.
|
|
1049
|
+
**Note:**
|
|
1050
|
+
|
|
1051
|
+
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.
|
|
1052
|
+
.
|
|
1053
|
+
|
|
1054
|
+
*/
|
|
1055
|
+
|
|
183
1056
|
consolidated_invoicing?:boolean;
|
|
184
1057
|
}
|
|
185
|
-
export interface ChangeBillingDateResponse {
|
|
186
|
-
|
|
1058
|
+
export interface ChangeBillingDateResponse {
|
|
1059
|
+
customer:Customer;
|
|
187
1060
|
}
|
|
188
1061
|
export interface ChangeBillingDateInputParam {
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the monthly and yearly subscriptions of this customer will be aligned to this date.
|
|
1065
|
+
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
189
1068
|
billing_date?:number;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* @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.
|
|
1072
|
+
|
|
1073
|
+
For example, the renewals happen on 15th July when `billing_month` is `7` and `billing_date` is `15`.
|
|
1074
|
+
**Note**
|
|
1075
|
+
|
|
1076
|
+
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`.
|
|
1077
|
+
|
|
1078
|
+
*/
|
|
1079
|
+
|
|
190
1080
|
billing_month?:number;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* @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.
|
|
1084
|
+
|
|
1085
|
+
*/
|
|
1086
|
+
|
|
191
1087
|
billing_date_mode?:BillingDateMode;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* @description Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the weekly subscriptions of this customer will be aligned to this week day. \* sunday - Sunday \* wednesday - Wednesday \* tuesday - Tuesday \* monday - Monday \* saturday - Saturday \* friday - Friday \* thursday - Thursday
|
|
1091
|
+
|
|
1092
|
+
*/
|
|
1093
|
+
|
|
192
1094
|
billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* @description Indicates whether this customer's *billing_day_of_week* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week* will not be reset even when all of the weekly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured.
|
|
1098
|
+
|
|
1099
|
+
*/
|
|
1100
|
+
|
|
193
1101
|
billing_day_of_week_mode?:BillingDayOfWeekMode;
|
|
194
1102
|
}
|
|
195
|
-
export interface ListResponse {
|
|
196
|
-
|
|
197
|
-
|
|
1103
|
+
export interface ListResponse {
|
|
1104
|
+
/**
|
|
1105
|
+
* @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.
|
|
1106
|
+
|
|
1107
|
+
*/
|
|
1108
|
+
|
|
1109
|
+
list:{customer:Customer,card?:Card}[];
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* @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.
|
|
1113
|
+
|
|
1114
|
+
*/
|
|
1115
|
+
|
|
1116
|
+
next_offset?:string;
|
|
198
1117
|
}
|
|
199
1118
|
export interface ListInputParam {
|
|
200
|
-
[key : string]: any;
|
|
1119
|
+
[key : string]: any;
|
|
1120
|
+
/**
|
|
1121
|
+
* @description The number of resources to be returned.
|
|
1122
|
+
|
|
1123
|
+
*/
|
|
1124
|
+
|
|
201
1125
|
limit?:number;
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
1129
|
+
|
|
1130
|
+
*/
|
|
1131
|
+
|
|
202
1132
|
offset?:string;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
1136
|
+
|
|
1137
|
+
*/
|
|
1138
|
+
|
|
203
1139
|
include_deleted?:boolean;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* @description Identifier of the customer.
|
|
1143
|
+
|
|
1144
|
+
*/
|
|
1145
|
+
|
|
204
1146
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* @description First name of the customer
|
|
1150
|
+
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
205
1153
|
first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* @description Last name of the customer
|
|
1157
|
+
|
|
1158
|
+
*/
|
|
1159
|
+
|
|
206
1160
|
last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* @description Email of the customer. Configured email notifications will be sent to this email.
|
|
1164
|
+
|
|
1165
|
+
*/
|
|
1166
|
+
|
|
207
1167
|
email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* @description Company name of the customer.
|
|
1171
|
+
|
|
1172
|
+
*/
|
|
1173
|
+
|
|
208
1174
|
company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* @description Phone number of the customer
|
|
1178
|
+
|
|
1179
|
+
*/
|
|
1180
|
+
|
|
209
1181
|
phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* @description Whether payments needs to be collected automatically for this customer
|
|
1185
|
+
|
|
1186
|
+
*/
|
|
1187
|
+
|
|
210
1188
|
auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string};
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* @description Specifies if the customer is liable for tax
|
|
1192
|
+
|
|
1193
|
+
*/
|
|
1194
|
+
|
|
211
1195
|
taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string};
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* @description Timestamp indicating when this customer resource is created.
|
|
1199
|
+
|
|
1200
|
+
*/
|
|
1201
|
+
|
|
212
1202
|
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* @description To filter based on `updated_at`. 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 `sort_by` input parameter as `updated_at` for a faster response.
|
|
1206
|
+
|
|
1207
|
+
*/
|
|
1208
|
+
|
|
213
1209
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* @description The unique ID of the [business entity](/docs/api?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.
|
|
1213
|
+
The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.
|
|
1214
|
+
**Note**
|
|
1215
|
+
|
|
1216
|
+
[Multiple Business Entities](/docs/api?prod_cat_ver=2#mbe) is a feature available only on Product Catalog 2.0.
|
|
1217
|
+
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
214
1220
|
business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* @description The preferred offline payment method for the customer.
|
|
1224
|
+
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
215
1227
|
offline_payment_method?:{in?:string,is?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',is_not?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',not_in?:string};
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* @description Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence.
|
|
1231
|
+
|
|
1232
|
+
*/
|
|
1233
|
+
|
|
216
1234
|
auto_close_invoices?:{is?:'true' | 'false'};
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* @description The subscription channel this object originated from and is maintained in.
|
|
1238
|
+
|
|
1239
|
+
*/
|
|
1240
|
+
|
|
217
1241
|
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* @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.
|
|
1245
|
+
|
|
1246
|
+
*/
|
|
1247
|
+
|
|
218
1248
|
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* @description Parameters for relationship
|
|
1252
|
+
|
|
1253
|
+
*/
|
|
1254
|
+
|
|
219
1255
|
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
1256
|
}
|
|
221
|
-
export interface CreateResponse {
|
|
222
|
-
|
|
223
|
-
|
|
1257
|
+
export interface CreateResponse {
|
|
1258
|
+
customer:Customer;
|
|
1259
|
+
|
|
1260
|
+
card?:Card;
|
|
224
1261
|
}
|
|
225
1262
|
export interface CreateInputParam {
|
|
226
|
-
[key : string] : any;
|
|
1263
|
+
[key : string] : any;
|
|
1264
|
+
/**
|
|
1265
|
+
* @description Id for the new customer. If not given, this will be auto-generated.
|
|
1266
|
+
|
|
1267
|
+
*/
|
|
1268
|
+
|
|
227
1269
|
id?:string;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* @description First name of the customer.
|
|
1273
|
+
|
|
1274
|
+
*/
|
|
1275
|
+
|
|
228
1276
|
first_name?:string;
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* @description Last name of the customer.
|
|
1280
|
+
|
|
1281
|
+
*/
|
|
1282
|
+
|
|
229
1283
|
last_name?:string;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* @description Email of the customer. Configured email notifications will be sent to this email.
|
|
1287
|
+
|
|
1288
|
+
*/
|
|
1289
|
+
|
|
230
1290
|
email?:string;
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* @description The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.
|
|
1294
|
+
|
|
1295
|
+
*/
|
|
1296
|
+
|
|
231
1297
|
preferred_currency_code?:string;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* @description Phone number of the customer.
|
|
1301
|
+
|
|
1302
|
+
*/
|
|
1303
|
+
|
|
232
1304
|
phone?:string;
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* @description Company name of the customer.
|
|
1308
|
+
|
|
1309
|
+
*/
|
|
1310
|
+
|
|
233
1311
|
company?:string;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* @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.
|
|
1315
|
+
|
|
1316
|
+
*/
|
|
1317
|
+
|
|
234
1318
|
auto_collection?:AutoCollection;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* @description The number of days within which the customer has to make payment for the invoice. .
|
|
1322
|
+
|
|
1323
|
+
*/
|
|
1324
|
+
|
|
235
1325
|
net_term_days?:number;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* @description Whether the customer can pay via Direct Debit.
|
|
1329
|
+
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
236
1332
|
allow_direct_debit?:boolean;
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* @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
|
|
1336
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
1337
|
+
|
|
1338
|
+
*/
|
|
1339
|
+
|
|
237
1340
|
vat_number?:string;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
1344
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
1345
|
+
|
|
1346
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1347
|
+
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
1348
|
+
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
1349
|
+
|
|
1350
|
+
*/
|
|
1351
|
+
|
|
238
1352
|
vat_number_prefix?:string;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `DE:VAT` is used for a German business entity while `DE:LWID45` is used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`. See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).
|
|
1356
|
+
**Tip:**
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1360
|
+
.
|
|
1361
|
+
|
|
1362
|
+
*/
|
|
1363
|
+
|
|
239
1364
|
entity_identifier_scheme?:string;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* @description The standard used for specifying the `entity_identifier_scheme`. Currently only `iso6523-actorid-upis` is supported and is used by default when not provided.
|
|
1368
|
+
**Tip:**
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1372
|
+
.
|
|
1373
|
+
|
|
1374
|
+
*/
|
|
1375
|
+
|
|
240
1376
|
entity_identifier_standard?:string;
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* @description Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site.
|
|
1380
|
+
|
|
1381
|
+
*/
|
|
1382
|
+
|
|
241
1383
|
registered_for_gst?:boolean;
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* @description Determines whether the customer is e-invoiced. When set to `true` or not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`). When set to `false`, the customer is not e-invoiced even if e-invoicing is enabled for their country.
|
|
1387
|
+
**Tip:**
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
1391
|
+
.
|
|
1392
|
+
|
|
1393
|
+
*/
|
|
1394
|
+
|
|
242
1395
|
is_einvoice_enabled?:boolean;
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* @description Determines whether to send an e-invoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level.
|
|
1399
|
+
|
|
1400
|
+
*/
|
|
1401
|
+
|
|
243
1402
|
einvoicing_method?:EinvoicingMethod;
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* @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 -
|
|
1406
|
+
|
|
1407
|
+
* 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.
|
|
1408
|
+
* 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.
|
|
1409
|
+
|
|
1410
|
+
*/
|
|
1411
|
+
|
|
244
1412
|
taxability?:Taxability;
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* @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.
|
|
1416
|
+
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/).
|
|
1417
|
+
|
|
1418
|
+
*/
|
|
1419
|
+
|
|
245
1420
|
exemption_details?:any[];
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* @description Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* 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
|
|
1424
|
+
|
|
1425
|
+
*/
|
|
1426
|
+
|
|
246
1427
|
customer_type?:CustomerType;
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* @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.
|
|
1431
|
+
|
|
1432
|
+
*/
|
|
1433
|
+
|
|
247
1434
|
client_profile_id?:string;
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* @description Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* other - Other \* government - Government \* wholesale - Whole-sale
|
|
1438
|
+
|
|
1439
|
+
*/
|
|
1440
|
+
|
|
248
1441
|
taxjar_exemption_category?:TaxjarExemptionCategory;
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* @description Confirms that a customer is a valid business without an EU/UK VAT number.
|
|
1445
|
+
|
|
1446
|
+
*/
|
|
1447
|
+
|
|
249
1448
|
business_customer_without_vat_number?:boolean;
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* @description Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.
|
|
1452
|
+
|
|
1453
|
+
*/
|
|
1454
|
+
|
|
250
1455
|
locale?:string;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* @description The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* 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
|
|
1459
|
+
|
|
1460
|
+
*/
|
|
1461
|
+
|
|
251
1462
|
entity_code?:EntityCode;
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* @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).
|
|
1466
|
+
|
|
1467
|
+
*/
|
|
1468
|
+
|
|
252
1469
|
exempt_number?:string;
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* @description A set of key-value pairs stored as additional information for the customer. [Learn more](./#meta_data).
|
|
1473
|
+
|
|
1474
|
+
*/
|
|
1475
|
+
|
|
253
1476
|
meta_data?:object;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* @description The preferred offline payment method for the customer. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* boleto - Boleto \* check - Check \* ach_credit - ACH Credit
|
|
1480
|
+
|
|
1481
|
+
*/
|
|
1482
|
+
|
|
254
1483
|
offline_payment_method?:OfflinePaymentMethod;
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* @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.
|
|
1487
|
+
|
|
1488
|
+
*/
|
|
1489
|
+
|
|
255
1490
|
auto_close_invoices?:boolean;
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* @description Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled.
|
|
1494
|
+
**Note:**
|
|
1495
|
+
|
|
1496
|
+
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.
|
|
1497
|
+
.
|
|
1498
|
+
|
|
1499
|
+
*/
|
|
1500
|
+
|
|
256
1501
|
consolidated_invoicing?:boolean;
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* @description The Chargebee payment token generated by Chargebee JS.
|
|
1505
|
+
|
|
1506
|
+
*/
|
|
1507
|
+
|
|
257
1508
|
token_id?:string;
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* @description The unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe) this customer should be [linked](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-linked-be) to. Applicable only when multiple business entities have been created for the site. When not provided, the customer is linked to the [default business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-default-be) defined for the site.
|
|
1512
|
+
**Note**
|
|
1513
|
+
|
|
1514
|
+
An alternative way of passing this parameter is by means of a [custom HTTP header](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).
|
|
1515
|
+
.
|
|
1516
|
+
|
|
1517
|
+
*/
|
|
1518
|
+
|
|
258
1519
|
business_entity_id?:string;
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* @description A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF.
|
|
1523
|
+
|
|
1524
|
+
*/
|
|
1525
|
+
|
|
259
1526
|
invoice_notes?:string;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* @description Parameters for card
|
|
1530
|
+
|
|
1531
|
+
*/
|
|
1532
|
+
|
|
260
1533
|
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* @description Parameters for bank_account
|
|
1537
|
+
|
|
1538
|
+
*/
|
|
1539
|
+
|
|
261
1540
|
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,issuing_country?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* @description Parameters for payment_method
|
|
1544
|
+
|
|
1545
|
+
*/
|
|
1546
|
+
|
|
262
1547
|
payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* @description Parameters for payment_intent
|
|
1551
|
+
|
|
1552
|
+
*/
|
|
1553
|
+
|
|
263
1554
|
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* @description Parameters for billing_address
|
|
1558
|
+
|
|
1559
|
+
*/
|
|
1560
|
+
|
|
264
1561
|
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* @description Parameters for entity_identifiers
|
|
1565
|
+
|
|
1566
|
+
*/
|
|
1567
|
+
|
|
265
1568
|
entity_identifiers?:{id?:string,scheme?:string,standard?:string,value?:string}[];
|
|
266
1569
|
}
|
|
267
|
-
export interface AddContactResponse {
|
|
268
|
-
|
|
269
|
-
|
|
1570
|
+
export interface AddContactResponse {
|
|
1571
|
+
customer:Customer;
|
|
1572
|
+
|
|
1573
|
+
card?:Card;
|
|
270
1574
|
}
|
|
271
1575
|
export interface AddContactInputParam {
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* @description Parameters for contact
|
|
1579
|
+
|
|
1580
|
+
*/
|
|
1581
|
+
|
|
272
1582
|
contact?:{email:string,enabled?:boolean,first_name?:string,id?:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
|
|
273
1583
|
}
|
|
274
|
-
export interface ContactsForCustomerResponse {
|
|
275
|
-
|
|
276
|
-
|
|
1584
|
+
export interface ContactsForCustomerResponse {
|
|
1585
|
+
/**
|
|
1586
|
+
* @description This API retrieves all the contacts for a customer.
|
|
1587
|
+
|
|
1588
|
+
*/
|
|
1589
|
+
|
|
1590
|
+
list:{contact:Contact}[];
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* @description This API retrieves all the contacts for a customer.
|
|
1594
|
+
|
|
1595
|
+
*/
|
|
1596
|
+
|
|
1597
|
+
next_offset?:string;
|
|
277
1598
|
}
|
|
278
1599
|
export interface ContactsForCustomerInputParam {
|
|
279
|
-
[key : string]: any;
|
|
1600
|
+
[key : string]: any;
|
|
1601
|
+
/**
|
|
1602
|
+
* @description The number of resources to be returned.
|
|
1603
|
+
|
|
1604
|
+
*/
|
|
1605
|
+
|
|
280
1606
|
limit?:number;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
1610
|
+
|
|
1611
|
+
*/
|
|
1612
|
+
|
|
281
1613
|
offset?:string;
|
|
282
1614
|
}
|
|
283
|
-
export interface ClearPersonalDataResponse {
|
|
284
|
-
|
|
1615
|
+
export interface ClearPersonalDataResponse {
|
|
1616
|
+
customer:Customer;
|
|
285
1617
|
}
|
|
286
1618
|
|
|
287
|
-
export interface MergeResponse {
|
|
288
|
-
|
|
1619
|
+
export interface MergeResponse {
|
|
1620
|
+
customer:Customer;
|
|
289
1621
|
}
|
|
290
1622
|
export interface MergeInputParam {
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* @description From customer id.
|
|
1626
|
+
|
|
1627
|
+
*/
|
|
1628
|
+
|
|
291
1629
|
from_customer_id:string;
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* @description To customer id.
|
|
1633
|
+
|
|
1634
|
+
*/
|
|
1635
|
+
|
|
292
1636
|
to_customer_id:string;
|
|
293
1637
|
}
|
|
294
|
-
export interface CollectPaymentResponse {
|
|
295
|
-
|
|
296
|
-
|
|
1638
|
+
export interface CollectPaymentResponse {
|
|
1639
|
+
customer:Customer;
|
|
1640
|
+
|
|
1641
|
+
transaction:Transaction;
|
|
297
1642
|
}
|
|
298
1643
|
export interface CollectPaymentInputParam {
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* @description Amount to be collected. If this parameter is not passed then the invoice(s) amount to collect will be collected.
|
|
1647
|
+
|
|
1648
|
+
*/
|
|
1649
|
+
|
|
299
1650
|
amount?:number;
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* @description Payment source used for the payment.
|
|
1654
|
+
|
|
1655
|
+
*/
|
|
1656
|
+
|
|
300
1657
|
payment_source_id?:string;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* @description Token generated by Chargebee JS representing payment method details.
|
|
1661
|
+
|
|
1662
|
+
*/
|
|
1663
|
+
|
|
301
1664
|
token_id?:string;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* @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.
|
|
1668
|
+
|
|
1669
|
+
*/
|
|
1670
|
+
|
|
302
1671
|
replace_primary_payment_source?:boolean;
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* @description Indicates whether the payment source should be retained for the customer.
|
|
1675
|
+
|
|
1676
|
+
*/
|
|
1677
|
+
|
|
303
1678
|
retain_payment_source?:boolean;
|
|
304
|
-
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* @description null
|
|
1682
|
+
|
|
1683
|
+
*/
|
|
1684
|
+
|
|
1685
|
+
payment_initiator?:PaymentInitiator;
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* @description Parameters for payment_method
|
|
1689
|
+
|
|
1690
|
+
*/
|
|
1691
|
+
|
|
305
1692
|
payment_method?:{additional_information?:object,gateway_account_id?:string,reference_id?:string,tmp_token?:string,type?:Type};
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* @description Parameters for card
|
|
1696
|
+
|
|
1697
|
+
*/
|
|
1698
|
+
|
|
306
1699
|
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};
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* @description Parameters for payment_intent
|
|
1703
|
+
|
|
1704
|
+
*/
|
|
1705
|
+
|
|
307
1706
|
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* @description Parameters for invoice_allocations
|
|
1710
|
+
|
|
1711
|
+
*/
|
|
1712
|
+
|
|
308
1713
|
invoice_allocations?:{allocation_amount?:number,invoice_id:string}[];
|
|
309
1714
|
}
|
|
310
|
-
export interface RecordExcessPaymentResponse {
|
|
311
|
-
|
|
312
|
-
|
|
1715
|
+
export interface RecordExcessPaymentResponse {
|
|
1716
|
+
customer:Customer;
|
|
1717
|
+
|
|
1718
|
+
transaction:Transaction;
|
|
313
1719
|
}
|
|
314
1720
|
export interface RecordExcessPaymentInputParam {
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* @description Remarks, if any, on the payment.
|
|
1724
|
+
|
|
1725
|
+
*/
|
|
1726
|
+
|
|
315
1727
|
comment?:string;
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* @description Parameters for transaction
|
|
1731
|
+
|
|
1732
|
+
*/
|
|
1733
|
+
|
|
316
1734
|
transaction?:{amount:number,currency_code?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
317
1735
|
}
|
|
318
|
-
export interface UpdateContactResponse {
|
|
319
|
-
|
|
320
|
-
|
|
1736
|
+
export interface UpdateContactResponse {
|
|
1737
|
+
customer:Customer;
|
|
1738
|
+
|
|
1739
|
+
card?:Card;
|
|
321
1740
|
}
|
|
322
1741
|
export interface UpdateContactInputParam {
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* @description Parameters for contact
|
|
1745
|
+
|
|
1746
|
+
*/
|
|
1747
|
+
|
|
323
1748
|
contact?:{email?:string,enabled?:boolean,first_name?:string,id:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
|
|
324
1749
|
}
|
|
325
|
-
export interface UpdateHierarchySettingsResponse {
|
|
326
|
-
|
|
1750
|
+
export interface UpdateHierarchySettingsResponse {
|
|
1751
|
+
customer:Customer;
|
|
327
1752
|
}
|
|
328
1753
|
export interface UpdateHierarchySettingsInputParam {
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* @description Determines whether the site default settings are applied for the access levels.
|
|
1757
|
+
|
|
1758
|
+
* Value set to `true`: Removes any customized access levels for the customer. The global settings configured in the admin console now apply.
|
|
1759
|
+
* Value set to `false`: Changes the access levels for this customer. Pass the `parent_account_access` and `child_account_access` parameters to specify the new settings. If you skip passing any parameters, they will remain unchanged.
|
|
1760
|
+
.
|
|
1761
|
+
|
|
1762
|
+
*/
|
|
1763
|
+
|
|
329
1764
|
use_default_hierarchy_settings?:boolean;
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* @description Parameters for parent_account_access
|
|
1768
|
+
|
|
1769
|
+
*/
|
|
1770
|
+
|
|
330
1771
|
parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* @description Parameters for child_account_access
|
|
1775
|
+
|
|
1776
|
+
*/
|
|
1777
|
+
|
|
331
1778
|
child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
|
|
332
1779
|
}
|
|
333
|
-
export interface UpdateBillingInfoResponse {
|
|
334
|
-
|
|
335
|
-
|
|
1780
|
+
export interface UpdateBillingInfoResponse {
|
|
1781
|
+
customer:Customer;
|
|
1782
|
+
|
|
1783
|
+
card?:Card;
|
|
336
1784
|
}
|
|
337
1785
|
export interface UpdateBillingInfoInputParam {
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* @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
|
|
1789
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix).
|
|
1790
|
+
|
|
1791
|
+
*/
|
|
1792
|
+
|
|
338
1793
|
vat_number?:string;
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
1797
|
+
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
1798
|
+
|
|
1799
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1800
|
+
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
1801
|
+
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
1802
|
+
|
|
1803
|
+
*/
|
|
1804
|
+
|
|
339
1805
|
vat_number_prefix?:string;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* @description The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number) of the customer. This helps identify the specific type of customer entity. For example, `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).
|
|
1809
|
+
**Tip:**
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1813
|
+
.
|
|
1814
|
+
|
|
1815
|
+
*/
|
|
1816
|
+
|
|
340
1817
|
entity_identifier_scheme?:string;
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* @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.
|
|
1821
|
+
**Tip:**
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
If there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.
|
|
1825
|
+
.
|
|
1826
|
+
|
|
1827
|
+
*/
|
|
1828
|
+
|
|
341
1829
|
entity_identifier_standard?:string;
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* @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.
|
|
1833
|
+
|
|
1834
|
+
*/
|
|
1835
|
+
|
|
342
1836
|
registered_for_gst?:boolean;
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* @description Confirms that a customer is a valid business without an EU/UK VAT number.
|
|
1840
|
+
|
|
1841
|
+
*/
|
|
1842
|
+
|
|
343
1843
|
business_customer_without_vat_number?:boolean;
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* @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.
|
|
1847
|
+
**Tip:**
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
It is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.
|
|
1851
|
+
.
|
|
1852
|
+
|
|
1853
|
+
*/
|
|
1854
|
+
|
|
344
1855
|
is_einvoice_enabled?:boolean;
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
* @description Determines whether to send einvoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level.
|
|
1859
|
+
|
|
1860
|
+
*/
|
|
1861
|
+
|
|
345
1862
|
einvoicing_method?:EinvoicingMethod;
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* @description Parameters for billing_address
|
|
1866
|
+
|
|
1867
|
+
*/
|
|
1868
|
+
|
|
346
1869
|
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* @description Parameters for entity_identifiers
|
|
1873
|
+
|
|
1874
|
+
*/
|
|
1875
|
+
|
|
347
1876
|
entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
|
|
348
1877
|
}
|
|
349
|
-
export interface BillingAddress {
|
|
1878
|
+
export interface BillingAddress {
|
|
1879
|
+
/**
|
|
1880
|
+
* @description The first name of the billing contact.
|
|
1881
|
+
|
|
1882
|
+
*/
|
|
1883
|
+
|
|
350
1884
|
first_name?:string;
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* @description The last name of the billing contact.
|
|
1888
|
+
|
|
1889
|
+
*/
|
|
1890
|
+
|
|
351
1891
|
last_name?:string;
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* @description The email address.
|
|
1895
|
+
|
|
1896
|
+
*/
|
|
1897
|
+
|
|
352
1898
|
email?:string;
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* @description The company name.
|
|
1902
|
+
|
|
1903
|
+
*/
|
|
1904
|
+
|
|
353
1905
|
company?:string;
|
|
1906
|
+
|
|
1907
|
+
/**
|
|
1908
|
+
* @description The phone number.
|
|
1909
|
+
|
|
1910
|
+
*/
|
|
1911
|
+
|
|
354
1912
|
phone?:string;
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* @description Address line 1
|
|
1916
|
+
|
|
1917
|
+
*/
|
|
1918
|
+
|
|
355
1919
|
line1?:string;
|
|
1920
|
+
|
|
1921
|
+
/**
|
|
1922
|
+
* @description Address line 2
|
|
1923
|
+
|
|
1924
|
+
*/
|
|
1925
|
+
|
|
356
1926
|
line2?:string;
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* @description Address line 3
|
|
1930
|
+
|
|
1931
|
+
*/
|
|
1932
|
+
|
|
357
1933
|
line3?:string;
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* @description The name of the city.
|
|
1937
|
+
|
|
1938
|
+
*/
|
|
1939
|
+
|
|
358
1940
|
city?:string;
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* @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 `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
1944
|
+
|
|
1945
|
+
*/
|
|
1946
|
+
|
|
359
1947
|
state_code?:string;
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* @description State or Province
|
|
1951
|
+
|
|
1952
|
+
*/
|
|
1953
|
+
|
|
360
1954
|
state?:string;
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* @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).
|
|
1958
|
+
|
|
1959
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1960
|
+
|
|
1961
|
+
**Brexit**
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
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 `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
1965
|
+
|
|
1966
|
+
*/
|
|
1967
|
+
|
|
361
1968
|
country?:string;
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1972
|
+
|
|
1973
|
+
*/
|
|
1974
|
+
|
|
362
1975
|
zip?:string;
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* @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.
|
|
1979
|
+
|
|
1980
|
+
*/
|
|
1981
|
+
|
|
363
1982
|
validation_status?:ValidationStatus;
|
|
364
1983
|
}
|
|
365
|
-
export interface ReferralUrl {
|
|
1984
|
+
export interface ReferralUrl {
|
|
366
1985
|
external_customer_id?:string;
|
|
1986
|
+
|
|
367
1987
|
referral_sharing_url?:string;
|
|
1988
|
+
|
|
368
1989
|
created_at?:number;
|
|
1990
|
+
|
|
369
1991
|
updated_at?:number;
|
|
1992
|
+
|
|
370
1993
|
referral_campaign_id?:string;
|
|
1994
|
+
|
|
371
1995
|
referral_account_id?:string;
|
|
1996
|
+
|
|
372
1997
|
referral_external_campaign_id?:string;
|
|
1998
|
+
|
|
373
1999
|
referral_system?:'referral_candy' | 'friendbuy' | 'referral_saasquatch';
|
|
374
2000
|
}
|
|
375
|
-
export interface Contact {
|
|
2001
|
+
export interface Contact {
|
|
376
2002
|
id?:string;
|
|
2003
|
+
|
|
377
2004
|
first_name?:string;
|
|
2005
|
+
|
|
378
2006
|
last_name?:string;
|
|
2007
|
+
|
|
379
2008
|
email?:string;
|
|
2009
|
+
|
|
380
2010
|
phone?:string;
|
|
2011
|
+
|
|
381
2012
|
label?:string;
|
|
2013
|
+
|
|
382
2014
|
enabled?:boolean;
|
|
2015
|
+
|
|
383
2016
|
send_account_email?:boolean;
|
|
2017
|
+
|
|
384
2018
|
send_billing_email?:boolean;
|
|
385
2019
|
}
|
|
386
|
-
export interface PaymentMethod {
|
|
2020
|
+
export interface PaymentMethod {
|
|
2021
|
+
/**
|
|
2022
|
+
* @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.
|
|
2023
|
+
|
|
2024
|
+
*/
|
|
2025
|
+
|
|
387
2026
|
type?:Type;
|
|
2027
|
+
|
|
2028
|
+
/**
|
|
2029
|
+
* @description Name of the gateway the payment method is associated with. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* sage_pay - Sage Pay is a payment gateway. \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* migs - MasterCard Internet Gateway Service payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* adyen - Adyen is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* chargebee_payments - Chargebee Payments gateway \* bluepay - BluePay is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* bank_of_america - Bank of America is a payment gateway. \* paypal_pro - PayPal Pro Account is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* moneris_us - Moneris USA is a payment gateway. \* exact - Exact Payments is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* tco - 2Checkout is a payment gateway. \* chargebee - Chargebee test gateway. \* stripe - Stripe is a payment gateway. \* eway - eWAY Account is a payment gateway. \* authorize_net - Authorize.net is a payment gateway \* moneris - Moneris is a payment gateway. \* worldpay - WorldPay is a payment gateway \* pin - Pin is a payment gateway \* gocardless - GoCardless is a payment service provider. \* elavon - Elavon Virtual Merchant is a payment solution. \* cybersource - CyberSource is a payment gateway. \* vantiv - Vantiv is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* global_payments - Global Payments is a payment service provider. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* checkout_com - Checkout.com is a payment gateway. \* quickbooks - Intuit QuickBooks Payments gateway \* mollie - Mollie is a payment gateway. \* bluesnap - BlueSnap is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* hdfc - HDFC Account is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ingenico_direct - Worldline Online Payments is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US.
|
|
2030
|
+
|
|
2031
|
+
*/
|
|
2032
|
+
|
|
388
2033
|
gateway?:Gateway;
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* @description The gateway account this payment method is stored with.
|
|
2037
|
+
|
|
2038
|
+
*/
|
|
2039
|
+
|
|
389
2040
|
gateway_account_id?:string;
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* @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's status based on its expiry date).
|
|
2044
|
+
|
|
2045
|
+
*/
|
|
2046
|
+
|
|
390
2047
|
status?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
2048
|
+
|
|
2049
|
+
/**
|
|
2050
|
+
* @description The reference id. In the case of Amazon and PayPal this will be the 'billing agreement id'. For GoCardless direct debit this will be 'mandate id'. In the case of card payments this will be the identifier provided by the gateway/card vault for the specific payment method resource.
|
|
2051
|
+
**Note:** This is not the one time temporary token provided by gateways like Stripe.
|
|
2052
|
+
|
|
2053
|
+
*/
|
|
2054
|
+
|
|
391
2055
|
reference_id?:string;
|
|
392
2056
|
}
|
|
393
|
-
export interface CustomerBalance {
|
|
2057
|
+
export interface CustomerBalance {
|
|
394
2058
|
promotional_credits?:number;
|
|
2059
|
+
|
|
395
2060
|
excess_payments?:number;
|
|
2061
|
+
|
|
396
2062
|
refundable_credits?:number;
|
|
2063
|
+
|
|
397
2064
|
unbilled_charges?:number;
|
|
2065
|
+
|
|
398
2066
|
currency_code?:string;
|
|
399
2067
|
}
|
|
400
|
-
export interface EntityIdentifier {
|
|
2068
|
+
export interface EntityIdentifier {
|
|
401
2069
|
id?:string;
|
|
2070
|
+
|
|
402
2071
|
value?:string;
|
|
2072
|
+
|
|
403
2073
|
scheme?:string;
|
|
2074
|
+
|
|
404
2075
|
standard?:string;
|
|
405
2076
|
}
|
|
406
|
-
export interface Relationship {
|
|
2077
|
+
export interface Relationship {
|
|
2078
|
+
/**
|
|
2079
|
+
* @description The `id` of the customer who is the immediate parent.
|
|
2080
|
+
|
|
2081
|
+
*/
|
|
2082
|
+
|
|
407
2083
|
parent_id?:string;
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* @description The `id` of the customer who pays the invoices for this customer. Can be the customer itself or the `invoice_owner_id`
|
|
2087
|
+
|
|
2088
|
+
*/
|
|
2089
|
+
|
|
408
2090
|
payment_owner_id?:string;
|
|
2091
|
+
|
|
2092
|
+
/**
|
|
2093
|
+
* @description The `id` of the customer who is invoiced for charges incurred. Can be the customer itself or any parent in its hierarchy.
|
|
2094
|
+
|
|
2095
|
+
*/
|
|
2096
|
+
|
|
409
2097
|
invoice_owner_id?:string;
|
|
410
2098
|
}
|
|
411
|
-
export interface ParentAccountAccess {
|
|
2099
|
+
export interface ParentAccountAccess {
|
|
2100
|
+
/**
|
|
2101
|
+
* @description Sets parent'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.
|
|
2102
|
+
|
|
2103
|
+
*/
|
|
2104
|
+
|
|
412
2105
|
portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only';
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* @description Sets parent'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.
|
|
2109
|
+
|
|
2110
|
+
*/
|
|
2111
|
+
|
|
413
2112
|
portal_download_child_invoices?:'no' | 'yes' | 'view_only';
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* @description If `true`, the parent account will receive subscription-related emails sent to the child account.
|
|
2116
|
+
|
|
2117
|
+
*/
|
|
2118
|
+
|
|
414
2119
|
send_subscription_emails?:boolean;
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* @description If `true`, the parent account will receive invoice-related emails sent to the child account.
|
|
2123
|
+
|
|
2124
|
+
*/
|
|
2125
|
+
|
|
415
2126
|
send_invoice_emails?:boolean;
|
|
2127
|
+
|
|
2128
|
+
/**
|
|
2129
|
+
* @description If `true`, the parent account will receive payment-related emails sent to the child account.
|
|
2130
|
+
|
|
2131
|
+
*/
|
|
2132
|
+
|
|
416
2133
|
send_payment_emails?:boolean;
|
|
417
2134
|
}
|
|
418
|
-
export interface ChildAccountAccess {
|
|
2135
|
+
export interface ChildAccountAccess {
|
|
2136
|
+
/**
|
|
2137
|
+
* @description Sets the child'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.
|
|
2138
|
+
|
|
2139
|
+
*/
|
|
2140
|
+
|
|
419
2141
|
portal_edit_subscriptions?:'yes' | 'view_only';
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* @description Sets the child'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.
|
|
2145
|
+
|
|
2146
|
+
*/
|
|
2147
|
+
|
|
420
2148
|
portal_download_invoices?:'no' | 'yes' | 'view_only';
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* @description If `true`, the child account will receive subscription-related emails for its own subscriptions.
|
|
2152
|
+
|
|
2153
|
+
*/
|
|
2154
|
+
|
|
421
2155
|
send_subscription_emails?:boolean;
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* @description If `true`, the child account will receive invoice-related emails for its own invoices.
|
|
2159
|
+
|
|
2160
|
+
*/
|
|
2161
|
+
|
|
422
2162
|
send_invoice_emails?:boolean;
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* @description If `true`, the child account will receive payment-related emails for its own invoices.
|
|
2166
|
+
|
|
2167
|
+
*/
|
|
2168
|
+
|
|
423
2169
|
send_payment_emails?:boolean;
|
|
424
2170
|
}
|
|
425
2171
|
}
|