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
|
@@ -1,328 +1,1384 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface CreditNote {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Credit-note id.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description The identifier of the customer this Credit Note belongs to.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
customer_id:string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description The identifier of the subscription this Credit Note belongs to.
|
|
21
|
+
**Note:** If *consolidated invoicing* is enabled, to know the subscriptions attached with this Credit Note you have to refer [line_item's](/docs/api/credit_notes#credit_note_line_items) *subscription_id* . This attribute should **not** be used (which will be *null* if this credit note has lines from multiple subscriptions).
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
|
|
6
25
|
subscription_id?:string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description The identifier of the invoice against which this Credit Note is issued
|
|
29
|
+
|
|
30
|
+
*/
|
|
31
|
+
|
|
7
32
|
reference_invoice_id:string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
|
|
36
|
+
|
|
37
|
+
*/
|
|
38
|
+
|
|
8
39
|
type:'adjustment' | 'refundable';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @description The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\] \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* order_change - Order Change \* other - Can be set when none of the above reason codes are applicable \* fraudulent - FRAUDULENT \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* waiver - Waiver \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* product_unsatisfactory - Product Unsatisfactory \* order_cancellation - Order Cancellation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* service_unsatisfactory - Service Unsatisfactory
|
|
43
|
+
|
|
44
|
+
*/
|
|
45
|
+
|
|
9
46
|
reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @description The credit note status. \* voided - When the Credit Note has been cancelled. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* adjusted - When the Credit Note has been adjusted against an invoice.
|
|
50
|
+
|
|
51
|
+
*/
|
|
52
|
+
|
|
10
53
|
status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @description VAT number of the customer for whom this Credit Note is raised.
|
|
57
|
+
|
|
58
|
+
*/
|
|
59
|
+
|
|
11
60
|
vat_number?:string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @description The date the Credit Note is issued.
|
|
64
|
+
|
|
65
|
+
*/
|
|
66
|
+
|
|
12
67
|
date?:number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @description The price type of the Credit Note. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.
|
|
71
|
+
|
|
72
|
+
*/
|
|
73
|
+
|
|
13
74
|
price_type:PriceType;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @description The currency code (ISO 4217 format) for the credit note
|
|
78
|
+
|
|
79
|
+
*/
|
|
80
|
+
|
|
14
81
|
currency_code:string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @description Credit Note amount in cents.
|
|
85
|
+
|
|
86
|
+
*/
|
|
87
|
+
|
|
15
88
|
total?:number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @description The amount allocated to the invoices.
|
|
92
|
+
|
|
93
|
+
*/
|
|
94
|
+
|
|
16
95
|
amount_allocated?:number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @description The refunds issued from this Credit Note.
|
|
99
|
+
|
|
100
|
+
*/
|
|
101
|
+
|
|
17
102
|
amount_refunded?:number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description The yet to be used credits of this Credit Note.
|
|
106
|
+
|
|
107
|
+
*/
|
|
108
|
+
|
|
18
109
|
amount_available?:number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @description The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued.
|
|
113
|
+
|
|
114
|
+
*/
|
|
115
|
+
|
|
19
116
|
refunded_at?:number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @description Timestamp indicating the date and time this Credit Note gets voided.
|
|
120
|
+
|
|
121
|
+
*/
|
|
122
|
+
|
|
20
123
|
voided_at?:number;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @description The date/time when the credit note was raised. This date/time can be backdated, which means that the date/time can be earlier than the date/time the credit note was created.
|
|
127
|
+
|
|
128
|
+
*/
|
|
129
|
+
|
|
21
130
|
generated_at?:number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @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.
|
|
134
|
+
|
|
135
|
+
*/
|
|
136
|
+
|
|
22
137
|
resource_version?:number;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @description Timestamp indicating when this Credit Note was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
141
|
+
|
|
142
|
+
*/
|
|
143
|
+
|
|
23
144
|
updated_at?:number;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @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.
|
|
148
|
+
|
|
149
|
+
In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
|
|
150
|
+
\* 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.
|
|
151
|
+
|
|
152
|
+
*/
|
|
153
|
+
|
|
24
154
|
channel?:Channel;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @description The Credit Note sub-total
|
|
158
|
+
|
|
159
|
+
*/
|
|
160
|
+
|
|
25
161
|
sub_total:number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @description Invoice subtotal in the currency of the place of supply.
|
|
165
|
+
|
|
166
|
+
*/
|
|
167
|
+
|
|
26
168
|
sub_total_in_local_currency?:number;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @description Total invoice amount in the currency of the place of supply.
|
|
172
|
+
|
|
173
|
+
*/
|
|
174
|
+
|
|
27
175
|
total_in_local_currency?:number;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.
|
|
179
|
+
|
|
180
|
+
*/
|
|
181
|
+
|
|
28
182
|
local_currency_code?:string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @description Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the `round_off_amount`. If there is no `round-off amount`, it will display `0`.
|
|
186
|
+
|
|
187
|
+
*/
|
|
188
|
+
|
|
29
189
|
round_off_amount?:number;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @description Indicates the fractional correction amount.
|
|
193
|
+
|
|
194
|
+
*/
|
|
195
|
+
|
|
30
196
|
fractional_correction?:number;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @description Indicates that this resource has been deleted.
|
|
200
|
+
|
|
201
|
+
*/
|
|
202
|
+
|
|
31
203
|
deleted:boolean;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @description Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.
|
|
207
|
+
|
|
208
|
+
*/
|
|
209
|
+
|
|
32
210
|
tax_category?:string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @description This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency. For example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.
|
|
214
|
+
|
|
215
|
+
*/
|
|
216
|
+
|
|
33
217
|
local_currency_exchange_rate?:number;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive
|
|
221
|
+
|
|
222
|
+
*/
|
|
223
|
+
|
|
34
224
|
create_reason_code?:string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
228
|
+
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** ).
|
|
229
|
+
|
|
230
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
231
|
+
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
|
|
232
|
+
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.
|
|
233
|
+
|
|
234
|
+
*/
|
|
235
|
+
|
|
35
236
|
vat_number_prefix?:string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) of this credit_note. This is always the same as the business entity of the invoice referred to by [reference_invoice_id](/docs/api/credit_notes?prod_cat_ver=2#credit_note_reference_invoice_id).
|
|
240
|
+
|
|
241
|
+
*/
|
|
242
|
+
|
|
36
243
|
business_entity_id:string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @description An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.
|
|
247
|
+
|
|
248
|
+
*/
|
|
249
|
+
|
|
37
250
|
einvoice?:CreditNote.Einvoice;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @description The line items of this Credit Note
|
|
254
|
+
|
|
255
|
+
*/
|
|
256
|
+
|
|
38
257
|
line_items?:CreditNote.LineItem[];
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @description The list of discounts applied to this Credit Note
|
|
261
|
+
|
|
262
|
+
*/
|
|
263
|
+
|
|
39
264
|
discounts?:CreditNote.Discount[];
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @description The list of discount(s) applied for each line item of this invoice.
|
|
268
|
+
|
|
269
|
+
*/
|
|
270
|
+
|
|
40
271
|
line_item_discounts?:CreditNote.LineItemDiscount[];
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @description The list of tiers applicable for this line item
|
|
275
|
+
|
|
276
|
+
*/
|
|
277
|
+
|
|
41
278
|
line_item_tiers?:CreditNote.LineItemTier[];
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @description The tax-lines of this Credit Note
|
|
282
|
+
|
|
283
|
+
*/
|
|
284
|
+
|
|
42
285
|
taxes?:CreditNote.Tax[];
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @description The list of taxes applied on line items
|
|
289
|
+
|
|
290
|
+
*/
|
|
291
|
+
|
|
43
292
|
line_item_taxes?:CreditNote.LineItemTax[];
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @description Payment Refunds issued from this Credit Note
|
|
296
|
+
|
|
297
|
+
*/
|
|
298
|
+
|
|
44
299
|
linked_refunds?:CreditNote.CreditNoteTransaction[];
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @description The details of refunds recorded against the [invoice.linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) component of the `invoice` [associated](/docs/api/credit_notes#credit_note_reference_invoice_id) with this `credit_note`.
|
|
303
|
+
|
|
304
|
+
*/
|
|
305
|
+
|
|
45
306
|
linked_tax_withheld_refunds?:CreditNote.LinkedTaxWithheldRefund[];
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @description Invoice allocations made from this Credit Note.
|
|
310
|
+
|
|
311
|
+
*/
|
|
312
|
+
|
|
46
313
|
allocations?:CreditNote.AppliedCredit[];
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @description Shipping address for the quote.
|
|
317
|
+
|
|
318
|
+
*/
|
|
319
|
+
|
|
47
320
|
shipping_address?:CreditNote.ShippingAddress;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @description Billing address for the quote.
|
|
324
|
+
|
|
325
|
+
*/
|
|
326
|
+
|
|
48
327
|
billing_address?:CreditNote.BillingAddress;
|
|
49
328
|
}
|
|
50
329
|
export namespace CreditNote {
|
|
51
|
-
export class CreditNoteResource {
|
|
330
|
+
export class CreditNoteResource {
|
|
331
|
+
/**
|
|
332
|
+
* @description Use this API to [void a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void.
|
|
333
|
+
|
|
334
|
+
**Note:** When adjustment credit notes are voided, the associated invoice will reflect as NOT PAID, and the amount in the invoice will be recalculated to reflect the amount after considering the voided credit note.
|
|
335
|
+
|
|
336
|
+
*/
|
|
337
|
+
|
|
52
338
|
void_credit_note(credit_note_id:string, input?:VoidCreditNoteInputParam):ChargebeeRequest<VoidCreditNoteResponse>;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note to the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) recorded against the credit note are not refunded.
|
|
342
|
+
|
|
343
|
+
*/
|
|
344
|
+
|
|
53
345
|
refund(credit_note_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @description Lists all the Credit Notes.
|
|
349
|
+
|
|
350
|
+
*/
|
|
351
|
+
|
|
54
352
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @description Creates a `credit_note` for the specified invoice.
|
|
356
|
+
**Note:**
|
|
357
|
+
|
|
358
|
+
If the `credit_note` [type](/docs/api/credit_notes#create_credit_note_type) is `refundable`, then `linked_taxes_withheld.amount` for the [invoice specified](/docs/api/credit_notes#create_credit_note_reference_invoice_id) can also be included in the [total](/docs/api/credit_notes#create_credit_note_total).
|
|
359
|
+
|
|
360
|
+
*/
|
|
361
|
+
|
|
55
362
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @description Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note. The refund is provided against `linked_payments` first and then against any `linked_taxes_withheld` for the [invoice](/docs/api/credit_notes#credit_note_reference_invoice_id) associated with the `credit_note`. For payments made via online transactions, the refund request is processed via the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions).
|
|
366
|
+
|
|
367
|
+
*/
|
|
368
|
+
|
|
56
369
|
record_refund(credit_note_id:string, input?:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @description Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice.
|
|
373
|
+
|
|
374
|
+
*/
|
|
375
|
+
|
|
57
376
|
import_credit_note(input:ImportCreditNoteInputParam):ChargebeeRequest<ImportCreditNoteResponse>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* @description This API [deletes a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A credit note once deleted, is deleted permanently. You cannot delete a credit which has already been deleted or refunded. If you try to delete a refunded or deleted credit note, an error message will be displayed.
|
|
380
|
+
|
|
381
|
+
*/
|
|
382
|
+
|
|
58
383
|
delete(credit_note_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @description Download the e-invoice for the credit note in both XML and PDF formats. The response consists of a `download` object for each format. The XML format follows the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/tree/).
|
|
387
|
+
**Note**
|
|
388
|
+
|
|
389
|
+
* You can only download e-invoices when their `status` is `success` or `registered`.
|
|
390
|
+
* There are some cases in which the PDF is not available for download. In such cases, you can obtain it from the XML by decoding the value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/), which is the Base64-encoded version of the PDF.
|
|
391
|
+
|
|
392
|
+
*/
|
|
393
|
+
|
|
59
394
|
download_einvoice(credit_note_id:string):ChargebeeRequest<DownloadEinvoiceResponse>;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @description Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.
|
|
398
|
+
|
|
399
|
+
*/
|
|
400
|
+
|
|
60
401
|
pdf(credit_note_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* @description Resend failed einvoice in credit notes.
|
|
405
|
+
|
|
406
|
+
*/
|
|
407
|
+
|
|
61
408
|
resend_einvoice(credit_note_id:string):ChargebeeRequest<ResendEinvoiceResponse>;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @description Removes a [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) record from the `credit_note`.
|
|
412
|
+
|
|
413
|
+
*/
|
|
414
|
+
|
|
62
415
|
remove_tax_withheld_refund(credit_note_id:string, input?:RemoveTaxWithheldRefundInputParam):ChargebeeRequest<RemoveTaxWithheldRefundResponse>;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @description Retrieves the Credit Note identified by the specified Credit Note number.
|
|
419
|
+
|
|
420
|
+
*/
|
|
421
|
+
|
|
63
422
|
retrieve(credit_note_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* @description This endpoint is used to send an e-invoice for invoice.
|
|
426
|
+
|
|
427
|
+
To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.
|
|
428
|
+
|
|
429
|
+
This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:
|
|
430
|
+
|
|
431
|
+
* If e-invoicing is not enabled at the site and customer level.
|
|
432
|
+
|
|
433
|
+
* If there is an e-invoice generated already for the invoice.
|
|
434
|
+
|
|
435
|
+
* If the "**Use automatic e-invoicing**" option is selected.
|
|
436
|
+
|
|
437
|
+
* If there are no generated e-invoices with the `failed` or `skipped` status.
|
|
438
|
+
|
|
439
|
+
* If the invoice status is `voided` or `pending`.
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
*/
|
|
443
|
+
|
|
64
444
|
send_einvoice(credit_note_id:string):ChargebeeRequest<SendEinvoiceResponse>;
|
|
65
445
|
}
|
|
66
|
-
export interface VoidCreditNoteResponse {
|
|
67
|
-
|
|
446
|
+
export interface VoidCreditNoteResponse {
|
|
447
|
+
credit_note:CreditNote;
|
|
68
448
|
}
|
|
69
449
|
export interface VoidCreditNoteInputParam {
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* @description Reason for voiding credit note. This comment will be added to the credit note.
|
|
453
|
+
|
|
454
|
+
*/
|
|
455
|
+
|
|
70
456
|
comment?:string;
|
|
71
457
|
}
|
|
72
|
-
export interface RefundResponse {
|
|
73
|
-
|
|
74
|
-
|
|
458
|
+
export interface RefundResponse {
|
|
459
|
+
credit_note:CreditNote;
|
|
460
|
+
|
|
461
|
+
transaction:Transaction;
|
|
75
462
|
}
|
|
76
463
|
export interface RefundInputParam {
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* @description The amount to be refunded. If not specified, the entire [refundable amount](/docs/api/credit_notes#credit_note_amount_available) for this `credit_note` is refunded. **Note:** Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) associated with the `credit_note` cannot be refunded via this operation.
|
|
467
|
+
|
|
468
|
+
*/
|
|
469
|
+
|
|
77
470
|
refund_amount?:number;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* @description A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
|
|
474
|
+
|
|
475
|
+
*/
|
|
476
|
+
|
|
78
477
|
customer_notes?:string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* @description Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
481
|
+
|
|
482
|
+
*/
|
|
483
|
+
|
|
79
484
|
refund_reason_code?:string;
|
|
80
485
|
}
|
|
81
|
-
export interface ListResponse {
|
|
82
|
-
|
|
83
|
-
|
|
486
|
+
export interface ListResponse {
|
|
487
|
+
/**
|
|
488
|
+
* @description Lists all the Credit Notes.
|
|
489
|
+
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
list:{credit_note:CreditNote}[];
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* @description Lists all the Credit Notes.
|
|
496
|
+
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
next_offset?:string;
|
|
84
500
|
}
|
|
85
501
|
export interface ListInputParam {
|
|
86
|
-
[key : string]: any;
|
|
502
|
+
[key : string]: any;
|
|
503
|
+
/**
|
|
504
|
+
* @description The number of resources to be returned.
|
|
505
|
+
|
|
506
|
+
*/
|
|
507
|
+
|
|
87
508
|
limit?:number;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @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.
|
|
512
|
+
|
|
513
|
+
*/
|
|
514
|
+
|
|
88
515
|
offset?:string;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
519
|
+
|
|
520
|
+
*/
|
|
521
|
+
|
|
89
522
|
include_deleted?:boolean;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @description Credit-note id.
|
|
526
|
+
|
|
527
|
+
*/
|
|
528
|
+
|
|
90
529
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @description The identifier of the customer this Credit Note belongs to.
|
|
533
|
+
|
|
534
|
+
*/
|
|
535
|
+
|
|
91
536
|
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* @description To filter based on subscription_id.
|
|
540
|
+
NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
541
|
+
|
|
542
|
+
*/
|
|
543
|
+
|
|
92
544
|
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @description The identifier of the invoice against which this Credit Note is issued
|
|
548
|
+
|
|
549
|
+
*/
|
|
550
|
+
|
|
93
551
|
reference_invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @description The credit note type.
|
|
555
|
+
|
|
556
|
+
*/
|
|
557
|
+
|
|
94
558
|
type?:{in?:string,is?:'adjustment' | 'refundable',is_not?:'adjustment' | 'refundable',not_in?:string};
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* @description The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\]
|
|
562
|
+
|
|
563
|
+
*/
|
|
564
|
+
|
|
95
565
|
reason_code?:{in?:string,is?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',is_not?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',not_in?:string};
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive
|
|
569
|
+
|
|
570
|
+
*/
|
|
571
|
+
|
|
96
572
|
create_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @description The credit note status.
|
|
576
|
+
|
|
577
|
+
*/
|
|
578
|
+
|
|
97
579
|
status?:{in?:string,is?:'refund_due' | 'adjusted' | 'refunded' | 'voided',is_not?:'refund_due' | 'adjusted' | 'refunded' | 'voided',not_in?:string};
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* @description The date the Credit Note is issued.
|
|
583
|
+
|
|
584
|
+
*/
|
|
585
|
+
|
|
98
586
|
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @description Credit Note amount in cents.
|
|
590
|
+
|
|
591
|
+
*/
|
|
592
|
+
|
|
99
593
|
total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* @description The price type of the Credit Note.
|
|
597
|
+
|
|
598
|
+
*/
|
|
599
|
+
|
|
100
600
|
price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string};
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* @description The amount allocated to the invoices.
|
|
604
|
+
|
|
605
|
+
*/
|
|
606
|
+
|
|
101
607
|
amount_allocated?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* @description The refunds issued from this Credit Note.
|
|
611
|
+
|
|
612
|
+
*/
|
|
613
|
+
|
|
102
614
|
amount_refunded?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @description The yet to be used credits of this Credit Note.
|
|
618
|
+
|
|
619
|
+
*/
|
|
620
|
+
|
|
103
621
|
amount_available?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* @description Timestamp indicating the date and time this Credit Note gets voided.
|
|
625
|
+
|
|
626
|
+
*/
|
|
627
|
+
|
|
104
628
|
voided_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @description To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
632
|
+
|
|
633
|
+
*/
|
|
634
|
+
|
|
105
635
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @description Lists all the Credit Notes.
|
|
639
|
+
|
|
640
|
+
*/
|
|
641
|
+
|
|
106
642
|
sort_by?:{asc?:'date',desc?:'date'};
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @description The subscription channel this object originated from and is maintained in.
|
|
646
|
+
|
|
647
|
+
*/
|
|
648
|
+
|
|
107
649
|
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* @description Parameters for einvoice
|
|
653
|
+
|
|
654
|
+
*/
|
|
655
|
+
|
|
108
656
|
einvoice?:{status?:{in?:string,is?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',is_not?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',not_in?:string}};
|
|
109
657
|
}
|
|
110
|
-
export interface CreateResponse {
|
|
111
|
-
|
|
112
|
-
|
|
658
|
+
export interface CreateResponse {
|
|
659
|
+
credit_note:CreditNote;
|
|
660
|
+
|
|
661
|
+
invoice:Invoice;
|
|
113
662
|
}
|
|
114
663
|
export interface CreateInputParam {
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* @description The identifier of the invoice against which this Credit Note is issued.
|
|
667
|
+
|
|
668
|
+
*/
|
|
669
|
+
|
|
115
670
|
reference_invoice_id:string;
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* @description Credit Note amount in cents. You can either pass the total parameter or the line_items parameter. Passing both will result in an error.
|
|
674
|
+
|
|
675
|
+
*/
|
|
676
|
+
|
|
116
677
|
total?:number;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
|
|
681
|
+
|
|
682
|
+
*/
|
|
683
|
+
|
|
117
684
|
type:'adjustment' | 'refundable';
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @description The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\]. \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* waiver - Waiver \* order_cancellation - Order Cancellation \* order_change - Order Change \* product_unsatisfactory - Product Unsatisfactory \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* service_unsatisfactory - Service Unsatisfactory \* other - Can be set when none of the above reason codes are applicable \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* fraudulent - FRAUDULENT
|
|
688
|
+
|
|
689
|
+
*/
|
|
690
|
+
|
|
118
691
|
reason_code?:'order_cancellation' | 'service_unsatisfactory' | 'other' | 'product_unsatisfactory' | 'order_change' | 'waiver';
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
695
|
+
|
|
696
|
+
*/
|
|
697
|
+
|
|
119
698
|
create_reason_code?:string;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @description The date the Credit Note is issued.
|
|
702
|
+
|
|
703
|
+
*/
|
|
704
|
+
|
|
120
705
|
date?:number;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* @description A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
|
|
709
|
+
|
|
710
|
+
*/
|
|
711
|
+
|
|
121
712
|
customer_notes?:string;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* @description An internal [comment](./comments) to be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf).
|
|
716
|
+
|
|
717
|
+
*/
|
|
718
|
+
|
|
122
719
|
comment?:string;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* @description Parameters for line_items
|
|
723
|
+
|
|
724
|
+
*/
|
|
725
|
+
|
|
123
726
|
line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
124
727
|
}
|
|
125
|
-
export interface RecordRefundResponse {
|
|
126
|
-
|
|
127
|
-
|
|
728
|
+
export interface RecordRefundResponse {
|
|
729
|
+
credit_note:CreditNote;
|
|
730
|
+
|
|
731
|
+
transaction?:Transaction;
|
|
128
732
|
}
|
|
129
733
|
export interface RecordRefundInputParam {
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @description Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
737
|
+
|
|
738
|
+
*/
|
|
739
|
+
|
|
130
740
|
refund_reason_code?:string;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* @description Remarks, if any, on the refund.
|
|
744
|
+
|
|
745
|
+
*/
|
|
746
|
+
|
|
131
747
|
comment?:string;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* @description Parameters for transaction
|
|
751
|
+
|
|
752
|
+
*/
|
|
753
|
+
|
|
132
754
|
transaction?:{amount?:number,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
133
755
|
}
|
|
134
|
-
export interface ImportCreditNoteResponse {
|
|
135
|
-
|
|
756
|
+
export interface ImportCreditNoteResponse {
|
|
757
|
+
credit_note:CreditNote;
|
|
136
758
|
}
|
|
137
759
|
export interface ImportCreditNoteInputParam {
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* @description Credit Note Number.
|
|
763
|
+
|
|
764
|
+
*/
|
|
765
|
+
|
|
138
766
|
id:string;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @description This identifies the customer for whom the credit note needs to be created.
|
|
770
|
+
|
|
771
|
+
*/
|
|
772
|
+
|
|
139
773
|
customer_id?:string;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* @description The identifier of the subscription for which this credit note needs to be created.
|
|
777
|
+
|
|
778
|
+
*/
|
|
779
|
+
|
|
140
780
|
subscription_id?:string;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* @description The identifier of the invoice against which this Credit Note is issued.
|
|
784
|
+
|
|
785
|
+
*/
|
|
786
|
+
|
|
141
787
|
reference_invoice_id:string;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* @description The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note
|
|
791
|
+
|
|
792
|
+
*/
|
|
793
|
+
|
|
142
794
|
type:'adjustment' | 'refundable';
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* @description The currency code (ISO 4217 format) for the credit note.
|
|
798
|
+
|
|
799
|
+
*/
|
|
800
|
+
|
|
143
801
|
currency_code?:string;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @description Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
805
|
+
|
|
806
|
+
*/
|
|
807
|
+
|
|
144
808
|
create_reason_code:string;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* @description The date the Credit Note is issued.
|
|
812
|
+
|
|
813
|
+
*/
|
|
814
|
+
|
|
145
815
|
date:number;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* @description The credit note status. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* voided - When the Credit Note has been cancelled. \* adjusted - When the Credit Note has been adjusted against an invoice.
|
|
819
|
+
|
|
820
|
+
*/
|
|
821
|
+
|
|
146
822
|
status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* @description Credit Note amount in cents.
|
|
826
|
+
|
|
827
|
+
*/
|
|
828
|
+
|
|
147
829
|
total?:number;
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* @description The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued.
|
|
833
|
+
|
|
834
|
+
*/
|
|
835
|
+
|
|
148
836
|
refunded_at?:number;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @description Timestamp indicating the date and time this Credit Note gets voided.
|
|
840
|
+
|
|
841
|
+
*/
|
|
842
|
+
|
|
149
843
|
voided_at?:number;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* @description The Credit Note sub-total.
|
|
847
|
+
|
|
848
|
+
*/
|
|
849
|
+
|
|
150
850
|
sub_total?:number;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @description Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the `round_off_amount`. If there is no `round-off amount`, it will display `0`.
|
|
854
|
+
|
|
855
|
+
*/
|
|
856
|
+
|
|
151
857
|
round_off_amount?:number;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* @description Indicates the fractional correction amount.
|
|
861
|
+
|
|
862
|
+
*/
|
|
863
|
+
|
|
152
864
|
fractional_correction?:number;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* @description An overridden value for the first two characters of the [full VAT
|
|
868
|
+
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** ).
|
|
869
|
+
|
|
870
|
+
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
871
|
+
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
|
|
872
|
+
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.
|
|
873
|
+
|
|
874
|
+
*/
|
|
875
|
+
|
|
153
876
|
vat_number_prefix?:string;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* @description Parameters for line_items
|
|
880
|
+
|
|
881
|
+
*/
|
|
882
|
+
|
|
154
883
|
line_items?:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* @description Parameters for line_item_tiers
|
|
887
|
+
|
|
888
|
+
*/
|
|
889
|
+
|
|
155
890
|
line_item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* @description Parameters for discounts
|
|
894
|
+
|
|
895
|
+
*/
|
|
896
|
+
|
|
156
897
|
discounts?:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @description Parameters for taxes
|
|
901
|
+
|
|
902
|
+
*/
|
|
903
|
+
|
|
157
904
|
taxes?:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* @description Parameters for allocations
|
|
908
|
+
|
|
909
|
+
*/
|
|
910
|
+
|
|
158
911
|
allocations?:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* @description Parameters for linked_refunds
|
|
915
|
+
|
|
916
|
+
*/
|
|
917
|
+
|
|
159
918
|
linked_refunds?:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
|
|
160
919
|
}
|
|
161
|
-
export interface DeleteResponse {
|
|
162
|
-
|
|
920
|
+
export interface DeleteResponse {
|
|
921
|
+
credit_note:CreditNote;
|
|
163
922
|
}
|
|
164
923
|
export interface DeleteInputParam {
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @description Reason for deleting this credit note. This comment will be added to the associated invoice entity.
|
|
927
|
+
|
|
928
|
+
*/
|
|
929
|
+
|
|
165
930
|
comment?:string;
|
|
166
931
|
}
|
|
167
|
-
export interface DownloadEinvoiceResponse {
|
|
168
|
-
|
|
932
|
+
export interface DownloadEinvoiceResponse {
|
|
933
|
+
downloads:Download[];
|
|
169
934
|
}
|
|
170
935
|
|
|
171
|
-
export interface PdfResponse {
|
|
172
|
-
|
|
936
|
+
export interface PdfResponse {
|
|
937
|
+
download:Download;
|
|
173
938
|
}
|
|
174
939
|
export interface PdfInputParam {
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
|
|
943
|
+
|
|
944
|
+
*/
|
|
945
|
+
|
|
175
946
|
disposition_type?:DispositionType;
|
|
176
947
|
}
|
|
177
|
-
export interface ResendEinvoiceResponse {
|
|
178
|
-
|
|
948
|
+
export interface ResendEinvoiceResponse {
|
|
949
|
+
credit_note:CreditNote;
|
|
179
950
|
}
|
|
180
951
|
|
|
181
|
-
export interface RemoveTaxWithheldRefundResponse {
|
|
182
|
-
|
|
952
|
+
export interface RemoveTaxWithheldRefundResponse {
|
|
953
|
+
credit_note:CreditNote;
|
|
183
954
|
}
|
|
184
955
|
export interface RemoveTaxWithheldRefundInputParam {
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* @description Parameters for tax_withheld
|
|
959
|
+
|
|
960
|
+
*/
|
|
961
|
+
|
|
185
962
|
tax_withheld?:{id:string};
|
|
186
963
|
}
|
|
187
|
-
export interface RetrieveResponse {
|
|
188
|
-
|
|
964
|
+
export interface RetrieveResponse {
|
|
965
|
+
credit_note:CreditNote;
|
|
189
966
|
}
|
|
190
967
|
|
|
191
|
-
export interface SendEinvoiceResponse {
|
|
192
|
-
|
|
968
|
+
export interface SendEinvoiceResponse {
|
|
969
|
+
credit_note:CreditNote;
|
|
193
970
|
}
|
|
194
971
|
|
|
195
|
-
export interface Einvoice {
|
|
972
|
+
export interface Einvoice {
|
|
973
|
+
/**
|
|
974
|
+
* @description The unique `id` for the e-invoice. This is auto-generated by Chargebee.
|
|
975
|
+
|
|
976
|
+
*/
|
|
977
|
+
|
|
196
978
|
id?:string;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* @description This attribute is used to populate the unique reference number assigned to an invoice on the Invoice Registration Portal (IRP) network. It is essential for identifying and tracking invoices that are processed through the IRP network. In the future, this field may be used to store similar reference numbers for other networks.
|
|
982
|
+
|
|
983
|
+
*/
|
|
984
|
+
|
|
197
985
|
reference_number?:string;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* @description The status of processing the e-invoice. To obtain detailed information about the current `status`, see `message`. \* scheduled - Sending the e-invoice to the customer has been scheduled. \* skipped - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network. \* success - The e-invoice has been successfully delivered to the customer. \* failed - The e-invoice was sent and there was an error due to which it was not delivered. \* in_progress - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* registered - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.
|
|
989
|
+
|
|
990
|
+
*/
|
|
991
|
+
|
|
198
992
|
status?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped';
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* @description Detailed information about the status of the e-invoice. When `status` is `skipped` or `failed`, this contains the reason or error details. The following are some valid examples:
|
|
996
|
+
|
|
997
|
+
* Invoice successfully sent to customer via the e-invoicing network 9090:123456
|
|
998
|
+
* Invoice successfully sent to customer via email id abc@acme.com
|
|
999
|
+
|
|
1000
|
+
*/
|
|
1001
|
+
|
|
199
1002
|
message?:string;
|
|
200
1003
|
}
|
|
201
|
-
export interface LineItem {
|
|
1004
|
+
export interface LineItem {
|
|
202
1005
|
id?:string;
|
|
1006
|
+
|
|
203
1007
|
subscription_id?:string;
|
|
1008
|
+
|
|
204
1009
|
date_from?:number;
|
|
1010
|
+
|
|
205
1011
|
date_to?:number;
|
|
1012
|
+
|
|
206
1013
|
unit_amount?:number;
|
|
1014
|
+
|
|
207
1015
|
quantity?:number;
|
|
1016
|
+
|
|
208
1017
|
amount?:number;
|
|
1018
|
+
|
|
209
1019
|
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
1020
|
+
|
|
210
1021
|
is_taxed?:boolean;
|
|
1022
|
+
|
|
211
1023
|
tax_amount?:number;
|
|
1024
|
+
|
|
212
1025
|
tax_rate?:number;
|
|
1026
|
+
|
|
213
1027
|
unit_amount_in_decimal?:string;
|
|
1028
|
+
|
|
214
1029
|
quantity_in_decimal?:string;
|
|
1030
|
+
|
|
215
1031
|
amount_in_decimal?:string;
|
|
1032
|
+
|
|
216
1033
|
discount_amount?:number;
|
|
1034
|
+
|
|
217
1035
|
item_level_discount_amount?:number;
|
|
1036
|
+
|
|
218
1037
|
reference_line_item_id?:string;
|
|
1038
|
+
|
|
219
1039
|
description?:string;
|
|
1040
|
+
|
|
220
1041
|
entity_description?:string;
|
|
1042
|
+
|
|
221
1043
|
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
1044
|
+
|
|
222
1045
|
tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
|
|
1046
|
+
|
|
223
1047
|
entity_id?:string;
|
|
1048
|
+
|
|
224
1049
|
customer_id?:string;
|
|
225
1050
|
}
|
|
226
|
-
export interface Discount {
|
|
1051
|
+
export interface Discount {
|
|
227
1052
|
amount?:number;
|
|
1053
|
+
|
|
228
1054
|
description?:string;
|
|
1055
|
+
|
|
229
1056
|
line_item_id?:string;
|
|
1057
|
+
|
|
230
1058
|
entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
1059
|
+
|
|
231
1060
|
discount_type?:'fixed_amount' | 'percentage';
|
|
1061
|
+
|
|
232
1062
|
entity_id?:string;
|
|
1063
|
+
|
|
233
1064
|
coupon_set_code?:string;
|
|
234
1065
|
}
|
|
235
|
-
export interface LineItemDiscount {
|
|
1066
|
+
export interface LineItemDiscount {
|
|
236
1067
|
line_item_id?:string;
|
|
1068
|
+
|
|
237
1069
|
discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
1070
|
+
|
|
238
1071
|
coupon_id?:string;
|
|
1072
|
+
|
|
239
1073
|
entity_id?:string;
|
|
1074
|
+
|
|
240
1075
|
discount_amount?:number;
|
|
241
1076
|
}
|
|
242
|
-
export interface LineItemTier {
|
|
1077
|
+
export interface LineItemTier {
|
|
243
1078
|
line_item_id?:string;
|
|
1079
|
+
|
|
244
1080
|
starting_unit?:number;
|
|
1081
|
+
|
|
245
1082
|
ending_unit?:number;
|
|
1083
|
+
|
|
246
1084
|
quantity_used?:number;
|
|
1085
|
+
|
|
247
1086
|
unit_amount?:number;
|
|
1087
|
+
|
|
248
1088
|
starting_unit_in_decimal?:string;
|
|
1089
|
+
|
|
249
1090
|
ending_unit_in_decimal?:string;
|
|
1091
|
+
|
|
250
1092
|
quantity_used_in_decimal?:string;
|
|
1093
|
+
|
|
251
1094
|
unit_amount_in_decimal?:string;
|
|
252
1095
|
}
|
|
253
|
-
export interface Tax {
|
|
1096
|
+
export interface Tax {
|
|
254
1097
|
name?:string;
|
|
1098
|
+
|
|
255
1099
|
amount?:number;
|
|
1100
|
+
|
|
256
1101
|
description?:string;
|
|
257
1102
|
}
|
|
258
|
-
export interface LineItemTax {
|
|
1103
|
+
export interface LineItemTax {
|
|
259
1104
|
line_item_id?:string;
|
|
1105
|
+
|
|
260
1106
|
tax_name?:string;
|
|
1107
|
+
|
|
261
1108
|
tax_rate?:number;
|
|
1109
|
+
|
|
262
1110
|
is_partial_tax_applied?:boolean;
|
|
1111
|
+
|
|
263
1112
|
is_non_compliance_tax?:boolean;
|
|
1113
|
+
|
|
264
1114
|
taxable_amount?:number;
|
|
1115
|
+
|
|
265
1116
|
tax_amount?:number;
|
|
1117
|
+
|
|
266
1118
|
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
1119
|
+
|
|
267
1120
|
tax_juris_name?:string;
|
|
1121
|
+
|
|
268
1122
|
tax_juris_code?:string;
|
|
1123
|
+
|
|
269
1124
|
tax_amount_in_local_currency?:number;
|
|
1125
|
+
|
|
270
1126
|
local_currency_code?:string;
|
|
271
1127
|
}
|
|
272
|
-
export interface CreditNoteTransaction {
|
|
1128
|
+
export interface CreditNoteTransaction {
|
|
273
1129
|
txn_id?:string;
|
|
1130
|
+
|
|
274
1131
|
applied_amount?:number;
|
|
1132
|
+
|
|
275
1133
|
applied_at?:number;
|
|
1134
|
+
|
|
276
1135
|
txn_status?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention';
|
|
1136
|
+
|
|
277
1137
|
txn_date?:number;
|
|
1138
|
+
|
|
278
1139
|
txn_amount?:number;
|
|
1140
|
+
|
|
279
1141
|
refund_reason_code?:string;
|
|
280
1142
|
}
|
|
281
|
-
export interface LinkedTaxWithheldRefund {
|
|
1143
|
+
export interface LinkedTaxWithheldRefund {
|
|
282
1144
|
id?:string;
|
|
1145
|
+
|
|
283
1146
|
amount?:number;
|
|
1147
|
+
|
|
284
1148
|
description?:string;
|
|
1149
|
+
|
|
285
1150
|
date?:number;
|
|
1151
|
+
|
|
286
1152
|
reference_number?:string;
|
|
287
1153
|
}
|
|
288
|
-
export interface AppliedCredit {
|
|
1154
|
+
export interface AppliedCredit {
|
|
289
1155
|
invoice_id?:string;
|
|
1156
|
+
|
|
290
1157
|
allocated_amount?:number;
|
|
1158
|
+
|
|
291
1159
|
allocated_at?:number;
|
|
1160
|
+
|
|
292
1161
|
invoice_date?:number;
|
|
1162
|
+
|
|
293
1163
|
invoice_status?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
|
|
294
1164
|
}
|
|
295
|
-
export interface ShippingAddress {
|
|
1165
|
+
export interface ShippingAddress {
|
|
1166
|
+
/**
|
|
1167
|
+
* @description The first name of the contact.
|
|
1168
|
+
|
|
1169
|
+
*/
|
|
1170
|
+
|
|
296
1171
|
first_name?:string;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* @description The last name of the contact.
|
|
1175
|
+
|
|
1176
|
+
*/
|
|
1177
|
+
|
|
297
1178
|
last_name?:string;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* @description The email address.
|
|
1182
|
+
|
|
1183
|
+
*/
|
|
1184
|
+
|
|
298
1185
|
email?:string;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* @description The company name.
|
|
1189
|
+
|
|
1190
|
+
*/
|
|
1191
|
+
|
|
299
1192
|
company?:string;
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* @description The phone number.
|
|
1196
|
+
|
|
1197
|
+
*/
|
|
1198
|
+
|
|
300
1199
|
phone?:string;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* @description Address line 1
|
|
1203
|
+
|
|
1204
|
+
*/
|
|
1205
|
+
|
|
301
1206
|
line1?:string;
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* @description Address line 2
|
|
1210
|
+
|
|
1211
|
+
*/
|
|
1212
|
+
|
|
302
1213
|
line2?:string;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* @description Address line 3
|
|
1217
|
+
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
303
1220
|
line3?:string;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* @description The name of the city.
|
|
1224
|
+
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
304
1227
|
city?:string;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* @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`).
|
|
1231
|
+
|
|
1232
|
+
*/
|
|
1233
|
+
|
|
305
1234
|
state_code?:string;
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* @description The state/province name.
|
|
1238
|
+
|
|
1239
|
+
*/
|
|
1240
|
+
|
|
306
1241
|
state?:string;
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* @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).
|
|
1245
|
+
|
|
1246
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1247
|
+
|
|
1248
|
+
**Brexit**
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
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.
|
|
1252
|
+
|
|
1253
|
+
*/
|
|
1254
|
+
|
|
307
1255
|
country?:string;
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address).
|
|
1259
|
+
|
|
1260
|
+
*/
|
|
1261
|
+
|
|
308
1262
|
zip?:string;
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* @description The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid.
|
|
1266
|
+
|
|
1267
|
+
*/
|
|
1268
|
+
|
|
309
1269
|
validation_status?:ValidationStatus;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* @description The index number of the subscription/one-time group to which the item price is added. Provide a unique number between `0` and `9` (inclusive) for each group that is to be created. To increase this limit, contact Chargebee Support
|
|
1273
|
+
|
|
1274
|
+
*/
|
|
1275
|
+
|
|
310
1276
|
index?:number;
|
|
311
1277
|
}
|
|
312
|
-
export interface BillingAddress {
|
|
1278
|
+
export interface BillingAddress {
|
|
1279
|
+
/**
|
|
1280
|
+
* @description The first name of the billing contact.
|
|
1281
|
+
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
313
1284
|
first_name?:string;
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* @description The last name of the billing contact.
|
|
1288
|
+
|
|
1289
|
+
*/
|
|
1290
|
+
|
|
314
1291
|
last_name?:string;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* @description The email address.
|
|
1295
|
+
|
|
1296
|
+
*/
|
|
1297
|
+
|
|
315
1298
|
email?:string;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @description The company name.
|
|
1302
|
+
|
|
1303
|
+
*/
|
|
1304
|
+
|
|
316
1305
|
company?:string;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* @description The phone number.
|
|
1309
|
+
|
|
1310
|
+
*/
|
|
1311
|
+
|
|
317
1312
|
phone?:string;
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* @description Address line 1
|
|
1316
|
+
|
|
1317
|
+
*/
|
|
1318
|
+
|
|
318
1319
|
line1?:string;
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* @description Address line 2
|
|
1323
|
+
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
319
1326
|
line2?:string;
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* @description Address line 3
|
|
1330
|
+
|
|
1331
|
+
*/
|
|
1332
|
+
|
|
320
1333
|
line3?:string;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* @description The name of the city.
|
|
1337
|
+
|
|
1338
|
+
*/
|
|
1339
|
+
|
|
321
1340
|
city?:string;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* @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`).
|
|
1344
|
+
|
|
1345
|
+
*/
|
|
1346
|
+
|
|
322
1347
|
state_code?:string;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* @description State or Province
|
|
1351
|
+
|
|
1352
|
+
*/
|
|
1353
|
+
|
|
323
1354
|
state?:string;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* @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).
|
|
1358
|
+
|
|
1359
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1360
|
+
|
|
1361
|
+
**Brexit**
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
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.
|
|
1365
|
+
|
|
1366
|
+
*/
|
|
1367
|
+
|
|
324
1368
|
country?:string;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address).
|
|
1372
|
+
|
|
1373
|
+
*/
|
|
1374
|
+
|
|
325
1375
|
zip?:string;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* @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.
|
|
1379
|
+
|
|
1380
|
+
*/
|
|
1381
|
+
|
|
326
1382
|
validation_status?:ValidationStatus;
|
|
327
1383
|
}
|
|
328
1384
|
}
|