chargebee 2.41.0 → 3.0.0-beta.2
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 +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,3265 +1,1682 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
3
4
|
declare module 'chargebee' {
|
|
4
5
|
export interface Invoice {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
due_date?:number;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @description Number of days within which the invoice has to be paid
|
|
81
|
-
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
net_term_days?:number;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @description Exchange rate used for base currency conversion.
|
|
88
|
-
|
|
89
|
-
Note that when converting foreign currency invoices to local currency for VAT purposes, the exchange rates used differ from the base currency exchange rate provided in this field. This is due to regulations set by tax authorities, which require the use of official sources such as European Central Bank rates for local currency conversion. To calculate the exchange rate utilized for VAT in local currency, you may use the following formula.
|
|
90
|
-
**Exchange rate** = tax_amount_in_local_currency / tax_amount
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
exchange_rate?:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description The currency code (ISO 4217 format) for the invoice
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
currency_code:string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
total?:number;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Payments collected successfully for the invoice. This is the sum of [linked_payments[]](invoices#invoice_linked_payments)`.txn_amount` for all `linked_payments[]` that have `txn_status` as `success`.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
amount_paid?:number;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description Total adjustments made against this invoice.
|
|
119
|
-
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
amount_adjusted?:number;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @description Amount written off against this invoice.
|
|
126
|
-
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
write_off_amount?:number;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description Total credits applied against this invoice.
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
credits_applied?:number;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @description The unpaid amount that is due on the invoice. This is calculated as: [total](invoices#invoice_total) - [amount_paid](invoices#invoice_amount_paid) - sum of [applied_credits](invoices#invoice_applied_credits)`.applied_amount` - sum of [adjustment_credit_notes](invoices#invoice_adjustment_credit_notes)`.cn_total` - sum of [linked_taxes_withheld](invoices#invoice_linked_taxes_withheld)`.amount`.
|
|
140
|
-
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
amount_due?:number;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description Timestamp indicating the date \& time this invoice got paid.
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
|
-
paid_at?:number;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description Current dunning status of the invoice. \* exhausted - Maximum number of attempts have been made. \* stopped - Dunning has stopped for this invoice. \* success - Payment successfully collected during dunning process. \* in_progress - Dunning is still in progress.
|
|
154
|
-
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
dunning_status?:'in_progress' | 'stopped' | 'success' | 'exhausted';
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Timestamp indicating when will the next attempt to collect payment for this invoice occur.
|
|
161
|
-
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
|
-
next_retry_at?:number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @description Timestamp indicating the date \& time this invoice got voided.
|
|
168
|
-
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
voided_at?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
resource_version?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description Timestamp indicating when this invoice was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
182
|
-
**Note** : This value does not change when the following attributes are changed: *next_retry_at, dunning_status, has_advance_charges*
|
|
183
|
-
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
updated_at?:number;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* @description The sum of all the line item amounts minus the sum of all line item discounts. In other words, this is the sum of all [line_items[]](invoices#invoice_line_items)`.amount` - the sum of all [line_item_discounts[]](invoices#invoice_line_item_discounts)`.discount_amount`.
|
|
190
|
-
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
sub_total:number;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @description Invoice subtotal in the currency of the place of supply.
|
|
197
|
-
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
sub_total_in_local_currency?:number;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* @description Total invoice amount in the currency of the place of supply.
|
|
204
|
-
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
total_in_local_currency?:number;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.
|
|
211
|
-
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
local_currency_code?:string;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* @description Total tax amount for this invoice
|
|
218
|
-
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
|
-
tax:number;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @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.
|
|
225
|
-
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
local_currency_exchange_rate?:number;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* @description Boolean indicating the first invoice raised for the subscription. In the case of a non-recurring invoice, it indicates the first invoice raised for the customer.
|
|
232
|
-
|
|
233
|
-
*/
|
|
234
|
-
|
|
235
|
-
first_invoice?:boolean;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* @description The share of the invoice total due to new sales. When `first_invoice` is `true`, this attribute is the same as total. However, when the invoice is a [consolidated](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html )one, then it is the sum of all `line_items.amount` belonging to a new.
|
|
239
|
-
|
|
240
|
-
*/
|
|
241
|
-
|
|
242
|
-
new_sales_amount?:number;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* @description Boolean indicating any advance charge is present in this invoice.
|
|
246
|
-
|
|
247
|
-
*/
|
|
248
|
-
|
|
249
|
-
has_advance_charges?:boolean;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* @description Boolean indicating this invoice line_items terms are finalized or not.
|
|
253
|
-
|
|
254
|
-
*/
|
|
255
|
-
|
|
256
|
-
term_finalized:boolean;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* @description Boolean indicating this invoice is gifted or not.
|
|
260
|
-
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
is_gifted:boolean;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* @description The date when the invoice is finalized. This is the date in the invoice lifecycle when its `status` becomes any one of the following for the first time: `payment_due`, `posted`, or `paid`. For an invoice with `status` as `pending`, this happens when it gets closed.
|
|
267
|
-
|
|
268
|
-
*/
|
|
269
|
-
|
|
270
|
-
generated_at?:number;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @description Expected payment date recorded for this invoice.
|
|
274
|
-
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
expected_payment_date?:number;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* @description Payments that are yet to be collected for the invoice. This is the same value as [amount_due](invoices#invoice_amount_due) - the sum of [linked_payments[]](invoices#invoice_linked_payments)`.txn_amount` for all `linked_payments[]` that have `txn_status` as `in_progress`.
|
|
281
|
-
|
|
282
|
-
*/
|
|
283
|
-
|
|
284
|
-
amount_to_collect?:number;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* @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`.
|
|
288
|
-
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
round_off_amount?:number;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @description Payment owner of an invoice
|
|
295
|
-
|
|
296
|
-
*/
|
|
297
|
-
|
|
298
|
-
payment_owner?:string;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* @description Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive
|
|
302
|
-
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
void_reason_code?:string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* @description Indicates that this resource has been deleted.
|
|
309
|
-
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
deleted:boolean;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* @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.
|
|
316
|
-
|
|
317
|
-
*/
|
|
318
|
-
|
|
319
|
-
tax_category?:string;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* @description An overridden value for the first two characters of the [full VAT
|
|
323
|
-
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** ).
|
|
324
|
-
|
|
325
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
326
|
-
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
|
|
327
|
-
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.
|
|
328
|
-
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
vat_number_prefix?:string;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* @description The subscription channel this object originated from and is maintained in. \* 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. \* 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.
|
|
335
|
-
|
|
336
|
-
In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.
|
|
337
|
-
|
|
338
|
-
*/
|
|
339
|
-
|
|
340
|
-
channel?:Channel;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) of this invoice. Depending on whether the invoice was created directly for a customer or for a subscription, this is the business entity of the [customer](/docs/api/invoices?prod_cat_ver=2#invoice_customer_id) or the [subscription](/docs/api/invoices?prod_cat_ver=2#invoice_subscription_id) respectively.
|
|
344
|
-
|
|
345
|
-
*/
|
|
346
|
-
|
|
347
|
-
business_entity_id?:string;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* @description The list of line items for this invoice
|
|
351
|
-
|
|
352
|
-
*/
|
|
353
|
-
|
|
354
|
-
line_items?:Invoice.LineItem[];
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* @description The list of all deductions applied to the invoice.
|
|
358
|
-
|
|
359
|
-
*/
|
|
360
|
-
|
|
361
|
-
discounts?:Invoice.Discount[];
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* @description The list of deduction(s) applied for each line item of this invoice
|
|
365
|
-
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
line_item_discounts?:Invoice.LineItemDiscount[];
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* @description The list of taxes applied for this invoice
|
|
372
|
-
|
|
373
|
-
*/
|
|
374
|
-
|
|
375
|
-
taxes?:Invoice.Tax[];
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @description The list of taxes applied on line items
|
|
379
|
-
|
|
380
|
-
*/
|
|
381
|
-
|
|
382
|
-
line_item_taxes?:Invoice.LineItemTax[];
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* @description The list of tiers applicable for this line item
|
|
386
|
-
|
|
387
|
-
*/
|
|
388
|
-
|
|
389
|
-
line_item_tiers?:Invoice.LineItemTier[];
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* @description The list of transactions for this invoice
|
|
393
|
-
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
linked_payments?:Invoice.InvoiceTransaction[];
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* @description The list of dunning_attempts for this invoice
|
|
400
|
-
|
|
401
|
-
*/
|
|
402
|
-
|
|
403
|
-
dunning_attempts?:Invoice.DunningAttempt[];
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* @description Refundable Credits applied on this invoice.
|
|
407
|
-
|
|
408
|
-
*/
|
|
409
|
-
|
|
410
|
-
applied_credits?:Invoice.AppliedCredit[];
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* @description Adjustments created for this invoice
|
|
414
|
-
|
|
415
|
-
*/
|
|
416
|
-
|
|
417
|
-
adjustment_credit_notes?:Invoice.CreatedCreditNote[];
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* @description Credit notes issued for this invoice
|
|
421
|
-
|
|
422
|
-
*/
|
|
423
|
-
|
|
424
|
-
issued_credit_notes?:Invoice.CreatedCreditNote[];
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* @description The list of orders for this invoice
|
|
428
|
-
|
|
429
|
-
*/
|
|
430
|
-
|
|
431
|
-
linked_orders?:Invoice.LinkedOrder[];
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* @description The list of [notes](https://www.chargebee.com/docs/2.0/invoice_notes.html) that appear on the invoice PDF sent to the customer. Notes that come from a specific resource related to the invoice have `entity_type` and `entity_id` defined. There can be up to two notes in this array for which `entity_type` and `entity_id` are not defined:
|
|
435
|
-
|
|
436
|
-
* **Invoice-specific note:** It is the note provided via the `invoice_note` parameter for various endpoints in the API that also create invoices. For example, [creating a subscription](https://apidocs.chargebee.com/docs/api/subscriptions?prod_cat_ver=2#create_subscription_for_items_invoice_notes), [creating an invoice](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#create_invoice_for_items_and_one_time_charges_invoice_note), and [closing a pending invoice](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#close_a_pending_invoice_invoice_note).
|
|
437
|
-
* **General note:** This note is added to all invoices of the Chargebee site. You can [add/edit](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes) this note in the Chargebee admin console.
|
|
438
|
-
|
|
439
|
-
*/
|
|
440
|
-
|
|
441
|
-
notes?:Invoice.Note[];
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* @description Shipping address for the invoice.
|
|
445
|
-
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
shipping_address?:Invoice.ShippingAddress;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* @description Statement descriptor for the invoice.
|
|
452
|
-
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
|
-
statement_descriptor?:Invoice.StatementDescriptor;
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* @description Billing address for the invoice.
|
|
459
|
-
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
|
-
billing_address?:Invoice.BillingAddress;
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* @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.
|
|
466
|
-
|
|
467
|
-
*/
|
|
468
|
-
|
|
469
|
-
einvoice?:Invoice.Einvoice;
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* @description Details of `tax_withheld` against this invoice.
|
|
473
|
-
|
|
474
|
-
*/
|
|
475
|
-
|
|
476
|
-
linked_taxes_withheld?:Invoice.LinkedTaxWithheld[];
|
|
477
|
-
site_details_at_creation?:Invoice.SiteDetailsAtCreation;
|
|
478
|
-
tax_origin?:Invoice.TaxOrigin;
|
|
6
|
+
id: string;
|
|
7
|
+
po_number?: string;
|
|
8
|
+
customer_id: string;
|
|
9
|
+
subscription_id?: string;
|
|
10
|
+
recurring: boolean;
|
|
11
|
+
status:
|
|
12
|
+
| 'paid'
|
|
13
|
+
| 'posted'
|
|
14
|
+
| 'payment_due'
|
|
15
|
+
| 'not_paid'
|
|
16
|
+
| 'voided'
|
|
17
|
+
| 'pending';
|
|
18
|
+
vat_number?: string;
|
|
19
|
+
price_type: PriceType;
|
|
20
|
+
date?: number;
|
|
21
|
+
due_date?: number;
|
|
22
|
+
net_term_days?: number;
|
|
23
|
+
exchange_rate?: number;
|
|
24
|
+
currency_code: string;
|
|
25
|
+
total?: number;
|
|
26
|
+
amount_paid?: number;
|
|
27
|
+
amount_adjusted?: number;
|
|
28
|
+
write_off_amount?: number;
|
|
29
|
+
credits_applied?: number;
|
|
30
|
+
amount_due?: number;
|
|
31
|
+
paid_at?: number;
|
|
32
|
+
dunning_status?: 'in_progress' | 'exhausted' | 'stopped' | 'success';
|
|
33
|
+
next_retry_at?: number;
|
|
34
|
+
voided_at?: number;
|
|
35
|
+
resource_version?: number;
|
|
36
|
+
updated_at?: number;
|
|
37
|
+
sub_total: number;
|
|
38
|
+
sub_total_in_local_currency?: number;
|
|
39
|
+
total_in_local_currency?: number;
|
|
40
|
+
local_currency_code?: string;
|
|
41
|
+
tax: number;
|
|
42
|
+
local_currency_exchange_rate?: number;
|
|
43
|
+
first_invoice?: boolean;
|
|
44
|
+
new_sales_amount?: number;
|
|
45
|
+
has_advance_charges?: boolean;
|
|
46
|
+
term_finalized: boolean;
|
|
47
|
+
is_gifted: boolean;
|
|
48
|
+
generated_at?: number;
|
|
49
|
+
expected_payment_date?: number;
|
|
50
|
+
amount_to_collect?: number;
|
|
51
|
+
round_off_amount?: number;
|
|
52
|
+
line_items?: Invoice.LineItem[];
|
|
53
|
+
discounts?: Invoice.Discount[];
|
|
54
|
+
line_item_discounts?: Invoice.LineItemDiscount[];
|
|
55
|
+
taxes?: Invoice.Tax[];
|
|
56
|
+
line_item_taxes?: Invoice.LineItemTax[];
|
|
57
|
+
line_item_tiers?: Invoice.LineItemTier[];
|
|
58
|
+
linked_payments?: Invoice.LinkedPayment[];
|
|
59
|
+
dunning_attempts?: Invoice.DunningAttempt[];
|
|
60
|
+
applied_credits?: Invoice.AppliedCredit[];
|
|
61
|
+
adjustment_credit_notes?: Invoice.AdjustmentCreditNote[];
|
|
62
|
+
issued_credit_notes?: Invoice.IssuedCreditNote[];
|
|
63
|
+
linked_orders?: Invoice.LinkedOrder[];
|
|
64
|
+
notes?: Invoice.Note[];
|
|
65
|
+
shipping_address?: Invoice.ShippingAddress;
|
|
66
|
+
statement_descriptor?: Invoice.StatementDescriptor;
|
|
67
|
+
billing_address?: Invoice.BillingAddress;
|
|
68
|
+
einvoice?: Invoice.Einvoice;
|
|
69
|
+
payment_owner?: string;
|
|
70
|
+
void_reason_code?: string;
|
|
71
|
+
deleted: boolean;
|
|
72
|
+
tax_category?: string;
|
|
73
|
+
vat_number_prefix?: string;
|
|
74
|
+
channel?: Channel;
|
|
75
|
+
business_entity_id?: string;
|
|
76
|
+
site_details_at_creation?: Invoice.SiteDetailsAtCreation;
|
|
77
|
+
tax_origin?: Invoice.TaxOrigin;
|
|
479
78
|
}
|
|
480
|
-
export namespace Invoice {
|
|
481
|
-
export class InvoiceResource {
|
|
482
|
-
/**
|
|
483
|
-
* @description Creates an invoice for [charge-items](./items?prod_cat_ver=2) and [one-time charges](https://www.chargebee.com/docs/2.0/charges.html). The item prices must belong to items of `type` `charge`.
|
|
484
|
-
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
|
-
create_for_charge_items_and_charges(input:CreateForChargeItemsAndChargesInputParam):ChargebeeRequest<CreateForChargeItemsAndChargesResponse>;
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* @description This API is used to stop dunning for "Payment Due" invoices that have been enabled for Auto Collection. When dunning is stopped, the status of the invoice will be changed to "Not Paid".
|
|
491
|
-
|
|
492
|
-
*/
|
|
493
|
-
|
|
494
|
-
stop_dunning(invoice_id:string, input?:StopDunningInputParam):ChargebeeRequest<StopDunningResponse>;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* @description Use this endpoint to import invoices that are created outside of Chargebee; for example, import invoices created with a commercial accounting software to Chargebee. This allows you to conveniently manage invoices in one place.
|
|
498
|
-
|
|
499
|
-
*/
|
|
500
|
-
|
|
501
|
-
import_invoice(input:ImportInvoiceInputParam):ChargebeeRequest<ImportInvoiceResponse>;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* @description The API applies [excess payments](https://apidocs.chargebee.com/docs/api/customers#customer_excess_payments) to an invoice. Once an excess payment is applied, the [invoice.amount_due](invoices#invoice_amount_due) is recalculated. The invoice `status` changes to either `paid` or `payment_due` depending on how much excess payment is applied to the invoice amount.
|
|
505
|
-
|
|
506
|
-
For example, if you have an excess payment of $25.00, and the invoice to which you want to apply this excess payment has a balance of $50. Once you apply this excess payment, the invoice status changes to `paid`, and [invoice.amount_due](invoices#invoice_amount_due) is adjusted to $25.00.
|
|
507
|
-
|
|
508
|
-
*/
|
|
509
|
-
|
|
510
|
-
apply_payments(invoice_id:string, input?:ApplyPaymentsInputParam):ChargebeeRequest<ApplyPaymentsResponse>;
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* @description Updates the [`quantity`](/docs/api/invoices#invoice_line_items_quantity) for `metered` [`line_items`](/docs/api/invoices#invoice_line_items) of an invoice to reflect the latest [usage](https://apidocs.chargebee.com/docs/api/usages) data.
|
|
514
|
-
|
|
515
|
-
**Note:** This operation is done automatically while [closing](https://apidocs.chargebee.com/docs/api/invoices#close_a_pending_invoice) the invoice.
|
|
516
|
-
|
|
517
|
-
*/
|
|
518
|
-
|
|
519
|
-
sync_usages(invoice_id:string):ChargebeeRequest<SyncUsagesResponse>;
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* @description This endpoint is used to delete line items from "Pending" invoice.
|
|
523
|
-
|
|
524
|
-
*/
|
|
525
|
-
|
|
526
|
-
delete_line_items(invoice_id:string, input?:DeleteLineItemsInputParam):ChargebeeRequest<DeleteLineItemsResponse>;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* @description This API applies [available credits](customers#customer_balances) to an invoice. After credits are applied, [invoice.amount_due](invoices#invoice_amount_due) is recalculated. The invoice status changes to either `paid` or `payment_due` depending on how much credit is applied to the invoice amount.
|
|
530
|
-
|
|
531
|
-
*/
|
|
532
|
-
|
|
533
|
-
apply_credits(invoice_id:string, input?:ApplyCreditsInputParam):ChargebeeRequest<ApplyCreditsResponse>;
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* @description Lists all the Invoices.
|
|
537
|
-
|
|
538
|
-
*/
|
|
539
|
-
|
|
540
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* @description Retrieve the invoice for the specified invoice id.
|
|
544
|
-
|
|
545
|
-
*/
|
|
546
|
-
|
|
547
|
-
retrieve(invoice_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @description Gets the invoice as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.
|
|
551
|
-
|
|
552
|
-
#### Related Tutorial
|
|
553
|
-
|
|
554
|
-
* [Check out customer portal tutorial on how to download invoice as PDF.](//www.chargebee.com/tutorials/customer-portal-sample.html#downloading_invoices_as_pdf)
|
|
555
|
-
|
|
556
|
-
*/
|
|
557
|
-
|
|
558
|
-
pdf(invoice_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* @description Download the e-invoice 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-invoice/tree/).
|
|
562
|
-
**Note**
|
|
563
|
-
|
|
564
|
-
* You can only download e-invoices when their `status` is `success`.
|
|
565
|
-
* 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-invoice/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/), which is the Base64-encoded version of the PDF.
|
|
566
|
-
|
|
567
|
-
*/
|
|
568
|
-
|
|
569
|
-
download_einvoice(invoice_id:string):ChargebeeRequest<DownloadEinvoiceResponse>;
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
573
|
-
|
|
574
|
-
*/
|
|
575
|
-
|
|
576
|
-
list_payment_reference_numbers(input?:ListPaymentReferenceNumbersInputParam):ChargebeeRequest<ListPaymentReferenceNumbersResponse>;
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* @description Adds a one-time charge to a [pending](https://apidocs.chargebee.com/docs/api/invoices#invoice_status) invoice. A one-time charge is a charge that is added ad hoc to the invoice and does not represent a predefined [item price](https:/apidocs.chargebee.com/docs/api/item_prices). It appears in the invoice as a [line_item](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#invoice_line_items) of [entity_type](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#invoice_line_items_entity_type) `adhoc`.
|
|
580
|
-
|
|
581
|
-
*/
|
|
582
|
-
|
|
583
|
-
add_charge(invoice_id:string, input:AddChargeInputParam):ChargebeeRequest<AddChargeResponse>;
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* @description This endpoint is used when [metered billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled and it adds a [charge-item price](./item_prices?prod_cat_ver=2) to a `pending` invoice. To collect the accumulated charges by closing the invoice, call [Close a pending invoice](./invoices?prod_cat_ver=2#close_a_pending_invoice).
|
|
587
|
-
|
|
588
|
-
*/
|
|
589
|
-
|
|
590
|
-
add_charge_item(invoice_id:string, input:AddChargeItemInputParam):ChargebeeRequest<AddChargeItemResponse>;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* @description Invoices for a subscription are created with a `pending` `status` when the subscription has `create_pending_invoices` attribute set to `true`. This API call finalizes a `pending` invoice. Any `refundable_credits` and `excess_payments` for the customer are applied to the invoice, and any payment due is collected automatically if `auto_collection` is `on` for the customer.
|
|
594
|
-
|
|
595
|
-
#### Automation
|
|
596
|
-
|
|
597
|
-
This operation can be automated by using a [site setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). Moreover, the automation can be overridden at the [customer](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices) and [subscription](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) level.
|
|
598
|
-
|
|
599
|
-
*/
|
|
600
|
-
|
|
601
|
-
close(invoice_id:string, input?:CloseInputParam):ChargebeeRequest<CloseResponse>;
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* @description **Important:**
|
|
605
|
-
|
|
606
|
-
* Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](https://apidocs.chargebee.com/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
607
|
-
* This endpoint returns an error if a payment is initiated for an invoice with a [status](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2#invoice_status) of `payment_due` associated with the `app_store` and `play_store` [channels](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2#invoice_channel).
|
|
608
|
-
|
|
609
|
-
This API is used to collect payments for `payment_due` and `not_paid invoices`. If no payment methods are present for the customer or if the payment is unsuccessful, the corresponding error will be thrown.
|
|
610
|
-
|
|
611
|
-
Pass `authorization_transaction_id` to capture the already blocked funds to collect payments. Note that if the invoice due amount is greater than the authorized amount, the invoice status is returned as `payment_due`.
|
|
612
|
-
|
|
613
|
-
*/
|
|
614
|
-
|
|
615
|
-
collect_payment(invoice_id:string, input?:CollectPaymentInputParam):ChargebeeRequest<CollectPaymentResponse>;
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* @description To record a [offline payment](https://www.chargebee.com/docs/offline_payments.html) for an invoice.
|
|
619
|
-
|
|
620
|
-
The invoice status will be marked as 'paid' if its amount due becomes 0 because of this recorded payment.
|
|
621
|
-
|
|
622
|
-
**Note:** If the payment transaction amount is more than the invoice due amount, the remaining transaction amount will be added to the customer's Excess Payments balance to be used against other invoices.
|
|
623
|
-
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
record_payment(invoice_id:string, input:RecordPaymentInputParam):ChargebeeRequest<RecordPaymentResponse>;
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* @description Records [tax_withheld](/docs/api/tax_withheld) by the customer against the invoice specified. This operation is allowed only when all of the following conditions are true:
|
|
630
|
-
|
|
631
|
-
* Tax Amount Withheld is enabled.
|
|
632
|
-
* The `invoice` does not have a `linked_taxes_withheld` record associated with it already.
|
|
633
|
-
* `invoice.amount_due` is greater than zero.
|
|
634
|
-
* `invoice.status` is one of the following: `payment_due`, `not_paid`, or `posted`.
|
|
635
|
-
|
|
636
|
-
*/
|
|
637
|
-
|
|
638
|
-
record_tax_withheld(invoice_id:string, input:RecordTaxWithheldInputParam):ChargebeeRequest<RecordTaxWithheldResponse>;
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* @description Removes a [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) record from the `invoice` specified. This operation is allowed only when all of the following conditions are true:
|
|
642
|
-
|
|
643
|
-
* [invoice.status](/docs/api/invoices#invoice_status) is one of the following: `payment_due`, `not_paid`, or `posted`.
|
|
644
|
-
* There are no [adjustment_credit_notes](/docs/api/invoices#invoice_adjustment_credit_notes) associated with the invoice.
|
|
645
|
-
* There are no [issued_credit_notes](/docs/api/invoices#invoice_issued_credit_notes) associated with the invoice.
|
|
646
|
-
|
|
647
|
-
*/
|
|
648
|
-
|
|
649
|
-
remove_tax_withheld(invoice_id:string, input:RemoveTaxWithheldInputParam):ChargebeeRequest<RemoveTaxWithheldResponse>;
|
|
650
|
-
|
|
651
|
-
/**
|
|
652
|
-
* @description Refunds the invoice. The [refund](https://www.chargebee.com/docs/refunds.html) request is processed via the payment gateway originally used to charge the customer. You can choose to either make a full refund for the entire amount or make many partial refunds until you reach the total amount charged for the invoice. The API returns an error if an attempt is made to:
|
|
653
|
-
|
|
654
|
-
* Refund an offline invoice. For such invoices, use the [Record refund API](/docs/api/invoices#record_refund_for_an_invoice).
|
|
655
|
-
* Refund a fully refunded invoice.
|
|
656
|
-
|
|
657
|
-
If the refund transaction succeeds, a `credit_note` capturing this refund detail is created for the invoice.
|
|
658
|
-
|
|
659
|
-
*/
|
|
660
|
-
|
|
661
|
-
refund(invoice_id:string, input?:RefundInputParam):ChargebeeRequest<RefundResponse>;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* @description Refunds the invoice. The refund is provided against the following in order of precedence:
|
|
665
|
-
|
|
666
|
-
* Offline [linked_payments](/docs/api/invoices#invoice_linked_payments)
|
|
667
|
-
* Any [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld)
|
|
668
|
-
* Online [linked_payments](/docs/api/invoices#invoice_linked_payments)
|
|
669
|
-
|
|
670
|
-
**Example**
|
|
671
79
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
80
|
+
export namespace Invoice {
|
|
81
|
+
export class InvoiceResource {
|
|
82
|
+
create(
|
|
83
|
+
input?: CreateInputParam,
|
|
84
|
+
headers?: ChargebeeRequestHeader,
|
|
85
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
86
|
+
|
|
87
|
+
createForChargeItemsAndCharges(
|
|
88
|
+
input: CreateForChargeItemsAndChargesInputParam,
|
|
89
|
+
headers?: ChargebeeRequestHeader,
|
|
90
|
+
): Promise<ChargebeeResponse<CreateForChargeItemsAndChargesResponse>>;
|
|
91
|
+
|
|
92
|
+
charge(
|
|
93
|
+
input: ChargeInputParam,
|
|
94
|
+
headers?: ChargebeeRequestHeader,
|
|
95
|
+
): Promise<ChargebeeResponse<ChargeResponse>>;
|
|
96
|
+
|
|
97
|
+
chargeAddon(
|
|
98
|
+
input: ChargeAddonInputParam,
|
|
99
|
+
headers?: ChargebeeRequestHeader,
|
|
100
|
+
): Promise<ChargebeeResponse<ChargeAddonResponse>>;
|
|
101
|
+
|
|
102
|
+
createForChargeItem(
|
|
103
|
+
input: CreateForChargeItemInputParam,
|
|
104
|
+
headers?: ChargebeeRequestHeader,
|
|
105
|
+
): Promise<ChargebeeResponse<CreateForChargeItemResponse>>;
|
|
106
|
+
|
|
107
|
+
stopDunning(
|
|
108
|
+
invoice_id: string,
|
|
109
|
+
input?: StopDunningInputParam,
|
|
110
|
+
headers?: ChargebeeRequestHeader,
|
|
111
|
+
): Promise<ChargebeeResponse<StopDunningResponse>>;
|
|
112
|
+
|
|
113
|
+
importInvoice(
|
|
114
|
+
input: ImportInvoiceInputParam,
|
|
115
|
+
headers?: ChargebeeRequestHeader,
|
|
116
|
+
): Promise<ChargebeeResponse<ImportInvoiceResponse>>;
|
|
117
|
+
|
|
118
|
+
applyPayments(
|
|
119
|
+
invoice_id: string,
|
|
120
|
+
input?: ApplyPaymentsInputParam,
|
|
121
|
+
headers?: ChargebeeRequestHeader,
|
|
122
|
+
): Promise<ChargebeeResponse<ApplyPaymentsResponse>>;
|
|
123
|
+
|
|
124
|
+
syncUsages(
|
|
125
|
+
invoice_id: string,
|
|
126
|
+
headers?: ChargebeeRequestHeader,
|
|
127
|
+
): Promise<ChargebeeResponse<SyncUsagesResponse>>;
|
|
128
|
+
|
|
129
|
+
deleteLineItems(
|
|
130
|
+
invoice_id: string,
|
|
131
|
+
input?: DeleteLineItemsInputParam,
|
|
132
|
+
headers?: ChargebeeRequestHeader,
|
|
133
|
+
): Promise<ChargebeeResponse<DeleteLineItemsResponse>>;
|
|
134
|
+
|
|
135
|
+
applyCredits(
|
|
136
|
+
invoice_id: string,
|
|
137
|
+
input?: ApplyCreditsInputParam,
|
|
138
|
+
headers?: ChargebeeRequestHeader,
|
|
139
|
+
): Promise<ChargebeeResponse<ApplyCreditsResponse>>;
|
|
140
|
+
|
|
141
|
+
list(
|
|
142
|
+
input?: ListInputParam,
|
|
143
|
+
headers?: ChargebeeRequestHeader,
|
|
144
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
145
|
+
|
|
146
|
+
invoicesForCustomer(
|
|
147
|
+
customer_id: string,
|
|
148
|
+
input?: InvoicesForCustomerInputParam,
|
|
149
|
+
headers?: ChargebeeRequestHeader,
|
|
150
|
+
): Promise<ChargebeeResponse<InvoicesForCustomerResponse>>;
|
|
151
|
+
|
|
152
|
+
invoicesForSubscription(
|
|
153
|
+
subscription_id: string,
|
|
154
|
+
input?: InvoicesForSubscriptionInputParam,
|
|
155
|
+
headers?: ChargebeeRequestHeader,
|
|
156
|
+
): Promise<ChargebeeResponse<InvoicesForSubscriptionResponse>>;
|
|
157
|
+
|
|
158
|
+
retrieve(
|
|
159
|
+
invoice_id: string,
|
|
160
|
+
headers?: ChargebeeRequestHeader,
|
|
161
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
162
|
+
|
|
163
|
+
pdf(
|
|
164
|
+
invoice_id: string,
|
|
165
|
+
input?: PdfInputParam,
|
|
166
|
+
headers?: ChargebeeRequestHeader,
|
|
167
|
+
): Promise<ChargebeeResponse<PdfResponse>>;
|
|
168
|
+
|
|
169
|
+
downloadEinvoice(
|
|
170
|
+
invoice_id: string,
|
|
171
|
+
headers?: ChargebeeRequestHeader,
|
|
172
|
+
): Promise<ChargebeeResponse<DownloadEinvoiceResponse>>;
|
|
173
|
+
|
|
174
|
+
listPaymentReferenceNumbers(
|
|
175
|
+
input?: ListPaymentReferenceNumbersInputParam,
|
|
176
|
+
headers?: ChargebeeRequestHeader,
|
|
177
|
+
): Promise<ChargebeeResponse<ListPaymentReferenceNumbersResponse>>;
|
|
178
|
+
|
|
179
|
+
addCharge(
|
|
180
|
+
invoice_id: string,
|
|
181
|
+
input: AddChargeInputParam,
|
|
182
|
+
headers?: ChargebeeRequestHeader,
|
|
183
|
+
): Promise<ChargebeeResponse<AddChargeResponse>>;
|
|
184
|
+
|
|
185
|
+
addAddonCharge(
|
|
186
|
+
invoice_id: string,
|
|
187
|
+
input: AddAddonChargeInputParam,
|
|
188
|
+
headers?: ChargebeeRequestHeader,
|
|
189
|
+
): Promise<ChargebeeResponse<AddAddonChargeResponse>>;
|
|
190
|
+
|
|
191
|
+
addChargeItem(
|
|
192
|
+
invoice_id: string,
|
|
193
|
+
input: AddChargeItemInputParam,
|
|
194
|
+
headers?: ChargebeeRequestHeader,
|
|
195
|
+
): Promise<ChargebeeResponse<AddChargeItemResponse>>;
|
|
196
|
+
|
|
197
|
+
close(
|
|
198
|
+
invoice_id: string,
|
|
199
|
+
input?: CloseInputParam,
|
|
200
|
+
headers?: ChargebeeRequestHeader,
|
|
201
|
+
): Promise<ChargebeeResponse<CloseResponse>>;
|
|
202
|
+
|
|
203
|
+
collectPayment(
|
|
204
|
+
invoice_id: string,
|
|
205
|
+
input?: CollectPaymentInputParam,
|
|
206
|
+
headers?: ChargebeeRequestHeader,
|
|
207
|
+
): Promise<ChargebeeResponse<CollectPaymentResponse>>;
|
|
208
|
+
|
|
209
|
+
recordPayment(
|
|
210
|
+
invoice_id: string,
|
|
211
|
+
input: RecordPaymentInputParam,
|
|
212
|
+
headers?: ChargebeeRequestHeader,
|
|
213
|
+
): Promise<ChargebeeResponse<RecordPaymentResponse>>;
|
|
214
|
+
|
|
215
|
+
recordTaxWithheld(
|
|
216
|
+
invoice_id: string,
|
|
217
|
+
input: RecordTaxWithheldInputParam,
|
|
218
|
+
headers?: ChargebeeRequestHeader,
|
|
219
|
+
): Promise<ChargebeeResponse<RecordTaxWithheldResponse>>;
|
|
220
|
+
|
|
221
|
+
removeTaxWithheld(
|
|
222
|
+
invoice_id: string,
|
|
223
|
+
input: RemoveTaxWithheldInputParam,
|
|
224
|
+
headers?: ChargebeeRequestHeader,
|
|
225
|
+
): Promise<ChargebeeResponse<RemoveTaxWithheldResponse>>;
|
|
226
|
+
|
|
227
|
+
refund(
|
|
228
|
+
invoice_id: string,
|
|
229
|
+
input?: RefundInputParam,
|
|
230
|
+
headers?: ChargebeeRequestHeader,
|
|
231
|
+
): Promise<ChargebeeResponse<RefundResponse>>;
|
|
232
|
+
|
|
233
|
+
recordRefund(
|
|
234
|
+
invoice_id: string,
|
|
235
|
+
input: RecordRefundInputParam,
|
|
236
|
+
headers?: ChargebeeRequestHeader,
|
|
237
|
+
): Promise<ChargebeeResponse<RecordRefundResponse>>;
|
|
683
238
|
|
|
684
|
-
|
|
685
|
-
|
|
239
|
+
removePayment(
|
|
240
|
+
invoice_id: string,
|
|
241
|
+
input: RemovePaymentInputParam,
|
|
242
|
+
headers?: ChargebeeRequestHeader,
|
|
243
|
+
): Promise<ChargebeeResponse<RemovePaymentResponse>>;
|
|
686
244
|
|
|
687
|
-
|
|
245
|
+
removeCreditNote(
|
|
246
|
+
invoice_id: string,
|
|
247
|
+
input: RemoveCreditNoteInputParam,
|
|
248
|
+
headers?: ChargebeeRequestHeader,
|
|
249
|
+
): Promise<ChargebeeResponse<RemoveCreditNoteResponse>>;
|
|
688
250
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
* @description This API [removes payments](https://www.chargebee.com/docs/2.0/invoice-operations.html#actions-for-paid-invoices_remove-payment) applied to an invoice. Once the applied payment is removed, the invoice status returns to `not_paid` or `payment_due`. The removed payment is then added to the customer's excess payment balance.
|
|
251
|
+
voidInvoice(
|
|
252
|
+
invoice_id: string,
|
|
253
|
+
input?: VoidInvoiceInputParam,
|
|
254
|
+
headers?: ChargebeeRequestHeader,
|
|
255
|
+
): Promise<ChargebeeResponse<VoidInvoiceResponse>>;
|
|
695
256
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
* @description This API removes a credit note attached to an invoice. When you remove a credit note from an invoice, the invoice status returns to `not_paid`.
|
|
257
|
+
writeOff(
|
|
258
|
+
invoice_id: string,
|
|
259
|
+
input?: WriteOffInputParam,
|
|
260
|
+
headers?: ChargebeeRequestHeader,
|
|
261
|
+
): Promise<ChargebeeResponse<WriteOffResponse>>;
|
|
702
262
|
|
|
703
|
-
|
|
263
|
+
delete(
|
|
264
|
+
invoice_id: string,
|
|
265
|
+
input?: DeleteInputParam,
|
|
266
|
+
headers?: ChargebeeRequestHeader,
|
|
267
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
704
268
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
* @description Voids the specified invoice. Any payments must be [removed](/docs/api/invoices?prod_cat_ver=2#remove_payment_from_an_invoice) from the invoice before voiding it.
|
|
269
|
+
updateDetails(
|
|
270
|
+
invoice_id: string,
|
|
271
|
+
input?: UpdateDetailsInputParam,
|
|
272
|
+
headers?: ChargebeeRequestHeader,
|
|
273
|
+
): Promise<ChargebeeResponse<UpdateDetailsResponse>>;
|
|
711
274
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
275
|
+
installments(
|
|
276
|
+
invoice_id: string,
|
|
277
|
+
input: InstallmentsInputParam,
|
|
278
|
+
headers?: ChargebeeRequestHeader,
|
|
279
|
+
): Promise<ChargebeeResponse<InstallmentsResponse>>;
|
|
715
280
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
/**
|
|
721
|
-
* @description This API writes off an Invoice.
|
|
281
|
+
resendEinvoice(
|
|
282
|
+
invoice_id: string,
|
|
283
|
+
headers?: ChargebeeRequestHeader,
|
|
284
|
+
): Promise<ChargebeeResponse<ResendEinvoiceResponse>>;
|
|
722
285
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
* @description Deletes the specified invoice. Any payments must be [removed](/docs/api/invoices?prod_cat_ver=2#remove_payment_from_an_invoice) from the invoice before deleting it.
|
|
729
|
-
**Caution**
|
|
730
|
-
|
|
731
|
-
All associated [usages](/docs/api/usages?prod_cat_ver=2) are permanently deleted on deleting an invoice. If you want to regenerate such an invoice, [add](/docs/api/usages?prod_cat_ver=2#create_a_usage) or [bulk import](https://www.chargebee.com/docs/2.0/bulk-operations.html#overview_available-bulk-operations) usages before invoice regeneration.
|
|
732
|
-
|
|
733
|
-
* Any [promotional credits](/docs/api/promotional_credits?prod_cat_ver=2) or [credit notes](/docs/api/credit_notes?prod_cat_ver=2) applied to the invoice are removed.
|
|
734
|
-
* If an invoice for the current term of a subscription is deleted and the subscription is changed later with `proration` enabled, no prorated credits are issued.
|
|
735
|
-
|
|
736
|
-
*/
|
|
737
|
-
|
|
738
|
-
delete(invoice_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* @description This API allows you to update the invoice Billing/Shipping address, VAT and PO number. During this operation if Billing Info (Billing Address, vat_number), Shipping info and PO number are not already present in the system the data will be added. If data is already present, the existing values will be replaced. If info is present in the system, but not passed as part of the request, the info will not be removed from the system.
|
|
286
|
+
sendEinvoice(
|
|
287
|
+
invoice_id: string,
|
|
288
|
+
headers?: ChargebeeRequestHeader,
|
|
289
|
+
): Promise<ChargebeeResponse<SendEinvoiceResponse>>;
|
|
290
|
+
}
|
|
742
291
|
|
|
743
|
-
|
|
292
|
+
export interface CreateResponse {
|
|
293
|
+
invoice: Invoice;
|
|
294
|
+
}
|
|
744
295
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* @description Creates installments for an invoice, enabling the invoice to be paid in multiple, scheduled payments. **Note: The invoice must be in payment_due.**
|
|
296
|
+
export interface CreateForChargeItemsAndChargesResponse {
|
|
297
|
+
invoice: Invoice;
|
|
298
|
+
}
|
|
751
299
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* @description Resend failed einvoice of an invoice to the customer using this API.
|
|
300
|
+
export interface ChargeResponse {
|
|
301
|
+
invoice: Invoice;
|
|
302
|
+
}
|
|
758
303
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* @description This endpoint is used to send an e-invoice for invoice.
|
|
304
|
+
export interface ChargeAddonResponse {
|
|
305
|
+
invoice: Invoice;
|
|
306
|
+
}
|
|
765
307
|
|
|
766
|
-
|
|
308
|
+
export interface CreateForChargeItemResponse {
|
|
309
|
+
invoice: Invoice;
|
|
310
|
+
}
|
|
767
311
|
|
|
768
|
-
|
|
312
|
+
export interface StopDunningResponse {
|
|
313
|
+
invoice: Invoice;
|
|
314
|
+
}
|
|
769
315
|
|
|
770
|
-
|
|
316
|
+
export interface ImportInvoiceResponse {
|
|
317
|
+
invoice: Invoice;
|
|
318
|
+
credit_note?: CreditNote;
|
|
319
|
+
}
|
|
771
320
|
|
|
772
|
-
|
|
321
|
+
export interface ApplyPaymentsResponse {
|
|
322
|
+
invoice: Invoice;
|
|
323
|
+
}
|
|
773
324
|
|
|
774
|
-
|
|
325
|
+
export interface SyncUsagesResponse {
|
|
326
|
+
invoice: Invoice;
|
|
327
|
+
}
|
|
775
328
|
|
|
776
|
-
|
|
329
|
+
export interface DeleteLineItemsResponse {
|
|
330
|
+
invoice: Invoice;
|
|
331
|
+
}
|
|
777
332
|
|
|
778
|
-
|
|
333
|
+
export interface ApplyCreditsResponse {
|
|
334
|
+
invoice: Invoice;
|
|
335
|
+
}
|
|
779
336
|
|
|
337
|
+
export interface ListResponse {
|
|
338
|
+
list: { invoice: Invoice }[];
|
|
339
|
+
next_offset?: string;
|
|
340
|
+
}
|
|
780
341
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
342
|
+
export interface InvoicesForCustomerResponse {
|
|
343
|
+
list: { invoice: Invoice }[];
|
|
344
|
+
next_offset?: string;
|
|
784
345
|
}
|
|
785
|
-
|
|
786
|
-
|
|
346
|
+
|
|
347
|
+
export interface InvoicesForSubscriptionResponse {
|
|
348
|
+
list: { invoice: Invoice }[];
|
|
349
|
+
next_offset?: string;
|
|
787
350
|
}
|
|
788
|
-
export interface CreateInputParam {
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* @description Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription_id' is not specified.
|
|
792
351
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* @description Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.(not applicable for consolidated invoice).
|
|
352
|
+
export interface RetrieveResponse {
|
|
353
|
+
invoice: Invoice;
|
|
354
|
+
}
|
|
799
355
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* @description The currency code (ISO 4217 format) of the invoice amount.
|
|
356
|
+
export interface PdfResponse {
|
|
357
|
+
download: Download;
|
|
358
|
+
}
|
|
806
359
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* @description The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
|
|
360
|
+
export interface DownloadEinvoiceResponse {
|
|
361
|
+
downloads: Download[];
|
|
362
|
+
}
|
|
813
363
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* @description A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer.
|
|
364
|
+
export interface ListPaymentReferenceNumbersResponse {
|
|
365
|
+
list: { payment_reference_number: PaymentReferenceNumber }[];
|
|
366
|
+
next_offset?: string;
|
|
367
|
+
}
|
|
820
368
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* @description Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice.
|
|
369
|
+
export interface AddChargeResponse {
|
|
370
|
+
invoice: Invoice;
|
|
371
|
+
}
|
|
827
372
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* @description Purchase Order Number for this invoice.
|
|
373
|
+
export interface AddAddonChargeResponse {
|
|
374
|
+
invoice: Invoice;
|
|
375
|
+
}
|
|
834
376
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
* @description List of Coupons to be added.
|
|
377
|
+
export interface AddChargeItemResponse {
|
|
378
|
+
invoice: Invoice;
|
|
379
|
+
}
|
|
841
380
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* @description Authorization transaction to be captured.
|
|
381
|
+
export interface CloseResponse {
|
|
382
|
+
invoice: Invoice;
|
|
383
|
+
}
|
|
848
384
|
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* @description Payment source to be used for this payment.
|
|
385
|
+
export interface CollectPaymentResponse {
|
|
386
|
+
invoice: Invoice;
|
|
387
|
+
transaction: Transaction;
|
|
388
|
+
}
|
|
855
389
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* @description If specified, the customer level auto collection will be overridden. \* on - Whenever an invoice is created, an automatic attempt will be made to charge. \* off - Whenever an invoice is created as payment due.
|
|
390
|
+
export interface RecordPaymentResponse {
|
|
391
|
+
invoice: Invoice;
|
|
392
|
+
transaction: Transaction;
|
|
393
|
+
}
|
|
862
394
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* @description Token generated by Chargebee JS representing payment method details.
|
|
395
|
+
export interface RecordTaxWithheldResponse {
|
|
396
|
+
invoice: Invoice;
|
|
397
|
+
}
|
|
869
398
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* @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.
|
|
399
|
+
export interface RemoveTaxWithheldResponse {
|
|
400
|
+
invoice: Invoice;
|
|
401
|
+
}
|
|
876
402
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
* @description Indicates whether the payment source should be retained for the customer.
|
|
403
|
+
export interface RefundResponse {
|
|
404
|
+
invoice: Invoice;
|
|
405
|
+
transaction: Transaction;
|
|
406
|
+
credit_note?: CreditNote;
|
|
407
|
+
}
|
|
883
408
|
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
* @description The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant
|
|
409
|
+
export interface RecordRefundResponse {
|
|
410
|
+
invoice: Invoice;
|
|
411
|
+
transaction?: Transaction;
|
|
412
|
+
credit_note?: CreditNote;
|
|
413
|
+
}
|
|
890
414
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* @description Parameters for shipping_address
|
|
415
|
+
export interface RemovePaymentResponse {
|
|
416
|
+
invoice: Invoice;
|
|
417
|
+
transaction: Transaction;
|
|
418
|
+
}
|
|
897
419
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* @description Parameters for statement_descriptor
|
|
420
|
+
export interface RemoveCreditNoteResponse {
|
|
421
|
+
invoice: Invoice;
|
|
422
|
+
credit_note: CreditNote;
|
|
423
|
+
}
|
|
904
424
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* @description Parameters for card
|
|
425
|
+
export interface VoidInvoiceResponse {
|
|
426
|
+
invoice: Invoice;
|
|
427
|
+
credit_note?: CreditNote;
|
|
428
|
+
}
|
|
911
429
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* @description Parameters for bank_account
|
|
430
|
+
export interface WriteOffResponse {
|
|
431
|
+
invoice: Invoice;
|
|
432
|
+
credit_note: CreditNote;
|
|
433
|
+
}
|
|
918
434
|
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* @description Parameters for payment_method
|
|
435
|
+
export interface DeleteResponse {
|
|
436
|
+
invoice: Invoice;
|
|
437
|
+
}
|
|
925
438
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* @description Parameters for payment_intent
|
|
439
|
+
export interface UpdateDetailsResponse {
|
|
440
|
+
invoice: Invoice;
|
|
441
|
+
}
|
|
932
442
|
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* @description Parameters for addons
|
|
443
|
+
export interface InstallmentsResponse {
|
|
444
|
+
invoice: Invoice;
|
|
445
|
+
}
|
|
939
446
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* @description Parameters for charges
|
|
447
|
+
export interface ResendEinvoiceResponse {
|
|
448
|
+
invoice: Invoice;
|
|
449
|
+
}
|
|
946
450
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* @description Parameters for notes_to_remove
|
|
451
|
+
export interface SendEinvoiceResponse {
|
|
452
|
+
invoice: Invoice;
|
|
453
|
+
}
|
|
953
454
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
455
|
+
export interface LineItem {
|
|
456
|
+
id?: string;
|
|
457
|
+
subscription_id?: string;
|
|
458
|
+
date_from: number;
|
|
459
|
+
date_to: number;
|
|
460
|
+
unit_amount: number;
|
|
461
|
+
quantity?: number;
|
|
462
|
+
amount?: number;
|
|
463
|
+
pricing_model?:
|
|
464
|
+
| 'flat_fee'
|
|
465
|
+
| 'per_unit'
|
|
466
|
+
| 'tiered'
|
|
467
|
+
| 'volume'
|
|
468
|
+
| 'stairstep';
|
|
469
|
+
is_taxed: boolean;
|
|
470
|
+
tax_amount?: number;
|
|
471
|
+
tax_rate?: number;
|
|
472
|
+
unit_amount_in_decimal?: string;
|
|
473
|
+
quantity_in_decimal?: string;
|
|
474
|
+
amount_in_decimal?: string;
|
|
475
|
+
discount_amount?: number;
|
|
476
|
+
item_level_discount_amount?: number;
|
|
477
|
+
usage_percentage?: string;
|
|
478
|
+
reference_line_item_id?: string;
|
|
479
|
+
description: string;
|
|
480
|
+
entity_description?: string;
|
|
481
|
+
entity_type:
|
|
482
|
+
| 'adhoc'
|
|
483
|
+
| 'plan_item_price'
|
|
484
|
+
| 'addon_item_price'
|
|
485
|
+
| 'charge_item_price'
|
|
486
|
+
| 'plan_setup'
|
|
487
|
+
| 'plan'
|
|
488
|
+
| 'addon';
|
|
489
|
+
tax_exempt_reason?:
|
|
490
|
+
| 'tax_not_configured'
|
|
491
|
+
| 'region_non_taxable'
|
|
492
|
+
| 'export'
|
|
493
|
+
| 'customer_exempt'
|
|
494
|
+
| 'product_exempt'
|
|
495
|
+
| 'zero_rated'
|
|
496
|
+
| 'reverse_charge'
|
|
497
|
+
| 'high_value_physical_goods'
|
|
498
|
+
| 'zero_value_item'
|
|
499
|
+
| 'tax_not_configured_external_provider';
|
|
500
|
+
entity_id?: string;
|
|
501
|
+
customer_id?: string;
|
|
502
|
+
}
|
|
503
|
+
export interface Discount {
|
|
504
|
+
amount: number;
|
|
505
|
+
description?: string;
|
|
506
|
+
entity_type:
|
|
507
|
+
| 'item_level_coupon'
|
|
508
|
+
| 'document_level_coupon'
|
|
509
|
+
| 'promotional_credits'
|
|
510
|
+
| 'prorated_credits'
|
|
511
|
+
| 'item_level_discount'
|
|
512
|
+
| 'document_level_discount';
|
|
513
|
+
entity_id?: string;
|
|
514
|
+
coupon_set_code?: string;
|
|
515
|
+
}
|
|
516
|
+
export interface LineItemDiscount {
|
|
517
|
+
line_item_id: string;
|
|
518
|
+
discount_type:
|
|
519
|
+
| 'item_level_coupon'
|
|
520
|
+
| 'document_level_coupon'
|
|
521
|
+
| 'promotional_credits'
|
|
522
|
+
| 'prorated_credits'
|
|
523
|
+
| 'item_level_discount'
|
|
524
|
+
| 'document_level_discount';
|
|
525
|
+
coupon_id?: string;
|
|
526
|
+
entity_id?: string;
|
|
527
|
+
discount_amount: number;
|
|
528
|
+
}
|
|
529
|
+
export interface Tax {
|
|
530
|
+
name: string;
|
|
531
|
+
amount: number;
|
|
532
|
+
description?: string;
|
|
533
|
+
}
|
|
534
|
+
export interface LineItemTax {
|
|
535
|
+
line_item_id?: string;
|
|
536
|
+
tax_name: string;
|
|
537
|
+
tax_rate: number;
|
|
538
|
+
date_to?: number;
|
|
539
|
+
date_from?: number;
|
|
540
|
+
prorated_taxable_amount?: number;
|
|
541
|
+
is_partial_tax_applied?: boolean;
|
|
542
|
+
is_non_compliance_tax?: boolean;
|
|
543
|
+
taxable_amount: number;
|
|
544
|
+
tax_amount: number;
|
|
545
|
+
tax_juris_type?:
|
|
546
|
+
| 'country'
|
|
547
|
+
| 'federal'
|
|
548
|
+
| 'state'
|
|
549
|
+
| 'county'
|
|
550
|
+
| 'city'
|
|
551
|
+
| 'special'
|
|
552
|
+
| 'unincorporated'
|
|
553
|
+
| 'other';
|
|
554
|
+
tax_juris_name?: string;
|
|
555
|
+
tax_juris_code?: string;
|
|
556
|
+
tax_amount_in_local_currency?: number;
|
|
557
|
+
local_currency_code?: string;
|
|
558
|
+
}
|
|
559
|
+
export interface LineItemTier {
|
|
560
|
+
line_item_id?: string;
|
|
561
|
+
starting_unit: number;
|
|
562
|
+
ending_unit?: number;
|
|
563
|
+
quantity_used: number;
|
|
564
|
+
unit_amount: number;
|
|
565
|
+
starting_unit_in_decimal?: string;
|
|
566
|
+
ending_unit_in_decimal?: string;
|
|
567
|
+
quantity_used_in_decimal?: string;
|
|
568
|
+
unit_amount_in_decimal?: string;
|
|
569
|
+
}
|
|
570
|
+
export interface LinkedPayment {
|
|
571
|
+
txn_id: string;
|
|
572
|
+
applied_amount: number;
|
|
573
|
+
applied_at: number;
|
|
574
|
+
txn_status?:
|
|
575
|
+
| 'in_progress'
|
|
576
|
+
| 'success'
|
|
577
|
+
| 'voided'
|
|
578
|
+
| 'failure'
|
|
579
|
+
| 'timeout'
|
|
580
|
+
| 'needs_attention';
|
|
581
|
+
txn_date?: number;
|
|
582
|
+
txn_amount?: number;
|
|
583
|
+
}
|
|
584
|
+
export interface DunningAttempt {
|
|
585
|
+
attempt: number;
|
|
586
|
+
transaction_id?: string;
|
|
587
|
+
dunning_type: 'auto_collect' | 'offline' | 'direct_debit';
|
|
588
|
+
created_at?: number;
|
|
589
|
+
txn_status?:
|
|
590
|
+
| 'in_progress'
|
|
591
|
+
| 'success'
|
|
592
|
+
| 'voided'
|
|
593
|
+
| 'failure'
|
|
594
|
+
| 'timeout'
|
|
595
|
+
| 'needs_attention';
|
|
596
|
+
txn_amount?: number;
|
|
597
|
+
}
|
|
598
|
+
export interface AppliedCredit {
|
|
599
|
+
cn_id: string;
|
|
600
|
+
applied_amount: number;
|
|
601
|
+
applied_at: number;
|
|
602
|
+
cn_reason_code?:
|
|
603
|
+
| 'write_off'
|
|
604
|
+
| 'subscription_change'
|
|
605
|
+
| 'subscription_cancellation'
|
|
606
|
+
| 'subscription_pause'
|
|
607
|
+
| 'chargeback'
|
|
608
|
+
| 'product_unsatisfactory'
|
|
609
|
+
| 'service_unsatisfactory'
|
|
610
|
+
| 'order_change'
|
|
611
|
+
| 'order_cancellation'
|
|
612
|
+
| 'waiver'
|
|
613
|
+
| 'other'
|
|
614
|
+
| 'fraudulent';
|
|
615
|
+
cn_create_reason_code?: string;
|
|
616
|
+
cn_date?: number;
|
|
617
|
+
cn_status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
618
|
+
}
|
|
619
|
+
export interface AdjustmentCreditNote {
|
|
620
|
+
cn_id: string;
|
|
621
|
+
cn_reason_code?:
|
|
622
|
+
| 'write_off'
|
|
623
|
+
| 'subscription_change'
|
|
624
|
+
| 'subscription_cancellation'
|
|
625
|
+
| 'subscription_pause'
|
|
626
|
+
| 'chargeback'
|
|
627
|
+
| 'product_unsatisfactory'
|
|
628
|
+
| 'service_unsatisfactory'
|
|
629
|
+
| 'order_change'
|
|
630
|
+
| 'order_cancellation'
|
|
631
|
+
| 'waiver'
|
|
632
|
+
| 'other'
|
|
633
|
+
| 'fraudulent';
|
|
634
|
+
cn_create_reason_code?: string;
|
|
635
|
+
cn_date?: number;
|
|
636
|
+
cn_total?: number;
|
|
637
|
+
cn_status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
638
|
+
}
|
|
639
|
+
export interface IssuedCreditNote {
|
|
640
|
+
cn_id: string;
|
|
641
|
+
cn_reason_code?:
|
|
642
|
+
| 'write_off'
|
|
643
|
+
| 'subscription_change'
|
|
644
|
+
| 'subscription_cancellation'
|
|
645
|
+
| 'subscription_pause'
|
|
646
|
+
| 'chargeback'
|
|
647
|
+
| 'product_unsatisfactory'
|
|
648
|
+
| 'service_unsatisfactory'
|
|
649
|
+
| 'order_change'
|
|
650
|
+
| 'order_cancellation'
|
|
651
|
+
| 'waiver'
|
|
652
|
+
| 'other'
|
|
653
|
+
| 'fraudulent';
|
|
654
|
+
cn_create_reason_code?: string;
|
|
655
|
+
cn_date?: number;
|
|
656
|
+
cn_total?: number;
|
|
657
|
+
cn_status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
658
|
+
}
|
|
659
|
+
export interface LinkedOrder {
|
|
660
|
+
id: string;
|
|
661
|
+
document_number?: string;
|
|
662
|
+
status?:
|
|
663
|
+
| 'new'
|
|
664
|
+
| 'processing'
|
|
665
|
+
| 'complete'
|
|
666
|
+
| 'cancelled'
|
|
667
|
+
| 'voided'
|
|
668
|
+
| 'queued'
|
|
669
|
+
| 'awaiting_shipment'
|
|
670
|
+
| 'on_hold'
|
|
671
|
+
| 'delivered'
|
|
672
|
+
| 'shipped'
|
|
673
|
+
| 'partially_delivered'
|
|
674
|
+
| 'returned';
|
|
675
|
+
order_type?: 'manual' | 'system_generated';
|
|
676
|
+
reference_id?: string;
|
|
677
|
+
fulfillment_status?: string;
|
|
678
|
+
batch_id?: string;
|
|
679
|
+
created_at: number;
|
|
680
|
+
}
|
|
681
|
+
export interface Note {
|
|
682
|
+
entity_type:
|
|
683
|
+
| 'coupon'
|
|
684
|
+
| 'subscription'
|
|
685
|
+
| 'customer'
|
|
686
|
+
| 'plan_item_price'
|
|
687
|
+
| 'addon_item_price'
|
|
688
|
+
| 'charge_item_price'
|
|
689
|
+
| 'tax'
|
|
690
|
+
| 'plan'
|
|
691
|
+
| 'addon';
|
|
692
|
+
note: string;
|
|
693
|
+
entity_id?: string;
|
|
694
|
+
}
|
|
695
|
+
export interface ShippingAddress {
|
|
696
|
+
first_name?: string;
|
|
697
|
+
last_name?: string;
|
|
698
|
+
email?: string;
|
|
699
|
+
company?: string;
|
|
700
|
+
phone?: string;
|
|
701
|
+
line1?: string;
|
|
702
|
+
line2?: string;
|
|
703
|
+
line3?: string;
|
|
704
|
+
city?: string;
|
|
705
|
+
state_code?: string;
|
|
706
|
+
state?: string;
|
|
707
|
+
country?: string;
|
|
708
|
+
zip?: string;
|
|
709
|
+
validation_status?: ValidationStatus;
|
|
710
|
+
index: number;
|
|
711
|
+
}
|
|
712
|
+
export interface StatementDescriptor {
|
|
713
|
+
id: string;
|
|
714
|
+
descriptor?: string;
|
|
715
|
+
}
|
|
716
|
+
export interface BillingAddress {
|
|
717
|
+
first_name?: string;
|
|
718
|
+
last_name?: string;
|
|
719
|
+
email?: string;
|
|
720
|
+
company?: string;
|
|
721
|
+
phone?: string;
|
|
722
|
+
line1?: string;
|
|
723
|
+
line2?: string;
|
|
724
|
+
line3?: string;
|
|
725
|
+
city?: string;
|
|
726
|
+
state_code?: string;
|
|
727
|
+
state?: string;
|
|
728
|
+
country?: string;
|
|
729
|
+
zip?: string;
|
|
730
|
+
validation_status?: ValidationStatus;
|
|
731
|
+
}
|
|
732
|
+
export interface Einvoice {
|
|
733
|
+
id: string;
|
|
734
|
+
reference_number?: string;
|
|
735
|
+
status:
|
|
736
|
+
| 'scheduled'
|
|
737
|
+
| 'skipped'
|
|
738
|
+
| 'in_progress'
|
|
739
|
+
| 'success'
|
|
740
|
+
| 'failed'
|
|
741
|
+
| 'registered';
|
|
742
|
+
message?: string;
|
|
743
|
+
}
|
|
744
|
+
export interface SiteDetailsAtCreation {
|
|
745
|
+
timezone?: string;
|
|
746
|
+
organization_address?: object;
|
|
958
747
|
}
|
|
959
|
-
export interface
|
|
960
|
-
|
|
748
|
+
export interface TaxOrigin {
|
|
749
|
+
country?: string;
|
|
750
|
+
registration_number?: string;
|
|
961
751
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* @description Unique ID of the customer this invoice should be created for. Either this or `subscription_id` must be provided.
|
|
966
|
-
**Note**
|
|
967
|
-
|
|
968
|
-
The invoice is [linked](/docs/api?prod_cat_ver=2#mbe-linked-be) to the same [business entity](/docs/api?prod_cat_ver=2#mbe) as this customer.
|
|
969
|
-
.
|
|
970
|
-
|
|
971
|
-
*/
|
|
972
|
-
|
|
973
|
-
customer_id?:string;
|
|
974
|
-
|
|
975
|
-
/**
|
|
976
|
-
* @description Unique ID of the subscription this invoice should be created for. Either this or `customer_id` must be provided.
|
|
977
|
-
**Note**
|
|
978
|
-
|
|
979
|
-
The invoice is [linked](/docs/api?prod_cat_ver=2#mbe-linked-be) to the same [business entity](/docs/api?prod_cat_ver=2#mbe) as this subscription.
|
|
980
|
-
.
|
|
981
|
-
|
|
982
|
-
*/
|
|
983
|
-
|
|
984
|
-
subscription_id?:string;
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* @description The currency code (ISO 4217 format) of the invoice amount.
|
|
988
|
-
|
|
989
|
-
*/
|
|
990
|
-
|
|
991
|
-
currency_code?:string;
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* @description A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer.
|
|
995
|
-
|
|
996
|
-
*/
|
|
997
|
-
|
|
998
|
-
invoice_note?:string;
|
|
999
|
-
|
|
1000
|
-
/**
|
|
1001
|
-
* @description Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice.
|
|
1002
|
-
|
|
1003
|
-
*/
|
|
1004
|
-
|
|
1005
|
-
remove_general_note?:boolean;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* @description Purchase Order Number for this invoice.
|
|
1009
|
-
|
|
1010
|
-
*/
|
|
1011
|
-
|
|
1012
|
-
po_number?:string;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* @description List of Coupons to be added.
|
|
1016
|
-
|
|
1017
|
-
*/
|
|
1018
|
-
|
|
1019
|
-
coupon_ids?:string[];
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* @description Authorization transaction to be captured.
|
|
1023
|
-
|
|
1024
|
-
*/
|
|
1025
|
-
|
|
1026
|
-
authorization_transaction_id?:string;
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* @description Payment source to be used for this payment.
|
|
1030
|
-
|
|
1031
|
-
*/
|
|
1032
|
-
|
|
1033
|
-
payment_source_id?:string;
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* @description The customer level auto collection will be override if specified. \* on - Whenever an invoice is created, an automatic attempt will be made to charge. \* off - Whenever an invoice is created as payment due.
|
|
1037
|
-
|
|
1038
|
-
*/
|
|
1039
|
-
|
|
1040
|
-
auto_collection?:AutoCollection;
|
|
1041
|
-
|
|
1042
|
-
/**
|
|
1043
|
-
* @description The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
|
|
752
|
+
// REQUEST PARAMS
|
|
753
|
+
//---------------
|
|
1044
754
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
payment_initiator?:PaymentInitiator;
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* @description Parameters for shipping_address
|
|
1079
|
-
|
|
1080
|
-
*/
|
|
1081
|
-
|
|
1082
|
-
shipping_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};
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
* @description Creates an invoice for [charge-items](./items?prod_cat_ver=2) and [one-time charges](https://www.chargebee.com/docs/2.0/charges.html). The item prices must belong to items of `type` `charge`.
|
|
1086
|
-
|
|
1087
|
-
*/
|
|
1088
|
-
|
|
1089
|
-
statement_descriptor?:{additional_info?:string,descriptor?:string};
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* @description Parameters for card
|
|
1093
|
-
|
|
1094
|
-
*/
|
|
1095
|
-
|
|
1096
|
-
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};
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* @description Parameters for bank_account
|
|
1100
|
-
|
|
1101
|
-
*/
|
|
1102
|
-
|
|
1103
|
-
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};
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* @description Parameters for payment_method
|
|
1107
|
-
|
|
1108
|
-
*/
|
|
1109
|
-
|
|
1110
|
-
payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* @description Parameters for payment_intent
|
|
1114
|
-
|
|
1115
|
-
*/
|
|
1116
|
-
|
|
1117
|
-
payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card',reference_id?:string};
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* @description Parameters for item_prices
|
|
1121
|
-
|
|
1122
|
-
*/
|
|
1123
|
-
|
|
1124
|
-
item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* @description Parameters for item_tiers
|
|
1128
|
-
|
|
1129
|
-
*/
|
|
1130
|
-
|
|
1131
|
-
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* @description Parameters for charges
|
|
1135
|
-
|
|
1136
|
-
*/
|
|
1137
|
-
|
|
1138
|
-
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* @description Parameters for notes_to_remove
|
|
1142
|
-
|
|
1143
|
-
*/
|
|
1144
|
-
|
|
1145
|
-
notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* @description Parameters for discounts
|
|
1149
|
-
|
|
1150
|
-
*/
|
|
1151
|
-
|
|
1152
|
-
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
1153
|
-
tax_providers_fields?: { field_id?: string, field_value?: string, provider_name?: string }[];
|
|
755
|
+
export interface CreateInputParam {
|
|
756
|
+
customer_id?: string;
|
|
757
|
+
subscription_id?: string;
|
|
758
|
+
currency_code?: string;
|
|
759
|
+
invoice_date?: number;
|
|
760
|
+
invoice_note?: string;
|
|
761
|
+
remove_general_note?: boolean;
|
|
762
|
+
po_number?: string /**
|
|
763
|
+
* @deprecated Please refer API docs to use other attributes
|
|
764
|
+
*/;
|
|
765
|
+
|
|
766
|
+
coupon?: string;
|
|
767
|
+
coupon_ids?: string[];
|
|
768
|
+
authorization_transaction_id?: string;
|
|
769
|
+
payment_source_id?: string;
|
|
770
|
+
auto_collection?: AutoCollection;
|
|
771
|
+
token_id?: string;
|
|
772
|
+
replace_primary_payment_source?: boolean;
|
|
773
|
+
retain_payment_source?: boolean;
|
|
774
|
+
payment_initiator?: PaymentInitiator;
|
|
775
|
+
shipping_address?: ShippingAddressCreateInputParam;
|
|
776
|
+
statement_descriptor?: StatementDescriptorCreateInputParam;
|
|
777
|
+
card?: CardCreateInputParam;
|
|
778
|
+
bank_account?: BankAccountCreateInputParam;
|
|
779
|
+
payment_method?: PaymentMethodCreateInputParam;
|
|
780
|
+
payment_intent?: PaymentIntentCreateInputParam;
|
|
781
|
+
addons?: AddonsCreateInputParam[];
|
|
782
|
+
charges?: ChargesCreateInputParam[];
|
|
783
|
+
tax_providers_fields?: TaxProvidersFieldsCreateInputParam[];
|
|
784
|
+
notes_to_remove?: NotesToRemoveCreateInputParam[];
|
|
1154
785
|
}
|
|
1155
|
-
export interface
|
|
1156
|
-
|
|
786
|
+
export interface CreateForChargeItemsAndChargesInputParam {
|
|
787
|
+
customer_id?: string;
|
|
788
|
+
subscription_id?: string;
|
|
789
|
+
currency_code?: string;
|
|
790
|
+
invoice_note?: string;
|
|
791
|
+
remove_general_note?: boolean;
|
|
792
|
+
po_number?: string /**
|
|
793
|
+
* @deprecated Please refer API docs to use other attributes
|
|
794
|
+
*/;
|
|
795
|
+
|
|
796
|
+
coupon?: string;
|
|
797
|
+
coupon_ids?: string[];
|
|
798
|
+
authorization_transaction_id?: string;
|
|
799
|
+
payment_source_id?: string;
|
|
800
|
+
auto_collection?: AutoCollection;
|
|
801
|
+
invoice_date?: number;
|
|
802
|
+
token_id?: string;
|
|
803
|
+
replace_primary_payment_source?: boolean;
|
|
804
|
+
retain_payment_source?: boolean;
|
|
805
|
+
payment_initiator?: PaymentInitiator;
|
|
806
|
+
shipping_address?: ShippingAddressCreateForChargeItemsAndChargesInputParam;
|
|
807
|
+
statement_descriptor?: StatementDescriptorCreateForChargeItemsAndChargesInputParam;
|
|
808
|
+
card?: CardCreateForChargeItemsAndChargesInputParam;
|
|
809
|
+
bank_account?: BankAccountCreateForChargeItemsAndChargesInputParam;
|
|
810
|
+
payment_method?: PaymentMethodCreateForChargeItemsAndChargesInputParam;
|
|
811
|
+
payment_intent?: PaymentIntentCreateForChargeItemsAndChargesInputParam;
|
|
812
|
+
item_prices?: ItemPricesCreateForChargeItemsAndChargesInputParam[];
|
|
813
|
+
item_tiers?: ItemTiersCreateForChargeItemsAndChargesInputParam[];
|
|
814
|
+
charges?: ChargesCreateForChargeItemsAndChargesInputParam[];
|
|
815
|
+
notes_to_remove?: NotesToRemoveCreateForChargeItemsAndChargesInputParam[];
|
|
816
|
+
tax_providers_fields?: TaxProvidersFieldsCreateForChargeItemsAndChargesInputParam[];
|
|
817
|
+
discounts?: DiscountsCreateForChargeItemsAndChargesInputParam[];
|
|
818
|
+
}
|
|
819
|
+
export interface ChargeInputParam {
|
|
820
|
+
customer_id?: string;
|
|
821
|
+
subscription_id?: string;
|
|
822
|
+
currency_code?: string;
|
|
823
|
+
amount?: number;
|
|
824
|
+
amount_in_decimal?: string;
|
|
825
|
+
description: string;
|
|
826
|
+
date_from?: number;
|
|
827
|
+
date_to?: number;
|
|
828
|
+
coupon_ids?: string[] /**
|
|
829
|
+
* @deprecated Please refer API docs to use other attributes
|
|
830
|
+
*/;
|
|
831
|
+
|
|
832
|
+
coupon?: string;
|
|
833
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
834
|
+
avalara_transaction_type?: number;
|
|
835
|
+
avalara_service_type?: number;
|
|
836
|
+
po_number?: string;
|
|
837
|
+
invoice_date?: number;
|
|
838
|
+
payment_source_id?: string;
|
|
839
|
+
payment_initiator?: PaymentInitiator;
|
|
840
|
+
tax_providers_fields?: TaxProvidersFieldsChargeInputParam[];
|
|
841
|
+
}
|
|
842
|
+
export interface ChargeAddonInputParam {
|
|
843
|
+
customer_id?: string;
|
|
844
|
+
subscription_id?: string;
|
|
845
|
+
addon_id: string;
|
|
846
|
+
addon_quantity?: number;
|
|
847
|
+
addon_unit_price?: number;
|
|
848
|
+
addon_quantity_in_decimal?: string;
|
|
849
|
+
addon_unit_price_in_decimal?: string;
|
|
850
|
+
date_from?: number;
|
|
851
|
+
date_to?: number;
|
|
852
|
+
coupon_ids?: string[] /**
|
|
853
|
+
* @deprecated Please refer API docs to use other attributes
|
|
854
|
+
*/;
|
|
855
|
+
|
|
856
|
+
coupon?: string;
|
|
857
|
+
po_number?: string;
|
|
858
|
+
invoice_date?: number;
|
|
859
|
+
payment_source_id?: string;
|
|
860
|
+
payment_initiator?: PaymentInitiator;
|
|
861
|
+
}
|
|
862
|
+
export interface CreateForChargeItemInputParam {
|
|
863
|
+
customer_id?: string;
|
|
864
|
+
subscription_id?: string;
|
|
865
|
+
po_number?: string;
|
|
866
|
+
coupon?: string;
|
|
867
|
+
payment_source_id?: string;
|
|
868
|
+
payment_initiator?: PaymentInitiator;
|
|
869
|
+
invoice_date?: number;
|
|
870
|
+
item_price?: ItemPriceCreateForChargeItemInputParam;
|
|
871
|
+
item_tiers?: ItemTiersCreateForChargeItemInputParam[];
|
|
1157
872
|
}
|
|
1158
873
|
export interface StopDunningInputParam {
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
1162
|
-
|
|
1163
|
-
*/
|
|
1164
|
-
|
|
1165
|
-
comment?:string;
|
|
1166
|
-
}
|
|
1167
|
-
export interface ImportInvoiceResponse {
|
|
1168
|
-
invoice:Invoice;
|
|
1169
|
-
|
|
1170
|
-
credit_note?:CreditNote;
|
|
874
|
+
comment?: string;
|
|
1171
875
|
}
|
|
1172
876
|
export interface ImportInvoiceInputParam {
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
*/
|
|
1213
|
-
|
|
1214
|
-
price_type?:PriceType;
|
|
1215
|
-
|
|
1216
|
-
/**
|
|
1217
|
-
* @description The reason for exempting the invoice from tax. (Applicable only for exempted invoices.). \* export - The customer is from a non-taxable region or the billing address and shipping address are unavailable. \* customer_exempt - The customer is [exempted](customers#customer_taxability) from tax. \* id_exempt - The customer is from a different country than your business and they have a valid VAT number or, the customer is a business entity. (This reason is only applicable when [EU VAT](https://www.chargebee.com/docs/eu-vat.html) or [UK VAT](https://www.chargebee.com/docs/uk-vat.html) is enabled.)
|
|
1218
|
-
|
|
1219
|
-
*/
|
|
1220
|
-
|
|
1221
|
-
tax_override_reason?:TaxOverrideReason;
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
1224
|
-
* @description Vat Number. Required if this invoice is VAT exempted.
|
|
1225
|
-
|
|
1226
|
-
*/
|
|
1227
|
-
|
|
1228
|
-
vat_number?:string;
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* @description An overridden value for the first two characters of the [full VAT
|
|
1232
|
-
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** ).
|
|
1233
|
-
|
|
1234
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
1235
|
-
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
|
|
1236
|
-
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.
|
|
1237
|
-
|
|
1238
|
-
*/
|
|
1239
|
-
|
|
1240
|
-
vat_number_prefix?:string;
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* @description Date when invoice raised.
|
|
1244
|
-
|
|
1245
|
-
*/
|
|
1246
|
-
|
|
1247
|
-
date:number;
|
|
1248
|
-
|
|
1249
|
-
/**
|
|
1250
|
-
* @description Invoice total amount.
|
|
1251
|
-
|
|
1252
|
-
*/
|
|
1253
|
-
|
|
1254
|
-
total:number;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* @description Round off amount.
|
|
1258
|
-
|
|
1259
|
-
*/
|
|
1260
|
-
|
|
1261
|
-
round_off?:number;
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* @description Current status of this invoice. \* not_paid - Indicates the payment is not made and all attempts to collect is failed. \* voided - Indicates a voided invoice. \* paid - Indicates a paid invoice. \* posted - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period \* pending -
|
|
1265
|
-
The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`.
|
|
1266
|
-
The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site. \* payment_due - Indicates the payment is not yet collected and is being retried as per retry settings.
|
|
1267
|
-
|
|
1268
|
-
*/
|
|
1269
|
-
|
|
1270
|
-
status?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due';
|
|
1271
|
-
|
|
1272
|
-
/**
|
|
1273
|
-
* @description Timestamp indicating the date \& time this invoice got voided.
|
|
1274
|
-
|
|
1275
|
-
*/
|
|
1276
|
-
|
|
1277
|
-
voided_at?:number;
|
|
1278
|
-
|
|
1279
|
-
/**
|
|
1280
|
-
* @description Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
1281
|
-
|
|
1282
|
-
*/
|
|
1283
|
-
|
|
1284
|
-
void_reason_code?:string;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* @description If is_written_off is true then the invoice is written off.
|
|
1288
|
-
|
|
1289
|
-
*/
|
|
1290
|
-
|
|
1291
|
-
is_written_off?:boolean;
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* @description Amount written off against this invoice. If this value is not present then the due amount of the invoice will be written off.
|
|
1295
|
-
|
|
1296
|
-
*/
|
|
1297
|
-
|
|
1298
|
-
write_off_amount?:number;
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* @description The date on which the write_off invoice has occurred. This is a mandatory field if is_written_off is true. The same date reflects on the created credit note.
|
|
1302
|
-
|
|
1303
|
-
*/
|
|
1304
|
-
|
|
1305
|
-
write_off_date?:number;
|
|
1306
|
-
|
|
1307
|
-
/**
|
|
1308
|
-
* @description Invoice Due Date.
|
|
1309
|
-
|
|
1310
|
-
*/
|
|
1311
|
-
|
|
1312
|
-
due_date?:number;
|
|
1313
|
-
|
|
1314
|
-
/**
|
|
1315
|
-
* @description Invoice net term days.
|
|
1316
|
-
|
|
1317
|
-
*/
|
|
1318
|
-
|
|
1319
|
-
net_term_days?:number;
|
|
1320
|
-
|
|
1321
|
-
/**
|
|
1322
|
-
* @description Boolean indicating any advance charge is present in this invoice.
|
|
1323
|
-
|
|
1324
|
-
*/
|
|
1325
|
-
|
|
1326
|
-
has_advance_charges?:boolean;
|
|
1327
|
-
|
|
1328
|
-
/**
|
|
1329
|
-
* @description If the invoice falls within the subscription current term will be used for proration.
|
|
1330
|
-
|
|
1331
|
-
*/
|
|
1332
|
-
|
|
1333
|
-
use_for_proration?:boolean;
|
|
1334
|
-
|
|
1335
|
-
/**
|
|
1336
|
-
* @description Parameters for credit_note
|
|
1337
|
-
|
|
1338
|
-
*/
|
|
1339
|
-
|
|
1340
|
-
credit_note?:{id?:string};
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* @description Parameters for billing_address
|
|
1344
|
-
|
|
1345
|
-
*/
|
|
1346
|
-
|
|
1347
|
-
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};
|
|
1348
|
-
|
|
1349
|
-
/**
|
|
1350
|
-
* @description Parameters for shipping_address
|
|
1351
|
-
|
|
1352
|
-
*/
|
|
1353
|
-
|
|
1354
|
-
shipping_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};
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* @description Parameters for line_items
|
|
1358
|
-
|
|
1359
|
-
*/
|
|
1360
|
-
|
|
1361
|
-
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,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}[];
|
|
1362
|
-
|
|
1363
|
-
/**
|
|
1364
|
-
* @description Parameters for payment_reference_numbers
|
|
1365
|
-
|
|
1366
|
-
*/
|
|
1367
|
-
|
|
1368
|
-
payment_reference_numbers:{id?:string,number:string,type:'frn' | 'kid' | 'fik' | 'swiss_reference' | 'ocr'}[];
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* @description Parameters for line_item_tiers
|
|
1372
|
-
|
|
1373
|
-
*/
|
|
1374
|
-
|
|
1375
|
-
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}[];
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* @description Parameters for discounts
|
|
1379
|
-
|
|
1380
|
-
*/
|
|
1381
|
-
|
|
1382
|
-
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}[];
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* @description Parameters for taxes
|
|
1386
|
-
|
|
1387
|
-
*/
|
|
1388
|
-
|
|
1389
|
-
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}[];
|
|
1390
|
-
|
|
1391
|
-
/**
|
|
1392
|
-
* @description Parameters for payments
|
|
1393
|
-
|
|
1394
|
-
*/
|
|
1395
|
-
|
|
1396
|
-
payments:{amount:number,date?:number,payment_method:PaymentMethod,reference_number?:string}[];
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* @description Parameters for notes
|
|
1400
|
-
|
|
1401
|
-
*/
|
|
1402
|
-
|
|
1403
|
-
notes?:{entity_id?:string,entity_type?:'addon_item_price' | 'coupon' | 'plan_item_price' | 'charge_item_price',note?:string}[];
|
|
1404
|
-
}
|
|
1405
|
-
export interface ApplyPaymentsResponse {
|
|
1406
|
-
invoice:Invoice;
|
|
877
|
+
id: string;
|
|
878
|
+
currency_code?: string;
|
|
879
|
+
customer_id?: string;
|
|
880
|
+
subscription_id?: string;
|
|
881
|
+
po_number?: string;
|
|
882
|
+
price_type?: PriceType;
|
|
883
|
+
tax_override_reason?: TaxOverrideReason;
|
|
884
|
+
vat_number?: string;
|
|
885
|
+
vat_number_prefix?: string;
|
|
886
|
+
date: number;
|
|
887
|
+
total: number;
|
|
888
|
+
round_off?: number;
|
|
889
|
+
status?:
|
|
890
|
+
| 'paid'
|
|
891
|
+
| 'posted'
|
|
892
|
+
| 'payment_due'
|
|
893
|
+
| 'not_paid'
|
|
894
|
+
| 'voided'
|
|
895
|
+
| 'pending';
|
|
896
|
+
voided_at?: number;
|
|
897
|
+
void_reason_code?: string;
|
|
898
|
+
is_written_off?: boolean;
|
|
899
|
+
write_off_amount?: number;
|
|
900
|
+
write_off_date?: number;
|
|
901
|
+
due_date?: number;
|
|
902
|
+
net_term_days?: number;
|
|
903
|
+
has_advance_charges?: boolean;
|
|
904
|
+
use_for_proration?: boolean;
|
|
905
|
+
credit_note?: CreditNoteImportInvoiceInputParam;
|
|
906
|
+
billing_address?: BillingAddressImportInvoiceInputParam;
|
|
907
|
+
shipping_address?: ShippingAddressImportInvoiceInputParam;
|
|
908
|
+
line_items?: LineItemsImportInvoiceInputParam[];
|
|
909
|
+
payment_reference_numbers?: PaymentReferenceNumbersImportInvoiceInputParam[];
|
|
910
|
+
line_item_tiers?: LineItemTiersImportInvoiceInputParam[];
|
|
911
|
+
discounts?: DiscountsImportInvoiceInputParam[];
|
|
912
|
+
taxes?: TaxesImportInvoiceInputParam[];
|
|
913
|
+
payments?: PaymentsImportInvoiceInputParam[];
|
|
914
|
+
notes?: NotesImportInvoiceInputParam[];
|
|
1407
915
|
}
|
|
1408
916
|
export interface ApplyPaymentsInputParam {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
1412
|
-
|
|
1413
|
-
*/
|
|
1414
|
-
|
|
1415
|
-
comment?:string;
|
|
1416
|
-
|
|
1417
|
-
/**
|
|
1418
|
-
* @description Parameters for transactions
|
|
1419
|
-
|
|
1420
|
-
*/
|
|
1421
|
-
|
|
1422
|
-
transactions?:{amount?:number,id?:string}[];
|
|
1423
|
-
}
|
|
1424
|
-
export interface SyncUsagesResponse {
|
|
1425
|
-
invoice:Invoice;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
export interface DeleteLineItemsResponse {
|
|
1429
|
-
invoice:Invoice;
|
|
917
|
+
comment?: string;
|
|
918
|
+
transactions?: TransactionsApplyPaymentsInputParam[];
|
|
1430
919
|
}
|
|
1431
920
|
export interface DeleteLineItemsInputParam {
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* @description The list of line items which have to be deleted.
|
|
1435
|
-
|
|
1436
|
-
*/
|
|
1437
|
-
|
|
1438
|
-
line_items?:{id?:string}[];
|
|
1439
|
-
}
|
|
1440
|
-
export interface ApplyCreditsResponse {
|
|
1441
|
-
invoice:Invoice;
|
|
921
|
+
line_items?: LineItemsDeleteLineItemsInputParam[];
|
|
1442
922
|
}
|
|
1443
923
|
export interface ApplyCreditsInputParam {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
1447
|
-
|
|
1448
|
-
*/
|
|
1449
|
-
|
|
1450
|
-
comment?:string;
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1453
|
-
* @description Parameters for credit_notes
|
|
1454
|
-
|
|
1455
|
-
*/
|
|
1456
|
-
|
|
1457
|
-
credit_notes?:{id?:string}[];
|
|
1458
|
-
}
|
|
1459
|
-
export interface ListResponse {
|
|
1460
|
-
/**
|
|
1461
|
-
* @description Lists all the Invoices.
|
|
1462
|
-
|
|
1463
|
-
*/
|
|
1464
|
-
|
|
1465
|
-
list:{invoice:Invoice}[];
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* @description Lists all the Invoices.
|
|
1469
|
-
|
|
1470
|
-
*/
|
|
1471
|
-
|
|
1472
|
-
next_offset?:string;
|
|
924
|
+
comment?: string;
|
|
925
|
+
credit_notes?: CreditNotesApplyCreditsInputParam[];
|
|
1473
926
|
}
|
|
1474
927
|
export interface ListInputParam {
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
* @description Lists all the Invoices.
|
|
1513
|
-
|
|
1514
|
-
*/
|
|
1515
|
-
|
|
1516
|
-
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1517
|
-
|
|
1518
|
-
/**
|
|
1519
|
-
* @description Lists all the Invoices.
|
|
1520
|
-
|
|
1521
|
-
*/
|
|
1522
|
-
|
|
1523
|
-
recurring?:{is?:'true' | 'false'};
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* @description Lists all the Invoices.
|
|
1527
|
-
|
|
1528
|
-
*/
|
|
1529
|
-
|
|
1530
|
-
status?:{in?:string,is?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',is_not?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',not_in?:string};
|
|
1531
|
-
|
|
1532
|
-
/**
|
|
1533
|
-
* @description Lists all the Invoices.
|
|
1534
|
-
|
|
1535
|
-
*/
|
|
1536
|
-
|
|
1537
|
-
price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string};
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* @description Lists all the Invoices.
|
|
1541
|
-
|
|
1542
|
-
*/
|
|
1543
|
-
|
|
1544
|
-
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* @description Lists all the Invoices.
|
|
1548
|
-
|
|
1549
|
-
*/
|
|
1550
|
-
|
|
1551
|
-
paid_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1552
|
-
|
|
1553
|
-
/**
|
|
1554
|
-
* @description Lists all the Invoices.
|
|
1555
|
-
|
|
1556
|
-
*/
|
|
1557
|
-
|
|
1558
|
-
total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
1559
|
-
|
|
1560
|
-
/**
|
|
1561
|
-
* @description Lists all the Invoices.
|
|
1562
|
-
|
|
1563
|
-
*/
|
|
1564
|
-
|
|
1565
|
-
amount_paid?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
1566
|
-
|
|
1567
|
-
/**
|
|
1568
|
-
* @description Lists all the Invoices.
|
|
1569
|
-
|
|
1570
|
-
*/
|
|
1571
|
-
|
|
1572
|
-
amount_adjusted?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
1573
|
-
|
|
1574
|
-
/**
|
|
1575
|
-
* @description Lists all the Invoices.
|
|
1576
|
-
|
|
1577
|
-
*/
|
|
1578
|
-
|
|
1579
|
-
credits_applied?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
1580
|
-
|
|
1581
|
-
/**
|
|
1582
|
-
* @description Lists all the Invoices.
|
|
1583
|
-
|
|
1584
|
-
*/
|
|
1585
|
-
|
|
1586
|
-
amount_due?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
|
|
1587
|
-
|
|
1588
|
-
/**
|
|
1589
|
-
* @description Lists all the Invoices.
|
|
1590
|
-
|
|
1591
|
-
*/
|
|
1592
|
-
|
|
1593
|
-
dunning_status?:{in?:string,is?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_not?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_present?:'true' | 'false',not_in?:string};
|
|
1594
|
-
|
|
1595
|
-
/**
|
|
1596
|
-
* @description Lists all the Invoices.
|
|
1597
|
-
|
|
1598
|
-
*/
|
|
1599
|
-
|
|
1600
|
-
payment_owner?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1601
|
-
|
|
1602
|
-
/**
|
|
1603
|
-
* @description Lists all the Invoices.
|
|
1604
|
-
|
|
1605
|
-
*/
|
|
1606
|
-
|
|
1607
|
-
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* @description Lists all the Invoices.
|
|
1611
|
-
|
|
1612
|
-
*/
|
|
1613
|
-
|
|
1614
|
-
channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* @description Lists all the Invoices.
|
|
1618
|
-
|
|
1619
|
-
*/
|
|
1620
|
-
|
|
1621
|
-
voided_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* @description Lists all the Invoices.
|
|
1625
|
-
|
|
1626
|
-
*/
|
|
1627
|
-
|
|
1628
|
-
void_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* @description Lists all the Invoices.
|
|
1632
|
-
|
|
1633
|
-
*/
|
|
1634
|
-
|
|
1635
|
-
sort_by?:{asc?:'date' | 'updated_at',desc?:'date' | 'updated_at'};
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
* @description Lists all the Invoices.
|
|
1639
|
-
|
|
1640
|
-
*/
|
|
1641
|
-
|
|
1642
|
-
einvoice?:{status?:{in?:string,is?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',is_not?:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped',not_in?:string}};
|
|
1643
|
-
}
|
|
1644
|
-
export interface RetrieveResponse {
|
|
1645
|
-
invoice:Invoice;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
export interface PdfResponse {
|
|
1649
|
-
download:Download;
|
|
928
|
+
limit?: number;
|
|
929
|
+
offset?: string;
|
|
930
|
+
einvoice?: EinvoiceInvoiceListInputParam /**
|
|
931
|
+
* @deprecated Please refer API docs to use other attributes
|
|
932
|
+
*/;
|
|
933
|
+
|
|
934
|
+
paid_on_after?: number;
|
|
935
|
+
include_deleted?: boolean;
|
|
936
|
+
id?: filter.String;
|
|
937
|
+
subscription_id?: filter.String;
|
|
938
|
+
customer_id?: filter.String;
|
|
939
|
+
recurring?: filter.Boolean;
|
|
940
|
+
status?: filter.Enum;
|
|
941
|
+
price_type?: filter.Enum;
|
|
942
|
+
date?: filter.Timestamp;
|
|
943
|
+
paid_at?: filter.Timestamp;
|
|
944
|
+
total?: filter.Number;
|
|
945
|
+
amount_paid?: filter.Number;
|
|
946
|
+
amount_adjusted?: filter.Number;
|
|
947
|
+
credits_applied?: filter.Number;
|
|
948
|
+
amount_due?: filter.Number;
|
|
949
|
+
dunning_status?: filter.Enum;
|
|
950
|
+
payment_owner?: filter.String;
|
|
951
|
+
updated_at?: filter.Timestamp;
|
|
952
|
+
channel?: filter.Enum;
|
|
953
|
+
voided_at?: filter.Timestamp;
|
|
954
|
+
void_reason_code?: filter.String;
|
|
955
|
+
'sort_by[asc]'?: string;
|
|
956
|
+
'sort_by[desc]'?: string;
|
|
957
|
+
}
|
|
958
|
+
export interface InvoicesForCustomerInputParam {
|
|
959
|
+
limit?: number;
|
|
960
|
+
offset?: string;
|
|
961
|
+
}
|
|
962
|
+
export interface InvoicesForSubscriptionInputParam {
|
|
963
|
+
limit?: number;
|
|
964
|
+
offset?: string;
|
|
1650
965
|
}
|
|
1651
966
|
export interface PdfInputParam {
|
|
1652
|
-
|
|
1653
|
-
/**
|
|
1654
|
-
* @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
|
|
1655
|
-
|
|
1656
|
-
*/
|
|
1657
|
-
|
|
1658
|
-
disposition_type?:DispositionType;
|
|
1659
|
-
}
|
|
1660
|
-
export interface DownloadEinvoiceResponse {
|
|
1661
|
-
downloads:Download[];
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
export interface ListPaymentReferenceNumbersResponse {
|
|
1665
|
-
/**
|
|
1666
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
1667
|
-
|
|
1668
|
-
*/
|
|
1669
|
-
|
|
1670
|
-
list:{payment_reference_number:PaymentReferenceNumber}[];
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
1674
|
-
|
|
1675
|
-
*/
|
|
1676
|
-
|
|
1677
|
-
next_offset?:string;
|
|
967
|
+
disposition_type?: DispositionType;
|
|
1678
968
|
}
|
|
1679
969
|
export interface ListPaymentReferenceNumbersInputParam {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
*/
|
|
1685
|
-
|
|
1686
|
-
limit?:number;
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
1690
|
-
|
|
1691
|
-
*/
|
|
1692
|
-
|
|
1693
|
-
offset?:string;
|
|
1694
|
-
|
|
1695
|
-
/**
|
|
1696
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
1697
|
-
|
|
1698
|
-
*/
|
|
1699
|
-
|
|
1700
|
-
id?:{in?:string,is?:string};
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* @description This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN.
|
|
1704
|
-
|
|
1705
|
-
*/
|
|
1706
|
-
|
|
1707
|
-
payment_reference_number?:{number?:{in?:string,is?:string}};
|
|
1708
|
-
}
|
|
1709
|
-
export interface AddChargeResponse {
|
|
1710
|
-
invoice:Invoice;
|
|
970
|
+
limit?: number;
|
|
971
|
+
offset?: string;
|
|
972
|
+
payment_reference_number?: PaymentReferenceNumberInvoiceListPaymentReferenceNumbersInputParam;
|
|
973
|
+
id?: filter.String;
|
|
1711
974
|
}
|
|
1712
975
|
export interface AddChargeInputParam {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
/**
|
|
1736
|
-
* @description Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
|
|
1737
|
-
|
|
1738
|
-
*/
|
|
1739
|
-
|
|
1740
|
-
avalara_transaction_type?:number;
|
|
1741
|
-
|
|
1742
|
-
/**
|
|
1743
|
-
* @description Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
|
|
1744
|
-
|
|
1745
|
-
*/
|
|
1746
|
-
|
|
1747
|
-
avalara_service_type?:number;
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* @description This represents the Avalara tax code to which the one-time charge is mapped. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avatax-for-sales.html).
|
|
1751
|
-
|
|
1752
|
-
*/
|
|
1753
|
-
|
|
1754
|
-
avalara_tax_code?:string;
|
|
1755
|
-
|
|
1756
|
-
/**
|
|
1757
|
-
* @description The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the one-time charge is mapped for calculating the customer's tax in India. Applicable when both the conditions are true:
|
|
1758
|
-
|
|
1759
|
-
* **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)
|
|
1760
|
-
* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.
|
|
1761
|
-
.
|
|
1762
|
-
|
|
1763
|
-
*/
|
|
1764
|
-
|
|
1765
|
-
hsn_code?:string;
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* @description This represents the TaxJar product code to which the one-time charge is mapped. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html).
|
|
1769
|
-
|
|
1770
|
-
*/
|
|
1771
|
-
|
|
1772
|
-
taxjar_product_code?:string;
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
1776
|
-
|
|
1777
|
-
*/
|
|
1778
|
-
|
|
1779
|
-
comment?:string;
|
|
1780
|
-
|
|
1781
|
-
/**
|
|
1782
|
-
* @description Identifier of the subscription for which this charge needs to be created. Applicable for consolidated invoice.
|
|
1783
|
-
|
|
1784
|
-
*/
|
|
1785
|
-
|
|
1786
|
-
subscription_id?:string;
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
* @description Parameters for line_item
|
|
1790
|
-
|
|
1791
|
-
*/
|
|
1792
|
-
|
|
1793
|
-
line_item?:{date_from?:number,date_to?:number};
|
|
1794
|
-
}
|
|
1795
|
-
export interface AddChargeItemResponse {
|
|
1796
|
-
invoice:Invoice;
|
|
976
|
+
amount: number;
|
|
977
|
+
description: string;
|
|
978
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
979
|
+
avalara_transaction_type?: number;
|
|
980
|
+
avalara_service_type?: number;
|
|
981
|
+
avalara_tax_code?: string;
|
|
982
|
+
hsn_code?: string;
|
|
983
|
+
taxjar_product_code?: string;
|
|
984
|
+
comment?: string;
|
|
985
|
+
subscription_id?: string;
|
|
986
|
+
line_item?: LineItemAddChargeInputParam;
|
|
987
|
+
}
|
|
988
|
+
export interface AddAddonChargeInputParam {
|
|
989
|
+
addon_id: string;
|
|
990
|
+
addon_quantity?: number;
|
|
991
|
+
addon_unit_price?: number;
|
|
992
|
+
addon_quantity_in_decimal?: string;
|
|
993
|
+
addon_unit_price_in_decimal?: string;
|
|
994
|
+
comment?: string;
|
|
995
|
+
subscription_id?: string;
|
|
996
|
+
line_item?: LineItemAddAddonChargeInputParam;
|
|
1797
997
|
}
|
|
1798
998
|
export interface AddChargeItemInputParam {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
*/
|
|
1804
|
-
|
|
1805
|
-
comment?:string;
|
|
1806
|
-
|
|
1807
|
-
/**
|
|
1808
|
-
* @description Identifier of the subscription for which this addon needs to be created. Applicable for consolidated invoice.
|
|
1809
|
-
|
|
1810
|
-
*/
|
|
1811
|
-
|
|
1812
|
-
subscription_id?:string;
|
|
1813
|
-
|
|
1814
|
-
/**
|
|
1815
|
-
* @description Parameters for item_price
|
|
1816
|
-
|
|
1817
|
-
*/
|
|
1818
|
-
|
|
1819
|
-
item_price:{date_from?:number,date_to?:number,item_price_id:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string};
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* @description Parameters for item_tiers
|
|
1823
|
-
|
|
1824
|
-
*/
|
|
1825
|
-
|
|
1826
|
-
item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
|
|
1827
|
-
tax_providers_fields?: { field_id?: string, field_value?: string, provider_name?: string }[];
|
|
1828
|
-
}
|
|
1829
|
-
export interface CloseResponse {
|
|
1830
|
-
invoice:Invoice;
|
|
999
|
+
comment?: string;
|
|
1000
|
+
subscription_id?: string;
|
|
1001
|
+
item_price?: ItemPriceAddChargeItemInputParam;
|
|
1002
|
+
item_tiers?: ItemTiersAddChargeItemInputParam[];
|
|
1831
1003
|
}
|
|
1832
1004
|
export interface CloseInputParam {
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
comment?:string;
|
|
1840
|
-
|
|
1841
|
-
/**
|
|
1842
|
-
* @description A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer.
|
|
1843
|
-
|
|
1844
|
-
*/
|
|
1845
|
-
|
|
1846
|
-
invoice_note?:string;
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* @description Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice.
|
|
1850
|
-
|
|
1851
|
-
*/
|
|
1852
|
-
|
|
1853
|
-
remove_general_note?:boolean;
|
|
1854
|
-
|
|
1855
|
-
/**
|
|
1856
|
-
* @description Set the [invoice date](https://apidocs.chargebee.com/docs/api/invoices#invoice_date). Must lie between the date when the invoice was generated and current date. Can only be passed when the site setting to allow overriding is enabled. If not passed, then the default value [set at the site level](https://www.chargebee.com/docs/metered_billing.html#overview) is used.
|
|
1857
|
-
|
|
1858
|
-
*/
|
|
1859
|
-
|
|
1860
|
-
invoice_date?:number;
|
|
1861
|
-
|
|
1862
|
-
/**
|
|
1863
|
-
* @description Parameters for notes_to_remove
|
|
1864
|
-
|
|
1865
|
-
*/
|
|
1866
|
-
|
|
1867
|
-
notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
|
|
1868
|
-
}
|
|
1869
|
-
export interface CollectPaymentResponse {
|
|
1870
|
-
invoice:Invoice;
|
|
1871
|
-
|
|
1872
|
-
transaction:Transaction;
|
|
1005
|
+
comment?: string;
|
|
1006
|
+
invoice_note?: string;
|
|
1007
|
+
remove_general_note?: boolean;
|
|
1008
|
+
invoice_date?: number;
|
|
1009
|
+
notes_to_remove?: NotesToRemoveCloseInputParam[];
|
|
1873
1010
|
}
|
|
1874
1011
|
export interface CollectPaymentInputParam {
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
amount?:number;
|
|
1882
|
-
|
|
1883
|
-
/**
|
|
1884
|
-
* @description Authorization transaction to be captured.
|
|
1885
|
-
|
|
1886
|
-
*/
|
|
1887
|
-
|
|
1888
|
-
authorization_transaction_id?:string;
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* @description Payment source to be used for this payment.
|
|
1892
|
-
|
|
1893
|
-
*/
|
|
1894
|
-
|
|
1895
|
-
payment_source_id?:string;
|
|
1896
|
-
|
|
1897
|
-
/**
|
|
1898
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
1899
|
-
|
|
1900
|
-
*/
|
|
1901
|
-
|
|
1902
|
-
comment?:string;
|
|
1903
|
-
|
|
1904
|
-
/**
|
|
1905
|
-
* @description The type of initiator to be used for the payment request triggered by this operation. \* merchant - Pass this value to indicate that the request is initiated by the merchant \* customer - Pass this value to indicate that the request is initiated by the customer
|
|
1906
|
-
|
|
1907
|
-
*/
|
|
1908
|
-
|
|
1909
|
-
payment_initiator?:PaymentInitiator;
|
|
1910
|
-
}
|
|
1911
|
-
export interface RecordPaymentResponse {
|
|
1912
|
-
invoice:Invoice;
|
|
1913
|
-
|
|
1914
|
-
transaction:Transaction;
|
|
1012
|
+
amount?: number;
|
|
1013
|
+
authorization_transaction_id?: string;
|
|
1014
|
+
payment_source_id?: string;
|
|
1015
|
+
comment?: string;
|
|
1016
|
+
payment_initiator?: PaymentInitiator;
|
|
1915
1017
|
}
|
|
1916
1018
|
export interface RecordPaymentInputParam {
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
* @description Remarks, if any, on the payment.
|
|
1920
|
-
|
|
1921
|
-
*/
|
|
1922
|
-
|
|
1923
|
-
comment?:string;
|
|
1924
|
-
|
|
1925
|
-
/**
|
|
1926
|
-
* @description Parameters for transaction
|
|
1927
|
-
|
|
1928
|
-
*/
|
|
1929
|
-
|
|
1930
|
-
transaction:{amount?:number,custom_payment_method_id?:string,date?:number,error_code?:string,error_text?:string,id_at_gateway?:string,payment_method:PaymentMethod,reference_number?:string,status?:'success' | 'failure'};
|
|
1931
|
-
}
|
|
1932
|
-
export interface RecordTaxWithheldResponse {
|
|
1933
|
-
invoice:Invoice;
|
|
1019
|
+
comment?: string;
|
|
1020
|
+
transaction?: TransactionRecordPaymentInputParam;
|
|
1934
1021
|
}
|
|
1935
1022
|
export interface RecordTaxWithheldInputParam {
|
|
1936
|
-
|
|
1937
|
-
/**
|
|
1938
|
-
* @description Parameters for tax_withheld
|
|
1939
|
-
|
|
1940
|
-
*/
|
|
1941
|
-
|
|
1942
|
-
tax_withheld:{amount:number,date?:number,description?:string,reference_number?:string};
|
|
1943
|
-
}
|
|
1944
|
-
export interface RemoveTaxWithheldResponse {
|
|
1945
|
-
invoice:Invoice;
|
|
1023
|
+
tax_withheld?: TaxWithheldRecordTaxWithheldInputParam;
|
|
1946
1024
|
}
|
|
1947
1025
|
export interface RemoveTaxWithheldInputParam {
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* @description Parameters for tax_withheld
|
|
1951
|
-
|
|
1952
|
-
*/
|
|
1953
|
-
|
|
1954
|
-
tax_withheld:{id:string};
|
|
1955
|
-
}
|
|
1956
|
-
export interface RefundResponse {
|
|
1957
|
-
invoice:Invoice;
|
|
1958
|
-
|
|
1959
|
-
transaction:Transaction;
|
|
1960
|
-
|
|
1961
|
-
credit_note?:CreditNote;
|
|
1026
|
+
tax_withheld?: TaxWithheldRemoveTaxWithheldInputParam;
|
|
1962
1027
|
}
|
|
1963
1028
|
export interface RefundInputParam {
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
*/
|
|
1969
|
-
|
|
1970
|
-
refund_amount?:number;
|
|
1971
|
-
|
|
1972
|
-
/**
|
|
1973
|
-
* @description Comment, if any, on the refund.
|
|
1974
|
-
|
|
1975
|
-
*/
|
|
1976
|
-
|
|
1977
|
-
comment?:string;
|
|
1978
|
-
|
|
1979
|
-
/**
|
|
1980
|
-
* @description The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
|
|
1981
|
-
|
|
1982
|
-
*/
|
|
1983
|
-
|
|
1984
|
-
customer_notes?:string;
|
|
1985
|
-
|
|
1986
|
-
/**
|
|
1987
|
-
* @description Parameters for credit_note
|
|
1988
|
-
|
|
1989
|
-
*/
|
|
1990
|
-
|
|
1991
|
-
credit_note?:{create_reason_code?:string,reason_code?:'order_cancellation' | 'service_unsatisfactory' | 'other' | 'product_unsatisfactory' | 'order_change' | 'waiver'};
|
|
1992
|
-
}
|
|
1993
|
-
export interface RecordRefundResponse {
|
|
1994
|
-
invoice:Invoice;
|
|
1995
|
-
|
|
1996
|
-
transaction?:Transaction;
|
|
1997
|
-
|
|
1998
|
-
credit_note?:CreditNote;
|
|
1029
|
+
refund_amount?: number;
|
|
1030
|
+
comment?: string;
|
|
1031
|
+
customer_notes?: string;
|
|
1032
|
+
credit_note?: CreditNoteRefundInputParam;
|
|
1999
1033
|
}
|
|
2000
1034
|
export interface RecordRefundInputParam {
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
*/
|
|
2006
|
-
|
|
2007
|
-
comment?:string;
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* @description The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
|
|
2011
|
-
|
|
2012
|
-
*/
|
|
2013
|
-
|
|
2014
|
-
customer_notes?:string;
|
|
2015
|
-
|
|
2016
|
-
/**
|
|
2017
|
-
* @description Parameters for transaction
|
|
2018
|
-
|
|
2019
|
-
*/
|
|
2020
|
-
|
|
2021
|
-
transaction:{amount?:number,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* @description Parameters for credit_note
|
|
2025
|
-
|
|
2026
|
-
*/
|
|
2027
|
-
|
|
2028
|
-
credit_note?:{create_reason_code?:string,reason_code?:'order_cancellation' | 'service_unsatisfactory' | 'other' | 'product_unsatisfactory' | 'chargeback' | 'order_change' | 'waiver'};
|
|
2029
|
-
}
|
|
2030
|
-
export interface RemovePaymentResponse {
|
|
2031
|
-
invoice:Invoice;
|
|
2032
|
-
|
|
2033
|
-
transaction:Transaction;
|
|
1035
|
+
comment?: string;
|
|
1036
|
+
customer_notes?: string;
|
|
1037
|
+
transaction?: TransactionRecordRefundInputParam;
|
|
1038
|
+
credit_note?: CreditNoteRecordRefundInputParam;
|
|
2034
1039
|
}
|
|
2035
1040
|
export interface RemovePaymentInputParam {
|
|
2036
|
-
|
|
2037
|
-
/**
|
|
2038
|
-
* @description Parameters for transaction
|
|
2039
|
-
|
|
2040
|
-
*/
|
|
2041
|
-
|
|
2042
|
-
transaction:{id:string};
|
|
2043
|
-
}
|
|
2044
|
-
export interface RemoveCreditNoteResponse {
|
|
2045
|
-
invoice:Invoice;
|
|
2046
|
-
|
|
2047
|
-
credit_note:CreditNote;
|
|
1041
|
+
transaction?: TransactionRemovePaymentInputParam;
|
|
2048
1042
|
}
|
|
2049
1043
|
export interface RemoveCreditNoteInputParam {
|
|
2050
|
-
|
|
2051
|
-
/**
|
|
2052
|
-
* @description Parameters for credit_note
|
|
2053
|
-
|
|
2054
|
-
*/
|
|
2055
|
-
|
|
2056
|
-
credit_note:{id:string};
|
|
2057
|
-
}
|
|
2058
|
-
export interface VoidInvoiceResponse {
|
|
2059
|
-
invoice:Invoice;
|
|
2060
|
-
|
|
2061
|
-
credit_note?:CreditNote;
|
|
1044
|
+
credit_note?: CreditNoteRemoveCreditNoteInputParam;
|
|
2062
1045
|
}
|
|
2063
1046
|
export interface VoidInvoiceInputParam {
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
2067
|
-
|
|
2068
|
-
*/
|
|
2069
|
-
|
|
2070
|
-
comment?:string;
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* @description Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
2074
|
-
|
|
2075
|
-
*/
|
|
2076
|
-
|
|
2077
|
-
void_reason_code?:string;
|
|
2078
|
-
}
|
|
2079
|
-
export interface WriteOffResponse {
|
|
2080
|
-
invoice:Invoice;
|
|
2081
|
-
|
|
2082
|
-
credit_note:CreditNote;
|
|
1047
|
+
comment?: string;
|
|
1048
|
+
void_reason_code?: string;
|
|
2083
1049
|
}
|
|
2084
1050
|
export interface WriteOffInputParam {
|
|
2085
|
-
|
|
2086
|
-
/**
|
|
2087
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
2088
|
-
|
|
2089
|
-
*/
|
|
2090
|
-
|
|
2091
|
-
comment?:string;
|
|
2092
|
-
}
|
|
2093
|
-
export interface DeleteResponse {
|
|
2094
|
-
invoice:Invoice;
|
|
1051
|
+
comment?: string;
|
|
2095
1052
|
}
|
|
2096
1053
|
export interface DeleteInputParam {
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* @description Reason for deleting the invoice. This comment will be added to the subscription entity if the invoice belongs to a subscription. It is added to the customer entity if the invoice is associated only with a customer.
|
|
2100
|
-
|
|
2101
|
-
*/
|
|
2102
|
-
|
|
2103
|
-
comment?:string;
|
|
2104
|
-
|
|
2105
|
-
/**
|
|
2106
|
-
* @description Indicates whether to put prorated credits back to the subscription or ignore while deleting the invoice.
|
|
2107
|
-
|
|
2108
|
-
*/
|
|
2109
|
-
|
|
2110
|
-
claim_credits?:boolean;
|
|
2111
|
-
}
|
|
2112
|
-
export interface UpdateDetailsResponse {
|
|
2113
|
-
invoice:Invoice;
|
|
1054
|
+
comment?: string;
|
|
2114
1055
|
}
|
|
2115
1056
|
export interface UpdateDetailsInputParam {
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
/**
|
|
2125
|
-
* @description An overridden value for the first two characters of the [full VAT
|
|
2126
|
-
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** ).
|
|
2127
|
-
|
|
2128
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
2129
|
-
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
|
|
2130
|
-
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.
|
|
2131
|
-
|
|
2132
|
-
*/
|
|
2133
|
-
|
|
2134
|
-
vat_number_prefix?:string;
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
* @description Purchase Order Number for this invoice.
|
|
2138
|
-
|
|
2139
|
-
*/
|
|
2140
|
-
|
|
2141
|
-
po_number?:string;
|
|
2142
|
-
|
|
2143
|
-
/**
|
|
2144
|
-
* @description An internal [comment](./comments) to be added for this operation, to the invoice. 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 [Invoice PDF](./invoices#retrieve_invoice_as_pdf).
|
|
2145
|
-
|
|
2146
|
-
*/
|
|
2147
|
-
|
|
2148
|
-
comment?:string;
|
|
2149
|
-
|
|
2150
|
-
/**
|
|
2151
|
-
* @description Parameters for billing_address
|
|
2152
|
-
|
|
2153
|
-
*/
|
|
2154
|
-
|
|
2155
|
-
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};
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
* @description Parameters for shipping_address
|
|
2159
|
-
|
|
2160
|
-
*/
|
|
2161
|
-
|
|
2162
|
-
shipping_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};
|
|
2163
|
-
|
|
2164
|
-
/**
|
|
2165
|
-
* @description This API allows you to update the invoice Billing/Shipping address, VAT and PO number. During this operation if Billing Info (Billing Address, vat_number), Shipping info and PO number are not already present in the system the data will be added. If data is already present, the existing values will be replaced. If info is present in the system, but not passed as part of the request, the info will not be removed from the system.
|
|
2166
|
-
|
|
2167
|
-
**Note:** Incase, tax is already applied will now vary due to address change, you cannot update the address. You cannot update the VAT Number if the billing address is not present in the API request.This will update the invoice only, it won't change the corresponding customer/subscription details.
|
|
2168
|
-
|
|
2169
|
-
*/
|
|
2170
|
-
|
|
2171
|
-
statement_descriptor?:{additional_info?:string,descriptor?:string};
|
|
2172
|
-
}
|
|
2173
|
-
export interface InstallmentsResponse {
|
|
2174
|
-
invoice:Invoice;
|
|
1057
|
+
vat_number?: string;
|
|
1058
|
+
vat_number_prefix?: string;
|
|
1059
|
+
po_number?: string;
|
|
1060
|
+
comment?: string;
|
|
1061
|
+
billing_address?: BillingAddressUpdateDetailsInputParam;
|
|
1062
|
+
shipping_address?: ShippingAddressUpdateDetailsInputParam;
|
|
1063
|
+
statement_descriptor?: StatementDescriptorUpdateDetailsInputParam;
|
|
2175
1064
|
}
|
|
2176
1065
|
export interface InstallmentsInputParam {
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
}
|
|
2452
|
-
export interface
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
export interface
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
*/
|
|
2792
|
-
|
|
2793
|
-
cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
|
|
2794
|
-
|
|
2795
|
-
/**
|
|
2796
|
-
* @description Credit note reason code
|
|
2797
|
-
|
|
2798
|
-
*/
|
|
2799
|
-
|
|
2800
|
-
cn_create_reason_code?:string;
|
|
2801
|
-
|
|
2802
|
-
/**
|
|
2803
|
-
* @description Indicates the date at which this credit note is created
|
|
2804
|
-
|
|
2805
|
-
*/
|
|
2806
|
-
|
|
2807
|
-
cn_date?:number;
|
|
2808
|
-
|
|
2809
|
-
/**
|
|
2810
|
-
* @description Total amount of the credit note.
|
|
2811
|
-
|
|
2812
|
-
*/
|
|
2813
|
-
|
|
2814
|
-
cn_total?:number;
|
|
2815
|
-
|
|
2816
|
-
/**
|
|
2817
|
-
* @description Credit note status. \* 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. \* refund_due - When the credits are yet to be used, or have been partially used. \* adjusted - When the Credit Note has been adjusted against an invoice.
|
|
2818
|
-
|
|
2819
|
-
*/
|
|
2820
|
-
|
|
2821
|
-
cn_status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
2822
|
-
}
|
|
2823
|
-
export interface CreatedCreditNote {
|
|
2824
|
-
/**
|
|
2825
|
-
* @description Credit-note id
|
|
2826
|
-
|
|
2827
|
-
*/
|
|
2828
|
-
|
|
2829
|
-
cn_id:string;
|
|
2830
|
-
|
|
2831
|
-
/**
|
|
2832
|
-
* @description Credit note reason code. Deprecated; use the cn_create_reason_code parameter instead \* 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. \* order_change - Order Change \* 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 \* product_unsatisfactory - Product Unsatisfactory \* 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. \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* service_unsatisfactory - Service Unsatisfactory \* waiver - Waiver \* order_cancellation - Order Cancellation \* other - Can be set when none of the above reason codes are applicable
|
|
2833
|
-
|
|
2834
|
-
*/
|
|
2835
|
-
|
|
2836
|
-
cn_reason_code?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent';
|
|
2837
|
-
|
|
2838
|
-
/**
|
|
2839
|
-
* @description Credit note reason code
|
|
2840
|
-
|
|
2841
|
-
*/
|
|
2842
|
-
|
|
2843
|
-
cn_create_reason_code?:string;
|
|
2844
|
-
|
|
2845
|
-
/**
|
|
2846
|
-
* @description Indicates the date at which this credit note is created
|
|
2847
|
-
|
|
2848
|
-
*/
|
|
2849
|
-
|
|
2850
|
-
cn_date?:number;
|
|
2851
|
-
|
|
2852
|
-
/**
|
|
2853
|
-
* @description Total amount of the credit note.
|
|
2854
|
-
|
|
2855
|
-
*/
|
|
2856
|
-
|
|
2857
|
-
cn_total?:number;
|
|
2858
|
-
|
|
2859
|
-
/**
|
|
2860
|
-
* @description Credit note status. \* refund_due - When the credits are yet to be used, or have been partially used. \* adjusted - When the Credit Note has been adjusted against an invoice. \* voided - When the Credit Note has been cancelled. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).
|
|
2861
|
-
|
|
2862
|
-
*/
|
|
2863
|
-
|
|
2864
|
-
cn_status:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
2865
|
-
}
|
|
2866
|
-
export interface LinkedOrder {
|
|
2867
|
-
/**
|
|
2868
|
-
* @description Uniquely identifies the order. It is the api identifier for the order
|
|
2869
|
-
|
|
2870
|
-
*/
|
|
2871
|
-
|
|
2872
|
-
id:string;
|
|
2873
|
-
|
|
2874
|
-
/**
|
|
2875
|
-
* @description The order's serial number
|
|
2876
|
-
|
|
2877
|
-
*/
|
|
2878
|
-
|
|
2879
|
-
document_number?:string;
|
|
2880
|
-
|
|
2881
|
-
/**
|
|
2882
|
-
* @description The status of this order. \* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform \* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* returned - The order has been returned after delivery. \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* shipped - The order has moved from order management system to a shipping system. \* on_hold - The order is paused from being processed. \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* delivered - The order has been delivered to the customer. \* partially_delivered - The order has been partially delivered to the customer. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system
|
|
2883
|
-
|
|
2884
|
-
*/
|
|
2885
|
-
|
|
2886
|
-
status?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned';
|
|
2887
|
-
|
|
2888
|
-
/**
|
|
2889
|
-
* @description Order type \* system_generated - The order has been created by Chargebee automatically based on the preferences set by the user. \* manual - The order has been created by the the user using Chargebee's legacy order management system.
|
|
2890
|
-
|
|
2891
|
-
*/
|
|
2892
|
-
|
|
2893
|
-
order_type?:'system_generated' | 'manual';
|
|
2894
|
-
|
|
2895
|
-
/**
|
|
2896
|
-
* @description Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
|
|
2897
|
-
|
|
2898
|
-
*/
|
|
2899
|
-
|
|
2900
|
-
reference_id?:string;
|
|
2901
|
-
|
|
2902
|
-
/**
|
|
2903
|
-
* @description The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;
|
|
2904
|
-
|
|
2905
|
-
*/
|
|
2906
|
-
|
|
2907
|
-
fulfillment_status?:string;
|
|
2908
|
-
|
|
2909
|
-
/**
|
|
2910
|
-
* @description Unique id to identify a group of orders.
|
|
2911
|
-
|
|
2912
|
-
*/
|
|
2913
|
-
|
|
2914
|
-
batch_id?:string;
|
|
2915
|
-
|
|
2916
|
-
/**
|
|
2917
|
-
* @description The time at which the order was created
|
|
2918
|
-
|
|
2919
|
-
*/
|
|
2920
|
-
|
|
2921
|
-
created_at:number;
|
|
2922
|
-
}
|
|
2923
|
-
export interface Note {
|
|
2924
|
-
/**
|
|
2925
|
-
* @description Type of entity to which the note belongs. \* subscription - Entity that represents a subscription of customer. \* customer - Entity that represents a customer. \* plan - Entity that represents a plan. \* tax - The note is configured as part of the [tax configuration](https://www.chargebee.com/docs/tax.html) in Chargebee Billing. \* addon_item_price - Indicates that this line item is based on addon Item Price \* addon - Entity that represents an addon. \* plan_item_price - Indicates that this line item is based on plan Item Price \* coupon - Entity that represents a coupon. \* charge_item_price - Indicates that this line item is based on charge Item Price
|
|
2926
|
-
|
|
2927
|
-
*/
|
|
2928
|
-
|
|
2929
|
-
entity_type:'addon_item_price' | 'coupon' | 'plan_item_price' | 'charge_item_price' | 'tax' | 'subscription' | 'customer';
|
|
2930
|
-
|
|
2931
|
-
/**
|
|
2932
|
-
* @description Actual note.
|
|
2933
|
-
|
|
2934
|
-
*/
|
|
2935
|
-
|
|
2936
|
-
note:string;
|
|
2937
|
-
|
|
2938
|
-
/**
|
|
2939
|
-
* @description Unique identifier of the entity.
|
|
2940
|
-
|
|
2941
|
-
*/
|
|
2942
|
-
|
|
2943
|
-
entity_id?:string;
|
|
2944
|
-
}
|
|
2945
|
-
export interface ShippingAddress {
|
|
2946
|
-
/**
|
|
2947
|
-
* @description The first name of the contact.
|
|
2948
|
-
|
|
2949
|
-
*/
|
|
2950
|
-
|
|
2951
|
-
first_name?:string;
|
|
2952
|
-
|
|
2953
|
-
/**
|
|
2954
|
-
* @description The last name of the contact.
|
|
2955
|
-
|
|
2956
|
-
*/
|
|
2957
|
-
|
|
2958
|
-
last_name?:string;
|
|
2959
|
-
|
|
2960
|
-
/**
|
|
2961
|
-
* @description The email address.
|
|
2962
|
-
|
|
2963
|
-
*/
|
|
2964
|
-
|
|
2965
|
-
email?:string;
|
|
2966
|
-
|
|
2967
|
-
/**
|
|
2968
|
-
* @description The company name.
|
|
2969
|
-
|
|
2970
|
-
*/
|
|
2971
|
-
|
|
2972
|
-
company?:string;
|
|
2973
|
-
|
|
2974
|
-
/**
|
|
2975
|
-
* @description The phone number.
|
|
2976
|
-
|
|
2977
|
-
*/
|
|
2978
|
-
|
|
2979
|
-
phone?:string;
|
|
2980
|
-
|
|
2981
|
-
/**
|
|
2982
|
-
* @description Address line 1
|
|
2983
|
-
|
|
2984
|
-
*/
|
|
2985
|
-
|
|
2986
|
-
line1?:string;
|
|
2987
|
-
|
|
2988
|
-
/**
|
|
2989
|
-
* @description Address line 2
|
|
2990
|
-
|
|
2991
|
-
*/
|
|
2992
|
-
|
|
2993
|
-
line2?:string;
|
|
2994
|
-
|
|
2995
|
-
/**
|
|
2996
|
-
* @description Address line 3
|
|
2997
|
-
|
|
2998
|
-
*/
|
|
2999
|
-
|
|
3000
|
-
line3?:string;
|
|
3001
|
-
|
|
3002
|
-
/**
|
|
3003
|
-
* @description The name of the city.
|
|
3004
|
-
|
|
3005
|
-
*/
|
|
3006
|
-
|
|
3007
|
-
city?:string;
|
|
3008
|
-
|
|
3009
|
-
/**
|
|
3010
|
-
* @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`).
|
|
3011
|
-
|
|
3012
|
-
*/
|
|
3013
|
-
|
|
3014
|
-
state_code?:string;
|
|
3015
|
-
|
|
3016
|
-
/**
|
|
3017
|
-
* @description The state/province name.
|
|
3018
|
-
|
|
3019
|
-
*/
|
|
3020
|
-
|
|
3021
|
-
state?:string;
|
|
3022
|
-
|
|
3023
|
-
/**
|
|
3024
|
-
* @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).
|
|
3025
|
-
|
|
3026
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
3027
|
-
|
|
3028
|
-
**Brexit**
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
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.
|
|
3032
|
-
|
|
3033
|
-
*/
|
|
3034
|
-
|
|
3035
|
-
country?:string;
|
|
3036
|
-
|
|
3037
|
-
/**
|
|
3038
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
3039
|
-
|
|
3040
|
-
*/
|
|
3041
|
-
|
|
3042
|
-
zip?:string;
|
|
3043
|
-
|
|
3044
|
-
/**
|
|
3045
|
-
* @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.
|
|
3046
|
-
|
|
3047
|
-
*/
|
|
3048
|
-
|
|
3049
|
-
validation_status?:ValidationStatus;
|
|
3050
|
-
|
|
3051
|
-
/**
|
|
3052
|
-
* @description The index number of the subscription to which the item price is added. Provide a unique number between `0` and `4` (inclusive) for each subscription that is to be created.
|
|
3053
|
-
|
|
3054
|
-
*/
|
|
3055
|
-
|
|
3056
|
-
index:number;
|
|
3057
|
-
}
|
|
3058
|
-
export interface StatementDescriptor {
|
|
3059
|
-
/**
|
|
3060
|
-
* @description Uniquely identifies a statement_descriptor
|
|
3061
|
-
|
|
3062
|
-
*/
|
|
3063
|
-
|
|
3064
|
-
id:string;
|
|
3065
|
-
|
|
3066
|
-
/**
|
|
3067
|
-
* @description Payment descriptor text
|
|
3068
|
-
|
|
3069
|
-
*/
|
|
3070
|
-
|
|
3071
|
-
descriptor?:string;
|
|
3072
|
-
|
|
3073
|
-
/**
|
|
3074
|
-
* @description Payment descriptor additional info
|
|
3075
|
-
|
|
3076
|
-
*/
|
|
3077
|
-
|
|
3078
|
-
additional_info?:string;
|
|
3079
|
-
}
|
|
3080
|
-
export interface BillingAddress {
|
|
3081
|
-
/**
|
|
3082
|
-
* @description The first name of the billing contact.
|
|
3083
|
-
|
|
3084
|
-
*/
|
|
3085
|
-
|
|
3086
|
-
first_name?:string;
|
|
3087
|
-
|
|
3088
|
-
/**
|
|
3089
|
-
* @description The last name of the billing contact.
|
|
3090
|
-
|
|
3091
|
-
*/
|
|
3092
|
-
|
|
3093
|
-
last_name?:string;
|
|
3094
|
-
|
|
3095
|
-
/**
|
|
3096
|
-
* @description The email address.
|
|
3097
|
-
|
|
3098
|
-
*/
|
|
3099
|
-
|
|
3100
|
-
email?:string;
|
|
3101
|
-
|
|
3102
|
-
/**
|
|
3103
|
-
* @description The company name.
|
|
3104
|
-
|
|
3105
|
-
*/
|
|
3106
|
-
|
|
3107
|
-
company?:string;
|
|
3108
|
-
|
|
3109
|
-
/**
|
|
3110
|
-
* @description The phone number.
|
|
3111
|
-
|
|
3112
|
-
*/
|
|
3113
|
-
|
|
3114
|
-
phone?:string;
|
|
3115
|
-
|
|
3116
|
-
/**
|
|
3117
|
-
* @description Address line 1
|
|
3118
|
-
|
|
3119
|
-
*/
|
|
3120
|
-
|
|
3121
|
-
line1?:string;
|
|
3122
|
-
|
|
3123
|
-
/**
|
|
3124
|
-
* @description Address line 2
|
|
3125
|
-
|
|
3126
|
-
*/
|
|
3127
|
-
|
|
3128
|
-
line2?:string;
|
|
3129
|
-
|
|
3130
|
-
/**
|
|
3131
|
-
* @description Address line 3
|
|
3132
|
-
|
|
3133
|
-
*/
|
|
3134
|
-
|
|
3135
|
-
line3?:string;
|
|
3136
|
-
|
|
3137
|
-
/**
|
|
3138
|
-
* @description The name of the city.
|
|
3139
|
-
|
|
3140
|
-
*/
|
|
3141
|
-
|
|
3142
|
-
city?:string;
|
|
3143
|
-
|
|
3144
|
-
/**
|
|
3145
|
-
* @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`).
|
|
3146
|
-
|
|
3147
|
-
*/
|
|
3148
|
-
|
|
3149
|
-
state_code?:string;
|
|
3150
|
-
|
|
3151
|
-
/**
|
|
3152
|
-
* @description State or Province
|
|
3153
|
-
|
|
3154
|
-
*/
|
|
3155
|
-
|
|
3156
|
-
state?:string;
|
|
3157
|
-
|
|
3158
|
-
/**
|
|
3159
|
-
* @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).
|
|
3160
|
-
|
|
3161
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
3162
|
-
|
|
3163
|
-
**Brexit**
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
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.
|
|
3167
|
-
|
|
3168
|
-
*/
|
|
3169
|
-
|
|
3170
|
-
country?:string;
|
|
3171
|
-
|
|
3172
|
-
/**
|
|
3173
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
3174
|
-
|
|
3175
|
-
*/
|
|
3176
|
-
|
|
3177
|
-
zip?:string;
|
|
3178
|
-
|
|
3179
|
-
/**
|
|
3180
|
-
* @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. \* not_validated - Address is not yet validated. \* invalid - Address is invalid.
|
|
3181
|
-
|
|
3182
|
-
*/
|
|
3183
|
-
|
|
3184
|
-
validation_status?:ValidationStatus;
|
|
3185
|
-
}
|
|
3186
|
-
export interface Einvoice {
|
|
3187
|
-
/**
|
|
3188
|
-
* @description The unique `id` for the e-invoice. This is auto-generated by Chargebee.
|
|
3189
|
-
|
|
3190
|
-
*/
|
|
3191
|
-
|
|
3192
|
-
id:string;
|
|
3193
|
-
|
|
3194
|
-
/**
|
|
3195
|
-
* @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.
|
|
3196
|
-
|
|
3197
|
-
*/
|
|
3198
|
-
|
|
3199
|
-
reference_number?:string;
|
|
3200
|
-
|
|
3201
|
-
/**
|
|
3202
|
-
* @description The status of processing the e-invoice. To obtain detailed information about the current `status`, see `message`. \* 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. \* 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. \* scheduled - Sending the e-invoice to the customer has been scheduled. \* success - The e-invoice has been successfully delivered to the customer. \* registered - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.
|
|
3203
|
-
|
|
3204
|
-
*/
|
|
3205
|
-
|
|
3206
|
-
status:'in_progress' | 'scheduled' | 'success' | 'registered' | 'failed' | 'skipped';
|
|
3207
|
-
|
|
3208
|
-
/**
|
|
3209
|
-
* @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:
|
|
3210
|
-
|
|
3211
|
-
* Invoice successfully sent to customer via the e-invoicing network 9090:123456
|
|
3212
|
-
* Invoice successfully sent to customer via email id abc@acme.com
|
|
3213
|
-
|
|
3214
|
-
*/
|
|
3215
|
-
|
|
3216
|
-
message?:string;
|
|
3217
|
-
}
|
|
3218
|
-
export interface LinkedTaxWithheld {
|
|
3219
|
-
/**
|
|
3220
|
-
* @description An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`. For example, `tax_wh_16BdDXSlbu4uV1Ee6`.
|
|
3221
|
-
|
|
3222
|
-
*/
|
|
3223
|
-
|
|
3224
|
-
id:string;
|
|
3225
|
-
|
|
3226
|
-
/**
|
|
3227
|
-
* @description The amount withheld by the customer as tax from the invoice. The unit depends on the [type of currency](/docs/api#md_disabled).
|
|
3228
|
-
|
|
3229
|
-
*/
|
|
3230
|
-
|
|
3231
|
-
amount?:number;
|
|
3232
|
-
|
|
3233
|
-
/**
|
|
3234
|
-
* @description The description for this tax withheld.
|
|
3235
|
-
|
|
3236
|
-
*/
|
|
3237
|
-
|
|
3238
|
-
description?:string;
|
|
3239
|
-
|
|
3240
|
-
/**
|
|
3241
|
-
* @description Date or time associated with the tax withheld.
|
|
3242
|
-
|
|
3243
|
-
*/
|
|
3244
|
-
|
|
3245
|
-
date?:number;
|
|
3246
|
-
|
|
3247
|
-
/**
|
|
3248
|
-
* @description A unique external reference number for the tax withheld. Typically, this is the reference number used by the system you are integrating the API with. Depending on your integration, this could be the reference number issued by the taxation authority to identify the customer or the specific tax transaction.
|
|
3249
|
-
|
|
3250
|
-
*/
|
|
3251
|
-
|
|
3252
|
-
reference_number?:string;
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
export interface SiteDetailsAtCreation {
|
|
3256
|
-
timezone?: string;
|
|
3257
|
-
organization_address?: object;
|
|
3258
|
-
}
|
|
3259
|
-
export interface TaxOrigin {
|
|
3260
|
-
country?:string;
|
|
3261
|
-
|
|
3262
|
-
registration_number?:string;
|
|
1066
|
+
config_id: string;
|
|
1067
|
+
amount?: number;
|
|
1068
|
+
}
|
|
1069
|
+
export interface StatementDescriptorCreateInputParam {
|
|
1070
|
+
descriptor?: string;
|
|
1071
|
+
}
|
|
1072
|
+
export interface ShippingAddressCreateInputParam {
|
|
1073
|
+
first_name?: string;
|
|
1074
|
+
last_name?: string;
|
|
1075
|
+
email?: string;
|
|
1076
|
+
company?: string;
|
|
1077
|
+
phone?: string;
|
|
1078
|
+
line1?: string;
|
|
1079
|
+
line2?: string;
|
|
1080
|
+
line3?: string;
|
|
1081
|
+
city?: string;
|
|
1082
|
+
state_code?: string;
|
|
1083
|
+
state?: string;
|
|
1084
|
+
zip?: string;
|
|
1085
|
+
country?: string;
|
|
1086
|
+
validation_status?: ValidationStatus;
|
|
1087
|
+
}
|
|
1088
|
+
export interface PaymentMethodCreateInputParam {
|
|
1089
|
+
type?: Type;
|
|
1090
|
+
/**
|
|
1091
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1092
|
+
*/
|
|
1093
|
+
gateway?: Gateway;
|
|
1094
|
+
gateway_account_id?: string;
|
|
1095
|
+
reference_id?: string;
|
|
1096
|
+
tmp_token?: string;
|
|
1097
|
+
issuing_country?: string;
|
|
1098
|
+
additional_information?: any;
|
|
1099
|
+
}
|
|
1100
|
+
export interface BankAccountCreateInputParam {
|
|
1101
|
+
gateway_account_id?: string;
|
|
1102
|
+
iban?: string;
|
|
1103
|
+
first_name?: string;
|
|
1104
|
+
last_name?: string;
|
|
1105
|
+
company?: string;
|
|
1106
|
+
email?: string;
|
|
1107
|
+
phone?: string;
|
|
1108
|
+
bank_name?: string;
|
|
1109
|
+
account_number?: string;
|
|
1110
|
+
routing_number?: string;
|
|
1111
|
+
bank_code?: string;
|
|
1112
|
+
account_type?: AccountType;
|
|
1113
|
+
account_holder_type?: AccountHolderType;
|
|
1114
|
+
echeck_type?: EcheckType;
|
|
1115
|
+
issuing_country?: string;
|
|
1116
|
+
swedish_identity_number?: string;
|
|
1117
|
+
billing_address?: any;
|
|
1118
|
+
}
|
|
1119
|
+
export interface PaymentIntentCreateInputParam {
|
|
1120
|
+
id?: string;
|
|
1121
|
+
gateway_account_id?: string;
|
|
1122
|
+
gw_token?: string;
|
|
1123
|
+
payment_method_type?:
|
|
1124
|
+
| 'card'
|
|
1125
|
+
| 'ideal'
|
|
1126
|
+
| 'sofort'
|
|
1127
|
+
| 'bancontact'
|
|
1128
|
+
| 'google_pay'
|
|
1129
|
+
| 'dotpay'
|
|
1130
|
+
| 'giropay'
|
|
1131
|
+
| 'apple_pay'
|
|
1132
|
+
| 'upi'
|
|
1133
|
+
| 'netbanking_emandates'
|
|
1134
|
+
| 'paypal_express_checkout'
|
|
1135
|
+
| 'direct_debit'
|
|
1136
|
+
| 'boleto'
|
|
1137
|
+
| 'venmo'
|
|
1138
|
+
| 'amazon_payments'
|
|
1139
|
+
| 'pay_to'
|
|
1140
|
+
| 'faster_payments'
|
|
1141
|
+
| 'sepa_instant_transfer'
|
|
1142
|
+
| 'klarna_pay_now'
|
|
1143
|
+
| 'online_banking_poland';
|
|
1144
|
+
reference_id?: string;
|
|
1145
|
+
/**
|
|
1146
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1147
|
+
*/
|
|
1148
|
+
gw_payment_method_id?: string;
|
|
1149
|
+
additional_information?: any;
|
|
1150
|
+
}
|
|
1151
|
+
export interface CardCreateInputParam {
|
|
1152
|
+
/**
|
|
1153
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1154
|
+
*/
|
|
1155
|
+
gateway?: Gateway;
|
|
1156
|
+
gateway_account_id?: string;
|
|
1157
|
+
/**
|
|
1158
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1159
|
+
*/
|
|
1160
|
+
tmp_token?: string;
|
|
1161
|
+
first_name?: string;
|
|
1162
|
+
last_name?: string;
|
|
1163
|
+
number?: string;
|
|
1164
|
+
expiry_month?: number;
|
|
1165
|
+
expiry_year?: number;
|
|
1166
|
+
cvv?: string;
|
|
1167
|
+
billing_addr1?: string;
|
|
1168
|
+
billing_addr2?: string;
|
|
1169
|
+
billing_city?: string;
|
|
1170
|
+
billing_state_code?: string;
|
|
1171
|
+
billing_state?: string;
|
|
1172
|
+
billing_zip?: string;
|
|
1173
|
+
billing_country?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1176
|
+
*/
|
|
1177
|
+
ip_address?: string;
|
|
1178
|
+
additional_information?: any;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
export interface ChargesCreateInputParam {
|
|
1182
|
+
amount?: number;
|
|
1183
|
+
amount_in_decimal?: string;
|
|
1184
|
+
description?: string;
|
|
1185
|
+
taxable?: boolean;
|
|
1186
|
+
tax_profile_id?: string;
|
|
1187
|
+
avalara_tax_code?: string;
|
|
1188
|
+
hsn_code?: string;
|
|
1189
|
+
taxjar_product_code?: string;
|
|
1190
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
1191
|
+
avalara_transaction_type?: number;
|
|
1192
|
+
avalara_service_type?: number;
|
|
1193
|
+
date_from?: number;
|
|
1194
|
+
date_to?: number;
|
|
1195
|
+
}
|
|
1196
|
+
export interface AddonsCreateInputParam {
|
|
1197
|
+
id?: string;
|
|
1198
|
+
quantity?: number;
|
|
1199
|
+
unit_price?: number;
|
|
1200
|
+
quantity_in_decimal?: string;
|
|
1201
|
+
unit_price_in_decimal?: string;
|
|
1202
|
+
date_from?: number;
|
|
1203
|
+
date_to?: number;
|
|
1204
|
+
}
|
|
1205
|
+
export interface TaxProvidersFieldsCreateInputParam {
|
|
1206
|
+
provider_name?: string;
|
|
1207
|
+
field_id?: string;
|
|
1208
|
+
field_value?: string;
|
|
1209
|
+
}
|
|
1210
|
+
export interface NotesToRemoveCreateInputParam {
|
|
1211
|
+
entity_type?: EntityType;
|
|
1212
|
+
entity_id?: string;
|
|
1213
|
+
}
|
|
1214
|
+
export interface StatementDescriptorCreateForChargeItemsAndChargesInputParam {
|
|
1215
|
+
descriptor?: string;
|
|
1216
|
+
}
|
|
1217
|
+
export interface ShippingAddressCreateForChargeItemsAndChargesInputParam {
|
|
1218
|
+
first_name?: string;
|
|
1219
|
+
last_name?: string;
|
|
1220
|
+
email?: string;
|
|
1221
|
+
company?: string;
|
|
1222
|
+
phone?: string;
|
|
1223
|
+
line1?: string;
|
|
1224
|
+
line2?: string;
|
|
1225
|
+
line3?: string;
|
|
1226
|
+
city?: string;
|
|
1227
|
+
state_code?: string;
|
|
1228
|
+
state?: string;
|
|
1229
|
+
zip?: string;
|
|
1230
|
+
country?: string;
|
|
1231
|
+
validation_status?: ValidationStatus;
|
|
1232
|
+
}
|
|
1233
|
+
export interface PaymentMethodCreateForChargeItemsAndChargesInputParam {
|
|
1234
|
+
type?: Type;
|
|
1235
|
+
/**
|
|
1236
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1237
|
+
*/
|
|
1238
|
+
gateway?: Gateway;
|
|
1239
|
+
gateway_account_id?: string;
|
|
1240
|
+
reference_id?: string;
|
|
1241
|
+
tmp_token?: string;
|
|
1242
|
+
issuing_country?: string;
|
|
1243
|
+
additional_information?: any;
|
|
1244
|
+
}
|
|
1245
|
+
export interface BankAccountCreateForChargeItemsAndChargesInputParam {
|
|
1246
|
+
gateway_account_id?: string;
|
|
1247
|
+
iban?: string;
|
|
1248
|
+
first_name?: string;
|
|
1249
|
+
last_name?: string;
|
|
1250
|
+
company?: string;
|
|
1251
|
+
email?: string;
|
|
1252
|
+
phone?: string;
|
|
1253
|
+
bank_name?: string;
|
|
1254
|
+
account_number?: string;
|
|
1255
|
+
routing_number?: string;
|
|
1256
|
+
bank_code?: string;
|
|
1257
|
+
account_type?: AccountType;
|
|
1258
|
+
account_holder_type?: AccountHolderType;
|
|
1259
|
+
echeck_type?: EcheckType;
|
|
1260
|
+
issuing_country?: string;
|
|
1261
|
+
swedish_identity_number?: string;
|
|
1262
|
+
billing_address?: any;
|
|
1263
|
+
}
|
|
1264
|
+
export interface PaymentIntentCreateForChargeItemsAndChargesInputParam {
|
|
1265
|
+
id?: string;
|
|
1266
|
+
gateway_account_id?: string;
|
|
1267
|
+
gw_token?: string;
|
|
1268
|
+
payment_method_type?:
|
|
1269
|
+
| 'card'
|
|
1270
|
+
| 'ideal'
|
|
1271
|
+
| 'sofort'
|
|
1272
|
+
| 'bancontact'
|
|
1273
|
+
| 'google_pay'
|
|
1274
|
+
| 'dotpay'
|
|
1275
|
+
| 'giropay'
|
|
1276
|
+
| 'apple_pay'
|
|
1277
|
+
| 'upi'
|
|
1278
|
+
| 'netbanking_emandates'
|
|
1279
|
+
| 'paypal_express_checkout'
|
|
1280
|
+
| 'direct_debit'
|
|
1281
|
+
| 'boleto'
|
|
1282
|
+
| 'venmo'
|
|
1283
|
+
| 'amazon_payments'
|
|
1284
|
+
| 'pay_to'
|
|
1285
|
+
| 'faster_payments'
|
|
1286
|
+
| 'sepa_instant_transfer'
|
|
1287
|
+
| 'klarna_pay_now'
|
|
1288
|
+
| 'online_banking_poland';
|
|
1289
|
+
reference_id?: string;
|
|
1290
|
+
/**
|
|
1291
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1292
|
+
*/
|
|
1293
|
+
gw_payment_method_id?: string;
|
|
1294
|
+
additional_information?: any;
|
|
1295
|
+
}
|
|
1296
|
+
export interface CardCreateForChargeItemsAndChargesInputParam {
|
|
1297
|
+
/**
|
|
1298
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1299
|
+
*/
|
|
1300
|
+
gateway?: Gateway;
|
|
1301
|
+
gateway_account_id?: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1304
|
+
*/
|
|
1305
|
+
tmp_token?: string;
|
|
1306
|
+
first_name?: string;
|
|
1307
|
+
last_name?: string;
|
|
1308
|
+
number?: string;
|
|
1309
|
+
expiry_month?: number;
|
|
1310
|
+
expiry_year?: number;
|
|
1311
|
+
cvv?: string;
|
|
1312
|
+
billing_addr1?: string;
|
|
1313
|
+
billing_addr2?: string;
|
|
1314
|
+
billing_city?: string;
|
|
1315
|
+
billing_state_code?: string;
|
|
1316
|
+
billing_state?: string;
|
|
1317
|
+
billing_zip?: string;
|
|
1318
|
+
billing_country?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* @deprecated Please refer API docs to use other attributes
|
|
1321
|
+
*/
|
|
1322
|
+
ip_address?: string;
|
|
1323
|
+
additional_information?: any;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
export interface ChargesCreateForChargeItemsAndChargesInputParam {
|
|
1327
|
+
amount?: number;
|
|
1328
|
+
amount_in_decimal?: string;
|
|
1329
|
+
description?: string;
|
|
1330
|
+
taxable?: boolean;
|
|
1331
|
+
tax_profile_id?: string;
|
|
1332
|
+
avalara_tax_code?: string;
|
|
1333
|
+
hsn_code?: string;
|
|
1334
|
+
taxjar_product_code?: string;
|
|
1335
|
+
avalara_sale_type?: AvalaraSaleType;
|
|
1336
|
+
avalara_transaction_type?: number;
|
|
1337
|
+
avalara_service_type?: number;
|
|
1338
|
+
date_from?: number;
|
|
1339
|
+
date_to?: number;
|
|
1340
|
+
}
|
|
1341
|
+
export interface DiscountsCreateForChargeItemsAndChargesInputParam {
|
|
1342
|
+
percentage?: number;
|
|
1343
|
+
amount?: number;
|
|
1344
|
+
apply_on: ApplyOn;
|
|
1345
|
+
item_price_id?: string;
|
|
1346
|
+
}
|
|
1347
|
+
export interface ItemTiersCreateForChargeItemsAndChargesInputParam {
|
|
1348
|
+
item_price_id?: string;
|
|
1349
|
+
starting_unit?: number;
|
|
1350
|
+
ending_unit?: number;
|
|
1351
|
+
price?: number;
|
|
1352
|
+
starting_unit_in_decimal?: string;
|
|
1353
|
+
ending_unit_in_decimal?: string;
|
|
1354
|
+
price_in_decimal?: string;
|
|
1355
|
+
}
|
|
1356
|
+
export interface ItemPricesCreateForChargeItemsAndChargesInputParam {
|
|
1357
|
+
item_price_id?: string;
|
|
1358
|
+
quantity?: number;
|
|
1359
|
+
quantity_in_decimal?: string;
|
|
1360
|
+
unit_price?: number;
|
|
1361
|
+
unit_price_in_decimal?: string;
|
|
1362
|
+
date_from?: number;
|
|
1363
|
+
date_to?: number;
|
|
1364
|
+
}
|
|
1365
|
+
export interface TaxProvidersFieldsCreateForChargeItemsAndChargesInputParam {
|
|
1366
|
+
provider_name?: string;
|
|
1367
|
+
field_id?: string;
|
|
1368
|
+
field_value?: string;
|
|
1369
|
+
}
|
|
1370
|
+
export interface NotesToRemoveCreateForChargeItemsAndChargesInputParam {
|
|
1371
|
+
entity_type?: EntityType;
|
|
1372
|
+
entity_id?: string;
|
|
1373
|
+
}
|
|
1374
|
+
export interface TaxProvidersFieldsChargeInputParam {
|
|
1375
|
+
provider_name?: string;
|
|
1376
|
+
field_id?: string;
|
|
1377
|
+
field_value?: string;
|
|
1378
|
+
}
|
|
1379
|
+
export interface ItemPriceCreateForChargeItemInputParam {
|
|
1380
|
+
item_price_id: string;
|
|
1381
|
+
quantity?: number;
|
|
1382
|
+
quantity_in_decimal?: string;
|
|
1383
|
+
unit_price?: number;
|
|
1384
|
+
unit_price_in_decimal?: string;
|
|
1385
|
+
date_from?: number;
|
|
1386
|
+
date_to?: number;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
export interface ItemTiersCreateForChargeItemInputParam {
|
|
1390
|
+
starting_unit?: number;
|
|
1391
|
+
ending_unit?: number;
|
|
1392
|
+
price?: number;
|
|
1393
|
+
starting_unit_in_decimal?: string;
|
|
1394
|
+
ending_unit_in_decimal?: string;
|
|
1395
|
+
price_in_decimal?: string;
|
|
1396
|
+
}
|
|
1397
|
+
export interface BillingAddressImportInvoiceInputParam {
|
|
1398
|
+
first_name?: string;
|
|
1399
|
+
last_name?: string;
|
|
1400
|
+
email?: string;
|
|
1401
|
+
company?: string;
|
|
1402
|
+
phone?: string;
|
|
1403
|
+
line1?: string;
|
|
1404
|
+
line2?: string;
|
|
1405
|
+
line3?: string;
|
|
1406
|
+
city?: string;
|
|
1407
|
+
state_code?: string;
|
|
1408
|
+
state?: string;
|
|
1409
|
+
zip?: string;
|
|
1410
|
+
country?: string;
|
|
1411
|
+
validation_status?: ValidationStatus;
|
|
1412
|
+
}
|
|
1413
|
+
export interface ShippingAddressImportInvoiceInputParam {
|
|
1414
|
+
first_name?: string;
|
|
1415
|
+
last_name?: string;
|
|
1416
|
+
email?: string;
|
|
1417
|
+
company?: string;
|
|
1418
|
+
phone?: string;
|
|
1419
|
+
line1?: string;
|
|
1420
|
+
line2?: string;
|
|
1421
|
+
line3?: string;
|
|
1422
|
+
city?: string;
|
|
1423
|
+
state_code?: string;
|
|
1424
|
+
state?: string;
|
|
1425
|
+
zip?: string;
|
|
1426
|
+
country?: string;
|
|
1427
|
+
validation_status?: ValidationStatus;
|
|
1428
|
+
}
|
|
1429
|
+
export interface CreditNoteImportInvoiceInputParam {
|
|
1430
|
+
id?: string;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
export interface PaymentReferenceNumbersImportInvoiceInputParam {
|
|
1434
|
+
id?: string;
|
|
1435
|
+
type: 'kid' | 'ocr' | 'frn' | 'fik' | 'swiss_reference';
|
|
1436
|
+
number: string;
|
|
1437
|
+
}
|
|
1438
|
+
export interface NotesImportInvoiceInputParam {
|
|
1439
|
+
entity_type?:
|
|
1440
|
+
| 'coupon'
|
|
1441
|
+
| 'plan_item_price'
|
|
1442
|
+
| 'addon_item_price'
|
|
1443
|
+
| 'charge_item_price';
|
|
1444
|
+
entity_id?: string;
|
|
1445
|
+
note?: string;
|
|
1446
|
+
}
|
|
1447
|
+
export interface DiscountsImportInvoiceInputParam {
|
|
1448
|
+
entity_type:
|
|
1449
|
+
| 'item_level_coupon'
|
|
1450
|
+
| 'document_level_coupon'
|
|
1451
|
+
| 'promotional_credits'
|
|
1452
|
+
| 'item_level_discount'
|
|
1453
|
+
| 'document_level_discount';
|
|
1454
|
+
entity_id?: string;
|
|
1455
|
+
description?: string;
|
|
1456
|
+
amount: number;
|
|
1457
|
+
}
|
|
1458
|
+
export interface PaymentsImportInvoiceInputParam {
|
|
1459
|
+
amount: number;
|
|
1460
|
+
payment_method: PaymentMethod;
|
|
1461
|
+
date?: number;
|
|
1462
|
+
reference_number?: string;
|
|
1463
|
+
}
|
|
1464
|
+
export interface TaxesImportInvoiceInputParam {
|
|
1465
|
+
name: string;
|
|
1466
|
+
rate: number;
|
|
1467
|
+
amount?: number;
|
|
1468
|
+
description?: string;
|
|
1469
|
+
juris_type?:
|
|
1470
|
+
| 'country'
|
|
1471
|
+
| 'federal'
|
|
1472
|
+
| 'state'
|
|
1473
|
+
| 'county'
|
|
1474
|
+
| 'city'
|
|
1475
|
+
| 'special'
|
|
1476
|
+
| 'unincorporated'
|
|
1477
|
+
| 'other';
|
|
1478
|
+
juris_name?: string;
|
|
1479
|
+
juris_code?: string;
|
|
1480
|
+
}
|
|
1481
|
+
export interface LineItemTiersImportInvoiceInputParam {
|
|
1482
|
+
line_item_id: string;
|
|
1483
|
+
starting_unit?: number;
|
|
1484
|
+
ending_unit?: number;
|
|
1485
|
+
quantity_used?: number;
|
|
1486
|
+
unit_amount?: number;
|
|
1487
|
+
starting_unit_in_decimal?: string;
|
|
1488
|
+
ending_unit_in_decimal?: string;
|
|
1489
|
+
quantity_used_in_decimal?: string;
|
|
1490
|
+
unit_amount_in_decimal?: string;
|
|
1491
|
+
}
|
|
1492
|
+
export interface LineItemsImportInvoiceInputParam {
|
|
1493
|
+
id?: string;
|
|
1494
|
+
date_from?: number;
|
|
1495
|
+
date_to?: number;
|
|
1496
|
+
subscription_id?: string;
|
|
1497
|
+
description: string;
|
|
1498
|
+
unit_amount?: number;
|
|
1499
|
+
quantity?: number;
|
|
1500
|
+
amount?: number;
|
|
1501
|
+
unit_amount_in_decimal?: string;
|
|
1502
|
+
quantity_in_decimal?: string;
|
|
1503
|
+
amount_in_decimal?: string;
|
|
1504
|
+
entity_type?:
|
|
1505
|
+
| 'adhoc'
|
|
1506
|
+
| 'plan_item_price'
|
|
1507
|
+
| 'addon_item_price'
|
|
1508
|
+
| 'charge_item_price';
|
|
1509
|
+
entity_id?: string;
|
|
1510
|
+
item_level_discount1_entity_id?: string;
|
|
1511
|
+
item_level_discount1_amount?: number;
|
|
1512
|
+
item_level_discount2_entity_id?: string;
|
|
1513
|
+
item_level_discount2_amount?: number;
|
|
1514
|
+
tax1_name?: string;
|
|
1515
|
+
tax1_amount?: number;
|
|
1516
|
+
tax2_name?: string;
|
|
1517
|
+
tax2_amount?: number;
|
|
1518
|
+
tax3_name?: string;
|
|
1519
|
+
tax3_amount?: number;
|
|
1520
|
+
tax4_name?: string;
|
|
1521
|
+
tax4_amount?: number;
|
|
1522
|
+
tax5_name?: string;
|
|
1523
|
+
tax5_amount?: number;
|
|
1524
|
+
tax6_name?: string;
|
|
1525
|
+
tax6_amount?: number;
|
|
1526
|
+
tax7_name?: string;
|
|
1527
|
+
tax7_amount?: number;
|
|
1528
|
+
tax8_name?: string;
|
|
1529
|
+
tax8_amount?: number;
|
|
1530
|
+
tax9_name?: string;
|
|
1531
|
+
tax9_amount?: number;
|
|
1532
|
+
tax10_name?: string;
|
|
1533
|
+
tax10_amount?: number;
|
|
1534
|
+
}
|
|
1535
|
+
export interface TransactionsApplyPaymentsInputParam {
|
|
1536
|
+
id?: string;
|
|
1537
|
+
amount?: number;
|
|
1538
|
+
}
|
|
1539
|
+
export interface LineItemsDeleteLineItemsInputParam {
|
|
1540
|
+
id?: string;
|
|
1541
|
+
}
|
|
1542
|
+
export interface CreditNotesApplyCreditsInputParam {
|
|
1543
|
+
id?: string;
|
|
1544
|
+
}
|
|
1545
|
+
export interface EinvoiceInvoiceListInputParam {
|
|
1546
|
+
status?: filter.Enum;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
export interface PaymentReferenceNumberInvoiceListPaymentReferenceNumbersInputParam {
|
|
1550
|
+
number?: filter.String;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
export interface LineItemAddChargeInputParam {
|
|
1554
|
+
date_from?: number;
|
|
1555
|
+
date_to?: number;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
export interface LineItemAddAddonChargeInputParam {
|
|
1559
|
+
date_from?: number;
|
|
1560
|
+
date_to?: number;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
export interface ItemPriceAddChargeItemInputParam {
|
|
1564
|
+
item_price_id: string;
|
|
1565
|
+
quantity?: number;
|
|
1566
|
+
quantity_in_decimal?: string;
|
|
1567
|
+
unit_price?: number;
|
|
1568
|
+
unit_price_in_decimal?: string;
|
|
1569
|
+
date_from?: number;
|
|
1570
|
+
date_to?: number;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
export interface ItemTiersAddChargeItemInputParam {
|
|
1574
|
+
starting_unit?: number;
|
|
1575
|
+
ending_unit?: number;
|
|
1576
|
+
price?: number;
|
|
1577
|
+
starting_unit_in_decimal?: string;
|
|
1578
|
+
ending_unit_in_decimal?: string;
|
|
1579
|
+
price_in_decimal?: string;
|
|
1580
|
+
}
|
|
1581
|
+
export interface NotesToRemoveCloseInputParam {
|
|
1582
|
+
entity_type?: EntityType;
|
|
1583
|
+
entity_id?: string;
|
|
1584
|
+
}
|
|
1585
|
+
export interface TransactionRecordPaymentInputParam {
|
|
1586
|
+
amount?: number;
|
|
1587
|
+
payment_method: PaymentMethod;
|
|
1588
|
+
reference_number?: string;
|
|
1589
|
+
custom_payment_method_id?: string;
|
|
1590
|
+
id_at_gateway?: string;
|
|
1591
|
+
status?: 'success' | 'failure';
|
|
1592
|
+
date?: number;
|
|
1593
|
+
error_code?: string;
|
|
1594
|
+
error_text?: string;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
export interface TaxWithheldRecordTaxWithheldInputParam {
|
|
1598
|
+
amount: number;
|
|
1599
|
+
reference_number?: string;
|
|
1600
|
+
date?: number;
|
|
1601
|
+
description?: string;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
export interface TaxWithheldRemoveTaxWithheldInputParam {
|
|
1605
|
+
id: string;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
export interface CreditNoteRefundInputParam {
|
|
1609
|
+
reason_code?:
|
|
1610
|
+
| 'product_unsatisfactory'
|
|
1611
|
+
| 'service_unsatisfactory'
|
|
1612
|
+
| 'order_change'
|
|
1613
|
+
| 'order_cancellation'
|
|
1614
|
+
| 'waiver'
|
|
1615
|
+
| 'other';
|
|
1616
|
+
create_reason_code?: string;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
export interface TransactionRecordRefundInputParam {
|
|
1620
|
+
amount?: number;
|
|
1621
|
+
payment_method: PaymentMethod;
|
|
1622
|
+
reference_number?: string;
|
|
1623
|
+
custom_payment_method_id?: string;
|
|
1624
|
+
date: number;
|
|
1625
|
+
}
|
|
1626
|
+
export interface CreditNoteRecordRefundInputParam {
|
|
1627
|
+
reason_code?:
|
|
1628
|
+
| 'chargeback'
|
|
1629
|
+
| 'product_unsatisfactory'
|
|
1630
|
+
| 'service_unsatisfactory'
|
|
1631
|
+
| 'order_change'
|
|
1632
|
+
| 'order_cancellation'
|
|
1633
|
+
| 'waiver'
|
|
1634
|
+
| 'other';
|
|
1635
|
+
create_reason_code?: string;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
export interface TransactionRemovePaymentInputParam {
|
|
1639
|
+
id: string;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
export interface CreditNoteRemoveCreditNoteInputParam {
|
|
1643
|
+
id: string;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
export interface BillingAddressUpdateDetailsInputParam {
|
|
1647
|
+
first_name?: string;
|
|
1648
|
+
last_name?: string;
|
|
1649
|
+
email?: string;
|
|
1650
|
+
company?: string;
|
|
1651
|
+
phone?: string;
|
|
1652
|
+
line1?: string;
|
|
1653
|
+
line2?: string;
|
|
1654
|
+
line3?: string;
|
|
1655
|
+
city?: string;
|
|
1656
|
+
state_code?: string;
|
|
1657
|
+
state?: string;
|
|
1658
|
+
zip?: string;
|
|
1659
|
+
country?: string;
|
|
1660
|
+
validation_status?: ValidationStatus;
|
|
1661
|
+
}
|
|
1662
|
+
export interface StatementDescriptorUpdateDetailsInputParam {
|
|
1663
|
+
descriptor?: string;
|
|
1664
|
+
}
|
|
1665
|
+
export interface ShippingAddressUpdateDetailsInputParam {
|
|
1666
|
+
first_name?: string;
|
|
1667
|
+
last_name?: string;
|
|
1668
|
+
email?: string;
|
|
1669
|
+
company?: string;
|
|
1670
|
+
phone?: string;
|
|
1671
|
+
line1?: string;
|
|
1672
|
+
line2?: string;
|
|
1673
|
+
line3?: string;
|
|
1674
|
+
city?: string;
|
|
1675
|
+
state_code?: string;
|
|
1676
|
+
state?: string;
|
|
1677
|
+
zip?: string;
|
|
1678
|
+
country?: string;
|
|
1679
|
+
validation_status?: ValidationStatus;
|
|
3263
1680
|
}
|
|
3264
1681
|
}
|
|
3265
|
-
}
|
|
1682
|
+
}
|