chargebee 2.35.1 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,248 +2,60 @@
2
2
  declare module 'chargebee' {
3
3
  export interface Estimate {
4
4
 
5
- /**
6
- * @description The time at which this estimate got generated
7
-
8
- */
9
-
10
5
  created_at:number;
11
6
 
12
- /**
13
- * @description Represents the subscription details when the 'estimate' operations are invoked.
14
-
15
- */
16
-
17
7
  subscription_estimate?:SubscriptionEstimate;
18
8
 
19
- /**
20
- * @description Is a list of estimated subscriptions i.e., an array of *subscription_estimate* objects. It is generated when 'Create an estimate for purchase' operation is invoked
21
-
22
- */
23
-
24
9
  subscription_estimates?:SubscriptionEstimate[];
25
10
 
26
- /**
27
- * @description Represents the preview of the invoice generated immediately when the 'estimate' operations are invoked.
28
-
29
- */
30
-
31
11
  invoice_estimate?:InvoiceEstimate;
32
12
 
33
- /**
34
- * @description Is a list of estimated invoices i.e., an array of *invoice_estimate* objects. It is generated when 'Create an estimate for unbilled charges' operation is invoked
35
-
36
- */
37
-
38
13
  invoice_estimates?:InvoiceEstimate[];
39
14
 
40
- /**
41
- * @description Represents the preview of the invoice generated at term end when the 'estimate' operations are invoked.
42
-
43
- */
44
-
45
15
  next_invoice_estimate?:InvoiceEstimate;
46
16
 
47
- /**
48
- * @description Represents the preview of the credit-notes generated during 'estimate' operation. Currently applicable only for the 'Update Subscription Estimate' operation.
49
-
50
- */
51
-
52
17
  credit_note_estimates?:CreditNoteEstimate[];
53
18
 
54
- /**
55
- * @description Represents the preview of the unbilled charges generated during 'estimate' operation. Currently not applicable for the 'Subscription renewal estimate' operation.
56
-
57
- */
58
-
59
19
  unbilled_charge_estimates?:UnbilledCharge[];
60
20
  }
61
21
  export namespace Estimate {
62
22
  export class EstimateResource {
63
- /**
64
- * @description Generates an estimate for creating a subscription when the customer does not exist in Chargebee. This estimate API can be called when the customer has not yet signed up and you want to preview how a new subscription would look like for them.
65
-
66
- **Note:** Estimate operations do not make any changes in Chargebee; hence this API does not create an actual `customer` or `subscription` record.
67
- **See also**
68
-
69
- * [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase): an operation that estimates a `purchase` representing multiple subscriptions bought together by a customer.
70
-
71
- The response contains one or more of the following objects:
72
-
73
- * `subscription_estimate`: The subscription details like the status of the subscription (such as `in_trial` or `active`), next billing date, and so on.
74
- * `invoice_estimate`:The details of the immediate invoice, if there is one. If the subscription is created in `trial`/`future` states, `invoice_estimate` is unavailable as no immediate invoice is generated.
75
- * `next_invoice_estimate`:This is returned when an immediate invoice is not generated. It contains the details of the invoice that will be generated on the next billing date of the subscription.
76
- * `unbilled_charge_estimates`: This contains the details of charges that have not been invoiced. This is returned only if the `invoice_immediately` parameter is set to `false`.
77
-
78
-
79
-
80
-
81
- */
82
-
23
+ create_subscription(input:CreateSubscriptionInputParam):ChargebeeRequest<CreateSubscriptionResponse>;
24
+
83
25
  create_sub_item_estimate(input:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
84
26
 
85
- /**
86
- * @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
87
- **See also**
88
-
89
- * [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase): an operation that estimates a &#x60;purchase&#x60; representing multiple subscriptions bought together by a customer.
90
-
91
- */
92
-
27
+ create_sub_for_customer_estimate(customer_id:string, input:CreateSubForCustomerEstimateInputParam):ChargebeeRequest<CreateSubForCustomerEstimateResponse>;
28
+
93
29
  create_sub_item_for_customer_estimate(customer_id:string, input:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
94
30
 
95
- /**
96
- * @description Returns an estimate for updating a subscription.
97
-
98
- In the response,
99
-
100
- * [subscription_estimate](/docs/api/estimates#subscription_estimate_attributes): The details of the changed subscription such as &#x60;status&#x60;, next billing date, and so on.
101
- * [invoice_estimate](/docs/api/estimates#invoice_estimate_attributes):The details of the immediate invoice, if it is generated. An immediate invoice is not generated when:
102
- * &#x60;end_of_term&#x60; parameter is true
103
- * &#x60;prorate&#x60; parameter is &#x60;false&#x60;
104
- * No changes are made to the plan item prices or addon item prices in &#x60;subscription_items&#x60;.
105
- * For changes such as [quantity downgrades](https://www.chargebee.com/docs/proration.html#proration-mechanism_plan-quantity-downgrade-paid-invoice).
106
- * [next_invoice_estimate](/docs/api/estimates#next_invoice_estimate_attributes):The details of the invoice to be generated later (if any) on the occasion that no immediate invoice has been generated.
107
- * [credit_note_estimates](/docs/api/estimates#credit_note_estimate_attributes):The list of credit notes (if any) generated during this operation.
108
- * [unbilled_charge_estimates](/docs/api/estimates#unbilled_charge_estimate_attributes): The details of charges that have not been invoiced. This is returned only if the &#x60;invoice_immediately&#x60; parameter is set to &#x60;false&#x60;.
109
-
110
- */
111
-
31
+ update_subscription(input:UpdateSubscriptionInputParam):ChargebeeRequest<UpdateSubscriptionResponse>;
32
+
112
33
  update_subscription_for_items(input:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
113
34
 
114
- /**
115
- * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
116
-
117
- In the response,
118
-
119
- * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.
120
- * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date.
121
-
122
- The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
123
-
124
- To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify &#x27;false&#x27; for the parameter *include_delayed_charges*.
125
-
126
- **Note:**
127
-
128
- * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.
129
- * For &#x27;Non Renewing&#x27; subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.
130
- * This API is not supported for &#x27;Cancelled&#x27; subscriptions.
131
- * Only the subscription&#x27;s charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.
132
-
133
- */
134
-
135
35
  renewal_estimate(subscription_id:string, input?:RenewalEstimateInputParam):ChargebeeRequest<RenewalEstimateResponse>;
136
36
 
137
- /**
138
- * @description This API is used to generate an invoice estimate for preview. Estimate details include the number of billing cycles to be invoiced in advance, the number of billing cycles in one interval, advance invoicing schedules, and so on.
139
-
140
- */
141
-
142
37
  advance_invoice_estimate(subscription_id:string, input?:AdvanceInvoiceEstimateInputParam):ChargebeeRequest<AdvanceInvoiceEstimateResponse>;
143
38
 
144
- /**
145
- * @description Regenerates the invoice for the current term of the subscription. The subscription must have &#x60;status&#x60; as &#x60;active&#x60; or &#x60;non_renewing&#x60;. This operation is not allowed when any of the following conditions hold true for the subscription:
146
-
147
- * An invoice exists for the current term and its &#x60;status&#x60; is not &#x60;voided&#x60;.
148
- * There are [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html) for the current term.
149
- * The subscription has an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html).
150
-
151
-
152
-
153
- #### Response
154
-
155
- Returns an &#x60;estimate&#x60; object with one of the following components depending on the value of &#x60;invoice_immediately&#x60;.
156
-
157
- * If the value is &#x60;true&#x60;: an &#x60;invoice_estimate&#x60; object that corresponds to the regenerated invoice.
158
- * If the value is &#x60;false&#x60;: a list of &#x60;unbilled_charge_estimate&#x60; objects corresponding to all the unbilled charges created for the current term of the subscription.
159
-
160
-
161
-
162
-
163
- */
164
-
165
39
  regenerate_invoice_estimate(subscription_id:string, input?:RegenerateInvoiceEstimateInputParam):ChargebeeRequest<RegenerateInvoiceEstimateResponse>;
166
40
 
167
- /**
168
- * @description Estimate of the upcoming scheduled invoices (subscription activations, renewals etc) of a customer. For now preview of the invoices generated on the immediate upcoming date is supported. Say a customer has couple of subscription renewals scheduled on *Jan,10th* and another subscription renewal scheduled on *Jan,15th* . This API gives the preview of all the invoices scheduled to be generated on *Jan,10th* (immediate upcoming date).
169
-
170
- In the response:
171
-
172
- * **estimate.invoice_estimates\[\]** has details of the invoices scheduled to be generated.
173
-
174
- **Note:** If *consolidated invoicing* is enabled you may use this API to test whether upcoming renewals are consolidated.
175
-
176
- */
177
-
178
41
  upcoming_invoices_estimate(customer_id:string):ChargebeeRequest<UpcomingInvoicesEstimateResponse>;
179
42
 
180
- /**
181
- * @description Generates an estimate for the &#x27;change term end&#x27; operation. This is similar to the [Change term end](/docs/api/subscriptions#change_term_end) API but the subscription&#x27;s term end will not be changed, only an estimate for this operation is created. This is applicable only for subscriptions in &#x27;in-trial&#x27;, &#x27;active&#x27; and &#x27;non-renewing&#x27; states.
182
-
183
- In the response,
184
-
185
- * **estimate.subscription_estimate** has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on.
186
- * **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation. This will happen when
187
- * *prorate* parameter is false, or
188
- * *invoice_immediately* parameter is false, or
189
- * subscription is in *in-trial* state
190
- * **estimate.credit_note_estimates\[\]** has details of the credit-notes that will get generated during this operation. This list will be empty if no credit-note gets generated during this operation.
191
- * **estimate.unbilled_charge_estimates\[\]** has details of the unbilled charges. This is returned only if *invoice_immediately* is set as false.
192
-
193
- */
194
-
195
43
  change_term_end(subscription_id:string, input:ChangeTermEndInputParam):ChargebeeRequest<ChangeTermEndResponse>;
196
44
 
197
- /**
198
- * @description This creates an estimate for canceling a subscription without actually canceling it. Estimate details include canceling date, unbilled charge options, refund credit handling, the amount to be credited after cancellation, and so on.
199
-
200
- */
201
-
45
+ cancel_subscription(subscription_id:string, input?:CancelSubscriptionInputParam):ChargebeeRequest<CancelSubscriptionResponse>;
46
+
202
47
  cancel_subscription_for_items(subscription_id:string, input?:CancelSubscriptionForItemsInputParam):ChargebeeRequest<CancelSubscriptionForItemsResponse>;
203
48
 
204
- /**
205
- * @description This API provides an estimate of the details pertaining to the [pause_subscription](/docs/api/subscriptions#pause_a_subscription) operation. It returns attributes such as [pause_date](/docs/api/estimates#estimate_subscription_estimate_pause_date) and [resume_date](/docs/api/estimates#estimate_subscription_estimate_resume_date). This is similar to the [Pause a subscription](/docs/api/subscriptions#pause_a_subscription) API with the exception that the subscription is not paused. Only an estimate for this operation is created.
206
-
207
- In the response,
208
-
209
- * **estimate.subscription_estimate** has the subscription details.
210
- * **estimate.invoice_estimate** has details of the invoice that are generated immediately. This is not present if no immediate invoices are generated for this operation.
211
- * **estimate.credit_note_estimates\[\]** has details of the credit notes that are generated during this operation. This list is empty if no credit notes are generated.
212
-
213
- */
214
-
215
49
  pause_subscription(subscription_id:string, input?:PauseSubscriptionInputParam):ChargebeeRequest<PauseSubscriptionResponse>;
216
50
 
217
- /**
218
- * @description Generates an estimate for the &#x27;resume subscription&#x27; operation. This is similar to the [Resume a subscription](/docs/api/subscriptions#resume_a_subscription) API, but the subscription will not be resumed. Only an estimate for this operation is created.
219
-
220
- In the response,
221
-
222
- * **estimate.subscription_estimate** has the subscription details.
223
- * **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation. This will happen for in-term resumption^++^.
224
-
225
- **^++^What is an &quot;in-term resumption&quot;?**
226
- An &quot;in-term resumption&quot; is when the resumption happens within the billing term of the subscription.
227
- * **estimate.next_invoice_estimate** has details of the invoice that will be generated during the next billing date of this subscription. This will be present only if no immediate invoice is generated during this operation (scenario mentioned above) and this subscription has next billing.
228
-
229
- The generated invoice_estimate/next_invoice_estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any.
230
-
231
- */
232
-
233
51
  resume_subscription(subscription_id:string, input?:ResumeSubscriptionInputParam):ChargebeeRequest<ResumeSubscriptionResponse>;
234
52
 
235
- /**
236
- * @description This endpoint generates an estimate for a subscription that is intended to be a gift. The estimate provides details about the gift sender, gift recipient, address details of the recipient, and the type and details of subscription items included in the gift.
237
-
238
- */
239
-
53
+ gift_subscription(input:GiftSubscriptionInputParam):ChargebeeRequest<GiftSubscriptionResponse>;
54
+
240
55
  gift_subscription_for_items(input:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
241
56
 
242
- /**
243
- * @description This endpoint creates an invoice estimate for non-recurring items.
244
-
245
- */
246
-
57
+ create_invoice(input?:CreateInvoiceInputParam):ChargebeeRequest<CreateInvoiceResponse>;
58
+
247
59
  create_invoice_for_items(input:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
248
60
  }
249
61
  export interface CreateSubscriptionResponse {
@@ -251,754 +63,270 @@ In the response,
251
63
  }
252
64
  export interface CreateSubscriptionInputParam {
253
65
 
254
- /**
255
- * @description Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
256
-
257
- */
66
+ subscription:{contract_term_billing_cycle_on_renewal?:number,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
258
67
 
259
- billing_cycles?:number;
68
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
260
69
 
261
- /**
262
- * @description List of addons IDs that are mandatory to the plan and has to be removed from the subscription.
263
-
264
- */
70
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
265
71
 
266
- mandatory_addons_to_remove?:string[];
72
+ customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
267
73
 
268
- /**
269
- * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
270
-
271
- */
74
+ contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number};
272
75
 
273
- terms_to_charge?:number;
76
+ addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
274
77
 
275
- /**
276
- * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
277
-
278
- */
78
+ event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
279
79
 
280
- billing_alignment_mode?:BillingAlignmentMode;
80
+ tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
281
81
 
282
- /**
283
- * @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
284
-
285
- */
82
+ billing_cycles?:number;
286
83
 
287
- coupon_ids?:string[];
84
+ mandatory_addons_to_remove?:string[];
288
85
 
289
- /**
290
- * @description If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).
291
- **Note:** &#x60;invoice_immediately&#x60; only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter. .
292
-
293
- */
86
+ terms_to_charge?:number;
294
87
 
295
- invoice_immediately?:boolean;
88
+ billing_alignment_mode?:BillingAlignmentMode;
296
89
 
297
- /**
298
- * @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. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; 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.
299
-
300
- */
90
+ coupon_ids?:string[];
301
91
 
302
- invoice_date?:number;
92
+ invoice_immediately?:boolean;
303
93
 
304
- /**
305
- * @description Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
306
-
307
- */
94
+ invoice_date?:number;
308
95
 
309
96
  client_profile_id?:string;
97
+ }
98
+ export interface CreateSubItemEstimateResponse {
99
+ estimate:Estimate;
100
+ }
101
+ export interface CreateSubItemEstimateInputParam {
310
102
 
311
- /**
312
- * @description Parameters for subscription
313
-
314
- */
315
-
316
- subscription:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
317
-
318
- /**
319
- * @description Parameters for billing_address
320
-
321
- */
103
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
322
104
 
323
105
  billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
324
106
 
325
- /**
326
- * @description Parameters for shipping_address
327
-
328
- */
329
-
330
107
  shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
331
108
 
332
- /**
333
- * @description Parameters for customer
334
-
335
- */
336
-
337
109
  customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
338
110
 
339
- /**
340
- * @description Parameters for contract_term
341
-
342
- */
343
-
344
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
345
-
346
- /**
347
- * @description Parameters for addons
348
-
349
- */
111
+ contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
350
112
 
351
- addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
113
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
352
114
 
353
- /**
354
- * @description Parameters for event_based_addons
355
-
356
- */
115
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
357
116
 
358
- event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
359
- }
360
- export interface CreateSubItemEstimateResponse {
361
- estimate:Estimate;
362
- }
363
- export interface CreateSubItemEstimateInputParam {
117
+ 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}[];
364
118
 
365
- /**
366
- * @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver&#x3D;2#item_price_billing_cycles) is used.
367
-
368
- */
119
+ tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
369
120
 
370
121
  billing_cycles?:number;
371
122
 
372
- /**
373
- * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
374
-
375
- */
376
-
377
123
  mandatory_items_to_remove?:string[];
378
124
 
379
- /**
380
- * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
381
-
382
- */
383
-
384
125
  terms_to_charge?:number;
385
126
 
386
- /**
387
- * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
388
-
389
- */
390
-
391
127
  billing_alignment_mode?:BillingAlignmentMode;
392
128
 
393
- /**
394
- * @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
395
-
396
- */
397
-
398
129
  coupon_ids?:string[];
399
130
 
400
- /**
401
- * @description If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).
402
- **Note:** &#x60;invoice_immediately&#x60; only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter. .
403
-
404
- */
405
-
406
131
  invoice_immediately?:boolean;
407
132
 
408
- /**
409
- * @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. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; 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.
410
-
411
- */
412
-
413
133
  invoice_date?:number;
414
134
 
415
- /**
416
- * @description Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee&#x27;s AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
417
-
418
- */
419
-
420
135
  client_profile_id?:string;
136
+ }
137
+ export interface CreateSubForCustomerEstimateResponse {
138
+ estimate:Estimate;
139
+ }
140
+ export interface CreateSubForCustomerEstimateInputParam {
421
141
 
422
- /**
423
- * @description Parameters for subscription
424
-
425
- */
142
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
426
143
 
427
- subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
144
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
428
145
 
429
- /**
430
- * @description Parameters for billing_address
431
-
432
- */
146
+ contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number};
433
147
 
434
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
148
+ addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
435
149
 
436
- /**
437
- * @description Parameters for shipping_address
438
-
439
- */
150
+ event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
440
151
 
441
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
152
+ use_existing_balances?:boolean;
442
153
 
443
- /**
444
- * @description Parameters for customer
445
-
446
- */
154
+ invoice_immediately?:boolean;
447
155
 
448
- customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
156
+ billing_cycles?:number;
157
+
158
+ mandatory_addons_to_remove?:string[];
449
159
 
450
- /**
451
- * @description Parameters for contract_term
452
-
453
- */
160
+ terms_to_charge?:number;
454
161
 
455
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
162
+ next_renewal_date?:number;
456
163
 
457
- /**
458
- * @description Parameters for subscription_items
459
-
460
- */
164
+ charge_model?:'full_charge' | 'prorate';
461
165
 
462
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
166
+ billing_alignment_mode?:'immediate' | 'delayed';
463
167
 
464
- /**
465
- * @description Parameters for discounts
466
-
467
- */
168
+ referral_details?:string;
468
169
 
469
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
170
+ invoice_date?:number;
470
171
 
471
- /**
472
- * @description Parameters for item_tiers
473
-
474
- */
172
+ coupon_ids?:string[];
475
173
 
476
- 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}[];
174
+ allow_gift_plan?:boolean;
477
175
  }
478
- export interface CreateSubForCustomerEstimateResponse {
176
+ export interface CreateSubItemForCustomerEstimateResponse {
479
177
  estimate:Estimate;
480
178
  }
481
- export interface CreateSubForCustomerEstimateInputParam {
179
+ export interface CreateSubItemForCustomerEstimateInputParam {
180
+
181
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
182
+
183
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
184
+
185
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
186
+
187
+ contract_term?:{action_at_term_end?:'renew' | 'evergreen' | 'cancel',cancellation_cutoff_period?:number,contract_start?:number};
188
+
189
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
190
+
191
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
192
+
193
+ 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}[];
482
194
 
483
- /**
484
- * @description Create a subscription for the existing estimate of a customer.
485
-
486
- */
487
-
488
195
  use_existing_balances?:boolean;
489
196
 
490
- /**
491
- * @description Create a subscription for the existing estimate of a customer.
492
-
493
- */
494
-
495
197
  invoice_immediately?:boolean;
496
198
 
497
- /**
498
- * @description Create a subscription for the existing estimate of a customer.
499
-
500
- */
501
-
502
199
  billing_cycles?:number;
503
200
 
504
- /**
505
- * @description Create a subscription for the existing estimate of a customer.
506
-
507
- */
508
-
509
- mandatory_addons_to_remove?:string[];
201
+ mandatory_items_to_remove?:string[];
510
202
 
511
- /**
512
- * @description Create a subscription for the existing estimate of a customer.
513
-
514
- */
515
-
516
203
  terms_to_charge?:number;
517
204
 
518
- /**
519
- * @description Create a subscription for the existing estimate of a customer.
520
-
521
- */
522
-
523
- billing_alignment_mode?:'immediate' | 'delayed';
205
+ billing_alignment_mode?:BillingAlignmentMode;
524
206
 
525
- /**
526
- * @description Create a subscription for the existing estimate of a customer.
527
-
528
- */
529
-
530
207
  invoice_date?:number;
531
208
 
532
- /**
533
- * @description Create a subscription for the existing estimate of a customer.
534
-
535
- */
536
-
537
209
  coupon_ids?:string[];
538
-
539
- /**
540
- * @description Create a subscription for the existing estimate of a customer.
541
-
542
- */
543
-
544
- subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,offline_payment_method?:OfflinePaymentMethod,plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
545
-
546
- /**
547
- * @description Create a subscription for the existing estimate of a customer.
548
-
549
- */
550
-
551
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
552
-
553
- /**
554
- * @description Create a subscription for the existing estimate of a customer.
555
-
556
- */
557
-
558
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
559
-
560
- /**
561
- * @description Create a subscription for the existing estimate of a customer.
562
-
563
- */
564
-
565
- addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
566
-
567
- /**
568
- * @description Create a subscription for the existing estimate of a customer.
569
-
570
- */
571
-
572
- event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
573
210
  }
574
- export interface CreateSubItemForCustomerEstimateResponse {
211
+ export interface UpdateSubscriptionResponse {
575
212
  estimate:Estimate;
576
213
  }
577
- export interface CreateSubItemForCustomerEstimateInputParam {
214
+ export interface UpdateSubscriptionInputParam {
578
215
 
579
- /**
580
- * @description The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
581
-
582
- */
216
+ subscription:{auto_collection?:AutoCollection,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,plan_id?:string,plan_quantity?:number,plan_quantity_in_decimal?:string,plan_unit_price?:number,plan_unit_price_in_decimal?:string,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
583
217
 
584
- use_existing_balances?:boolean;
218
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
585
219
 
586
- /**
587
- * @description If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).
588
- **Note:** &#x60;invoice_immediately&#x60; only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter. .
589
-
590
- */
220
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
591
221
 
592
- invoice_immediately?:boolean;
222
+ customer?:{registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
593
223
 
594
- /**
595
- * @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver&#x3D;2#item_price_billing_cycles) is used.
596
-
597
- */
224
+ addons?:{billing_cycles?:number,id?:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
598
225
 
599
- billing_cycles?:number;
226
+ changes_scheduled_at?:number;
600
227
 
601
- /**
602
- * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
603
-
604
- */
228
+ change_option?:ChangeOption;
605
229
 
606
- mandatory_items_to_remove?:string[];
230
+ event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
607
231
 
608
- /**
609
- * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
610
-
611
- */
232
+ replace_addon_list?:boolean;
612
233
 
613
- terms_to_charge?:number;
234
+ mandatory_addons_to_remove?:string[];
614
235
 
615
- /**
616
- * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
617
-
618
- */
236
+ invoice_date?:number;
619
237
 
620
- billing_alignment_mode?:BillingAlignmentMode;
238
+ billing_cycles?:number;
621
239
 
622
- /**
623
- * @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. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; 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.
624
-
625
- */
240
+ terms_to_charge?:number;
626
241
 
627
- invoice_date?:number;
242
+ reactivate_from?:number;
628
243
 
629
- /**
630
- * @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
631
-
632
- */
244
+ billing_alignment_mode?:BillingAlignmentMode;
633
245
 
634
246
  coupon_ids?:string[];
635
247
 
636
- /**
637
- * @description Parameters for subscription
638
-
639
- */
248
+ replace_coupon_list?:boolean;
640
249
 
641
- subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
250
+ prorate?:boolean;
642
251
 
643
- /**
644
- * @description Parameters for shipping_address
645
-
646
- */
252
+ end_of_term?:boolean;
647
253
 
648
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
254
+ force_term_reset?:boolean;
649
255
 
650
- /**
651
- * @description Generates an estimate without creating a subscription. This endpoint can be called when you want to preview details of a new subscription before actually creating one.
652
- **See also**
653
-
654
- * [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase): an operation that estimates a &#x60;purchase&#x60; representing multiple subscriptions bought together by a customer.
655
-
656
- */
256
+ reactivate?:boolean;
657
257
 
658
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
258
+ include_delayed_charges?:boolean;
659
259
 
660
- /**
661
- * @description Parameters for contract_term
662
-
663
- */
260
+ use_existing_balances?:boolean;
664
261
 
665
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
262
+ invoice_immediately?:boolean;
263
+ }
264
+ export interface UpdateSubscriptionForItemsResponse {
265
+ estimate:Estimate;
266
+ }
267
+ export interface UpdateSubscriptionForItemsInputParam {
666
268
 
667
- /**
668
- * @description Parameters for subscription_items
669
-
670
- */
269
+ subscription:{auto_collection?:AutoCollection,coupon?:string,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,setup_fee?:number,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
671
270
 
672
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
271
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
673
272
 
674
- /**
675
- * @description Parameters for discounts
676
-
677
- */
273
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
678
274
 
679
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
275
+ customer?:{registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
680
276
 
681
- /**
682
- * @description Parameters for item_tiers
683
-
684
- */
277
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
685
278
 
686
- 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}[];
687
- }
688
- export interface UpdateSubscriptionForItemsResponse {
689
- estimate:Estimate;
690
- }
691
- export interface UpdateSubscriptionForItemsInputParam {
279
+ discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
692
280
 
693
- /**
694
- * @description Returns an estimate for updating a subscription.
695
-
696
- In the response,
697
-
698
- * [subscription_estimate](/docs/api/estimates#subscription_estimate_attributes): The details of the changed subscription such as &#x60;status&#x60;, next billing date, and so on.
699
- * [invoice_estimate](/docs/api/estimates#invoice_estimate_attributes):The details of the immediate invoice, if it is generated. An immediate invoice is not generated when:
700
- * &#x60;end_of_term&#x60; parameter is true
701
- * &#x60;prorate&#x60; parameter is &#x60;false&#x60;
702
- * No changes are made to the plan item prices or addon item prices in &#x60;subscription_items&#x60;.
703
- * For changes such as [quantity downgrades](https://www.chargebee.com/docs/proration.html#proration-mechanism_plan-quantity-downgrade-paid-invoice).
704
- * [next_invoice_estimate](/docs/api/estimates#next_invoice_estimate_attributes):The details of the invoice to be generated later (if any) on the occasion that no immediate invoice has been generated.
705
- * [credit_note_estimates](/docs/api/estimates#credit_note_estimate_attributes):The list of credit notes (if any) generated during this operation.
706
- * [unbilled_charge_estimates](/docs/api/estimates#unbilled_charge_estimate_attributes): The details of charges that have not been invoiced. This is returned only if the &#x60;invoice_immediately&#x60; parameter is set to &#x60;false&#x60;.
707
-
708
- */
281
+ 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}[];
709
282
 
710
283
  changes_scheduled_at?:number;
711
284
 
712
- /**
713
- * @description null
714
-
715
- */
716
-
717
285
  change_option?:ChangeOption;
718
286
 
719
- /**
720
- * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
721
-
722
- */
723
-
724
287
  mandatory_items_to_remove?:string[];
725
288
 
726
- /**
727
- * @description If &#x60;true&#x60; then the existing &#x60;subscription_items&#x60; list for the subscription is replaced by the one provided. If &#x60;false&#x60; then the provided &#x60;subscription_items&#x60; list gets added to the existing list.
728
-
729
- */
730
-
731
289
  replace_items_list?:boolean;
732
290
 
733
- /**
734
- * @description The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if &#x60;create_pending_invoices&#x60; is set to &#x60;true&#x60;, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of &#x60;invoice_date&#x60;. When passing this parameter, the following prerequisites must be met:
735
-
736
- * &#x60;invoice_date&#x60; must be in the past.
737
- * &#x60;invoice_date&#x60; is not 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.
738
- * It is not earlier than &#x60;changes_scheduled_at&#x60;, &#x60;reactivate_from&#x60;, or &#x60;trial_end&#x60;.
739
- * &#x60;invoice_immediately&#x60; is &#x60;true&#x60;.
740
- .
741
-
742
- */
743
-
744
291
  invoice_date?:number;
745
292
 
746
- /**
747
- * @description Billing cycles set for plan-item price is used by default.
748
-
749
- */
750
-
751
293
  billing_cycles?:number;
752
294
 
753
- /**
754
- * @description The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then &#x60;terms_to_charge&#x60; is inclusive of this new term. See description for the &#x60;force_term_reset&#x60; parameter to learn more about when a subscription term is reset.
755
-
756
- */
757
-
758
295
  terms_to_charge?:number;
759
296
 
760
- /**
761
- * @description If the subscription &#x60;status&#x60; is &#x60;cancelled&#x60; and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
762
- **Note:** It is recommended not to pass this parameter along with &#x60;changed_scheduled_at&#x60;. &#x60;reactivate_from&#x60; can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
763
-
764
- * Backdating must be enabled for subscription reactivation operations.
765
- * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
766
- * The date is on or after the last date/time any of the product catalog items of the subscription were changed.
767
- * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
768
- .
769
-
770
- */
771
-
772
297
  reactivate_from?:number;
773
298
 
774
- /**
775
- * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
776
-
777
- */
778
-
779
299
  billing_alignment_mode?:BillingAlignmentMode;
780
300
 
781
- /**
782
- * @description List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes).
783
-
784
- */
785
-
786
301
  coupon_ids?:string[];
787
302
 
788
- /**
789
- * @description If &#x60;true&#x60; then the existing &#x60;coupon_ids&#x60; list for the subscription is replaced by the one provided. If &#x60;false&#x60; then the provided list gets added to the existing &#x60;coupon_ids&#x60;.
790
-
791
- */
792
-
793
303
  replace_coupon_list?:boolean;
794
304
 
795
- /**
796
- * @description * When &#x60;true&#x60;: [Prorated credits or charges](https://www.chargebee.com/docs/2.0/proration.html#proration-mechanism) are created as applicable for this change.
797
- * When &#x60;false&#x60;: The subscription is changed without creating any credits or charges.
798
- * When not provided, the value configured in the [site settings](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change) is considered.
799
-
800
- **Caveat**
801
-
802
- For further changes within the same billing term, when &#x60;prorate&#x60; is set to &#x60;true&#x60;, **credits** are **not created** when **all** the conditions below hold true:
803
-
804
- An immediate previous change was made
805
-
806
- * with &#x60;prorate&#x60; set to &#x60;false&#x60; and
807
- * no changes were made to the subscription&#x27;s billing term and
808
- * a change was made to either the subscription&#x27;s items or their prices.
809
-
810
- */
811
-
812
305
  prorate?:boolean;
813
306
 
814
- /**
815
- * @description Set this to true if you want the update to be applied at the end of the current subscription billing cycle.
816
-
817
- */
818
-
819
307
  end_of_term?:boolean;
820
308
 
821
- /**
822
- * @description Say the subscription has the renewal date as 28th of every month. When the plan-item price of the subscription is set to one that has the same billing period as the current plan-item price, the subscription change does not change the term. In other words, the subscription still renews on the 28th. Passing this parameter as &#x60;true&#x60; will have the subscription reset its term to the current date (provided &#x60;end_of_term&#x60; is false).
823
- **Note**: When the new plan-item price has a billing period different from the current plan-item price of the subscription, the term is always reset, regardless of the value passed for this parameter.
824
-
825
- */
826
-
827
309
  force_term_reset?:boolean;
828
310
 
829
- /**
830
- * @description Applicable only for &#x60;cancelled&#x60; subscriptions. When passed as &#x60;true&#x60;, the canceled subscription is activated; otherwise subscription changes are made without changing its &#x60;status&#x60;. If not passed, subscription will be activated only if &#x60;subscription_items&#x60; is passed.
831
-
832
- */
833
-
834
311
  reactivate?:boolean;
835
312
 
836
- /**
837
- * @description If true, all the unbilled charges will be included for the invoice estimate.
838
-
839
- */
840
-
841
313
  include_delayed_charges?:boolean;
842
314
 
843
- /**
844
- * @description The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
845
-
846
- */
847
-
848
315
  use_existing_balances?:boolean;
849
316
 
850
- /**
851
- * @description If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).
852
- **Note:** &#x60;invoice_immediately&#x60; only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter. .
853
-
854
- */
855
-
856
317
  invoice_immediately?:boolean;
857
-
858
- /**
859
- * @description Parameters for subscription
860
-
861
- */
862
-
863
- subscription:{auto_collection?:AutoCollection,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
864
-
865
- /**
866
- * @description Parameters for billing_address
867
-
868
- */
869
-
870
- billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
871
-
872
- /**
873
- * @description Parameters for shipping_address
874
-
875
- */
876
-
877
- shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
878
-
879
- /**
880
- * @description Parameters for customer
881
-
882
- */
883
-
884
- customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
885
-
886
- /**
887
- * @description Parameters for subscription_items
888
-
889
- */
890
-
891
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
892
-
893
- /**
894
- * @description Parameters for discounts
895
-
896
- */
897
-
898
- discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
899
-
900
- /**
901
- * @description Parameters for item_tiers
902
-
903
- */
904
-
905
- 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}[];
906
318
  }
907
319
  export interface RenewalEstimateResponse {
908
320
  estimate:Estimate;
909
321
  }
910
322
  export interface RenewalEstimateInputParam {
911
323
 
912
- /**
913
- * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
914
-
915
- In the response,
916
-
917
- * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.
918
- * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date.
919
-
920
- The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
921
-
922
- To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify &#x27;false&#x27; for the parameter *include_delayed_charges*.
923
-
924
- **Note:**
925
-
926
- * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.
927
- * For &#x27;Non Renewing&#x27; subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.
928
- * This API is not supported for &#x27;Cancelled&#x27; subscriptions.
929
- * Only the subscription&#x27;s charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.
930
-
931
- */
932
-
933
324
  include_delayed_charges?:boolean;
934
325
 
935
- /**
936
- * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
937
-
938
- In the response,
939
-
940
- * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.
941
- * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date.
942
-
943
- The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
944
-
945
- To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify &#x27;false&#x27; for the parameter *include_delayed_charges*.
946
-
947
- **Note:**
948
-
949
- * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.
950
- * For &#x27;Non Renewing&#x27; subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.
951
- * This API is not supported for &#x27;Cancelled&#x27; subscriptions.
952
- * Only the subscription&#x27;s charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.
953
-
954
- */
955
-
956
326
  use_existing_balances?:boolean;
957
327
 
958
- /**
959
- * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
960
-
961
- In the response,
962
-
963
- * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.
964
- * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date.
965
-
966
- The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
967
-
968
- To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify &#x27;false&#x27; for the parameter *include_delayed_charges*.
969
-
970
- **Note:**
971
-
972
- * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.
973
- * For &#x27;Non Renewing&#x27; subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.
974
- * This API is not supported for &#x27;Cancelled&#x27; subscriptions.
975
- * Only the subscription&#x27;s charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.
976
-
977
- */
978
-
979
328
  ignore_scheduled_cancellation?:boolean;
980
329
 
981
- /**
982
- * @description This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.
983
-
984
- In the response,
985
-
986
- * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.
987
- * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date.
988
-
989
- The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don&#x27;t want these balances to be included you can specify &#x27;false&#x27; for the parameter *use_existing_balances*.
990
-
991
- To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify &#x27;false&#x27; for the parameter *include_delayed_charges*.
992
-
993
- **Note:**
994
-
995
- * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.
996
- * For &#x27;Non Renewing&#x27; subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.
997
- * This API is not supported for &#x27;Cancelled&#x27; subscriptions.
998
- * Only the subscription&#x27;s charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.
999
-
1000
- */
1001
-
1002
330
  ignore_scheduled_changes?:boolean;
1003
331
  }
1004
332
  export interface AdvanceInvoiceEstimateResponse {
@@ -1006,74 +334,27 @@ In the response,
1006
334
  }
1007
335
  export interface AdvanceInvoiceEstimateInputParam {
1008
336
 
1009
- /**
1010
- * @description * For &#x60;schedule_type &#x3D; immediate&#x60;: the number of future billing cycles to be invoiced in advance. The invoicing is done for the [&#x60;remaining_billing_cycles&#x60;](subscriptions#subscription_remaining_billing_cycles) of the subscription if that is less than &#x60;terms_to_charge&#x60;.
1011
- * For &#x60;schedule_type &#x3D; fixed_intervals&#x60;: The number of future billing cycles in one [interval](advance_invoice_schedules#fixed_interval_schedule). The schedule is created such that the total number of billing cycles in the schedule does not exceed the [remaining_billing_cycles](subscriptions#subscription_remaining_billing_cycles) of the subscription.
1012
- .
1013
-
1014
- */
337
+ fixed_interval_schedule?:{days_before_renewal?:number,end_date?:number,end_schedule_on?:EndScheduleOn,number_of_occurrences?:number};
1015
338
 
1016
- terms_to_charge?:number;
339
+ specific_dates_schedule?:{date?:number,terms_to_charge?:number}[];
1017
340
 
1018
- /**
1019
- * @description Whether the charge should be invoiced immediately or added to [&#x60;unbilled_charges&#x60;](unbilled_charges). Applicable only when [&#x60;schedule_type&#x60;](subscriptions#charge_future_renewals_schedule_type) is &#x60;immediate&#x60;.
1020
-
1021
- */
341
+ terms_to_charge?:number;
1022
342
 
1023
343
  invoice_immediately?:boolean;
1024
344
 
1025
- /**
1026
- * @description The type of advance invoice or advance invoicing schedule. \* immediate - Charge immediately for the number of billing cycles specified by [&#x60;terms_to_charge&#x60;](subscriptions#charge_future_renewals_terms_to_charge). \* specific_dates - Charge on [specific dates](subscriptions#charge_future_renewals_specific_dates_schedule_date). For each date, specify the [number of billing cycles](subscriptions#charge_future_renewals_specific_dates_schedule_terms_to_charge) to charge for. Up to 5 dates can be configured. \* fixed_intervals - Charge at fixed intervals of time. Specify the [number of billing cycles](subscriptions#charge_future_renewals_terms_to_charge) that constitute an interval and the number of [days before each interval](subscriptions#charge_future_renewals_fixed_interval_schedule_days_before_renewal) that the invoice should be generated. Also specify [when the schedule should end](subscriptions#charge_future_renewals_fixed_interval_schedule_end_schedule_on).
1027
-
1028
- */
1029
-
1030
345
  schedule_type?:ScheduleType;
1031
-
1032
- /**
1033
- * @description Parameters for fixed_interval_schedule
1034
-
1035
- */
1036
-
1037
- fixed_interval_schedule?:{days_before_renewal?:number,end_date?:number,end_schedule_on?:EndScheduleOn,number_of_occurrences?:number};
1038
-
1039
- /**
1040
- * @description Parameters for specific_dates_schedule
1041
-
1042
- */
1043
-
1044
- specific_dates_schedule?:{date?:number,terms_to_charge?:number}[];
1045
346
  }
1046
347
  export interface RegenerateInvoiceEstimateResponse {
1047
348
  estimate:Estimate;
1048
349
  }
1049
350
  export interface RegenerateInvoiceEstimateInputParam {
1050
351
 
1051
- /**
1052
- * @description The start date of the period being invoiced. The default value is [current_term_start](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_start ).
1053
-
1054
- */
1055
-
1056
352
  date_from?:number;
1057
353
 
1058
- /**
1059
- * @description The end date of the period being invoiced. The default value is [current_term_end](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_end ).
1060
-
1061
- */
1062
-
1063
354
  date_to?:number;
1064
355
 
1065
- /**
1066
- * @description Whether the charges should be prorated according to the term specified by &#x60;date_from&#x60; and &#x60;date_to&#x60;. Should not be passed without &#x60;date_from&#x60; and &#x60;date_to&#x60;.
1067
-
1068
- */
1069
-
1070
356
  prorate?:boolean;
1071
357
 
1072
- /**
1073
- * @description Only applicable when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html ) is enabled for the customer. Set to &#x60;false&#x60; to leave the current term charge for the subscription as [unbilled](https://www.chargebee.com/docs/unbilled-charges.html ). Once you have done this for all suitable subscriptions of the customer, call [Create an invoice for unbilled charges](https://apidocs.chargebee.com/docs/api/unbilled_charges#create_an_invoice_for_unbilled_charges ) to invoice them.
1074
-
1075
- */
1076
-
1077
358
  invoice_immediately?:boolean;
1078
359
  }
1079
360
  export interface UpcomingInvoicesEstimateResponse {
@@ -1085,26 +366,10 @@ In the response,
1085
366
  }
1086
367
  export interface ChangeTermEndInputParam {
1087
368
 
1088
- /**
1089
- * @description The time at which the current term should end for this subscription.
1090
-
1091
- */
1092
-
1093
369
  term_ends_at:number;
1094
370
 
1095
- /**
1096
- * @description Applicable for *active* / *non_renewing* subscriptions. If specified as *true* prorated charges / credits will be added during this operation.
1097
-
1098
- */
1099
-
1100
371
  prorate?:boolean;
1101
372
 
1102
- /**
1103
- * @description If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).
1104
- **Note:** &#x60;invoice_immediately&#x60; only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter. .
1105
-
1106
- */
1107
-
1108
373
  invoice_immediately?:boolean;
1109
374
  }
1110
375
  export interface CancelSubscriptionResponse {
@@ -1112,423 +377,190 @@ In the response,
1112
377
  }
1113
378
  export interface CancelSubscriptionInputParam {
1114
379
 
1115
- /**
1116
- * @description Set this to &#x60;true&#x60; if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription &#x60;status&#x60; changes to &#x60;non_renewing&#x60;.
1117
-
1118
- */
380
+ cancel_option?:CancelOption;
1119
381
 
1120
382
  end_of_term?:boolean;
1121
383
 
1122
- /**
1123
- * @description Specify the date/time at which you want to cancel the subscription. This parameter should not be provided when &#x60;end_of_term&#x60; is passed as &#x60;true&#x60;. &#x60;cancel_at&#x60; can be set to a value in the past. This is called backdating. Use backdating when the subscription has been canceled already but its billing has been delayed. The following prerequisites must be met to allow backdating:
1124
-
1125
- * Backdating must be enabled for subscription cancellation.
1126
- * The current day of the month does not exceed the limit set in Chargebee for backdating subscription cancellation. This limit is typically the day of the month by which the accounting for the previous month must be closed.
1127
- * The date is on or after &#x60;current_term_start&#x60;.
1128
- * The date is on or after the last date/time any of the following changes were made:
1129
- * Changes in the recurring items or their prices.
1130
- * Addition of non-recurring items.
1131
- * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription&#x27;s plan is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
1132
- .
1133
-
1134
- */
1135
-
1136
384
  cancel_at?:number;
1137
385
 
1138
- /**
1139
- * @description For immediate cancellation (&#x60;end_of_term&#x60; &#x3D; &#x60;false&#x60;), specify how to provide credits for current term charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* none - No credits notes are created. \* full - Credits are issues for the full value of the current term charges. \* prorate - Prorated credits are issued.
1140
-
1141
- */
1142
-
1143
386
  credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
1144
387
 
1145
- /**
1146
- * @description For immediate cancellation (&#x60;end_of_term&#x60; &#x3D; &#x60;false&#x60;), specify how to handle any unbilled charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* invoice - An invoice is generated immediately with the unbilled charges. \* delete - The unbilled charges are deleted.
1147
-
1148
- */
1149
-
1150
388
  unbilled_charges_option?:UnbilledChargesOption;
1151
389
 
1152
- /**
1153
- * @description Applicable when the subscription has past due invoices. Specify this if you want to close the due invoices of the subscription. If specified as schedule_payment_collection/write_off, the due invoices of the subscription will be qualified for the selected operation after the remaining refundable credits and excess payments are applied. **Note:** The payment collection attempt will be asynchronous. Not applicable when &#x27;end_of_term&#x27; is true. \* no_action - No action is taken. \* write_off - The amount due in the invoices will be written-off. Credit notes created due to write-off will not be sent in the response. \* schedule_payment_collection - An automatic charge for the due amount of the past invoices will be attempted on the payment method available, if customer&#x27;s auto-collection property is &#x27;ON&#x27;.
1154
-
1155
- */
1156
-
1157
390
  account_receivables_handling?:AccountReceivablesHandling;
1158
391
 
1159
- /**
1160
- * @description Applicable when the customer has remaining refundable credits(issued against online payments). If specified as schedule_refund, the refund will be initiated for these credits after they are applied against the subscription&#x27;s past due invoices if any. **Note:** The refunds initiated will be asynchronous. Not applicable when &#x27;end_of_term&#x27; is true. \* schedule_refund - Initiates refund of the remaining credits. \* no_action - No action is taken.
1161
-
1162
- */
1163
-
1164
392
  refundable_credits_handling?:RefundableCreditsHandling;
1165
393
 
1166
- /**
1167
- * @description Cancels the current contract term.
1168
-
1169
- * &#x60;terminate_immediately&#x60; immediately does the following:
1170
- * sets the contract term [&#x60;status&#x60;](contract_terms#contract_term_status) to &#x60;terminated&#x60;.
1171
- * Cancels the subscription.
1172
- * Collects any [termination fee](contract_terms#termintation_fee).
1173
- * &#x60;end_of_contract_term&#x60; Sets the [&#x60;contract_term[action_at_term_end]&#x60;](contract_terms#contract_term_action_at_term_end) to &#x60;cancel&#x60;. In other words, the contract term is not renewed and the subscription is canceled at the end of the contract term.
1174
- . \* terminate_immediately - Terminate immediately \* end_of_contract_term - End of contract term
1175
-
1176
- */
1177
-
1178
394
  contract_term_cancel_option?:ContractTermCancelOption;
1179
395
 
1180
- /**
1181
- * @description The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if &#x60;create_pending_invoices&#x60; is &#x60;true&#x60;, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; are computed based on the &#x60;tax&#x60; configuration as of &#x60;invoice_date&#x60;. When passing this parameter, the following prerequisites must be met:
1182
-
1183
- * &#x60;invoice_date&#x60; must be in the past.
1184
- * &#x60;invoice_date&#x60; is not 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.
1185
- * It is not earlier than &#x60;cancel_at&#x60;.
1186
- .
1187
-
1188
- */
1189
-
1190
396
  invoice_date?:number;
1191
397
 
1192
- /**
1193
- * @description Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Subscriptions \&gt; Subscription Cancellation**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
1194
-
1195
- */
398
+ event_based_addons?:{id?:string,quantity?:number,service_period_in_days?:number,unit_price?:number}[];
1196
399
 
1197
400
  cancel_reason_code?:string;
1198
-
1199
- /**
1200
- * @description Parameters for event_based_addons
1201
-
1202
- */
1203
-
1204
- event_based_addons?:{id?:string,quantity?:number,service_period_in_days?:number,unit_price?:number}[];
1205
401
  }
1206
402
  export interface CancelSubscriptionForItemsResponse {
1207
403
  estimate:Estimate;
1208
404
  }
1209
405
  export interface CancelSubscriptionForItemsInputParam {
1210
406
 
1211
- /**
1212
- * @description Set this to &#x60;true&#x60; if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription &#x60;status&#x60; changes to &#x60;non_renewing&#x60;.
1213
-
1214
- */
407
+ cancel_option?:CancelOption;
1215
408
 
1216
409
  end_of_term?:boolean;
1217
410
 
1218
- /**
1219
- * @description Specify the date/time at which you want to cancel the subscription. This parameter should not be provided when &#x60;end_of_term&#x60; is passed as &#x60;true&#x60;. &#x60;cancel_at&#x60; can be set to a value in the past. This is called backdating. Use backdating when the subscription has been canceled already but its billing has been delayed. The following prerequisites must be met to allow backdating:
1220
-
1221
- * Backdating must be enabled for subscription cancellation.
1222
- * The current day of the month does not exceed the limit set in Chargebee for backdating subscription cancellation. This limit is typically the day of the month by which the accounting for the previous month must be closed.
1223
- * The date is on or after &#x60;current_term_start&#x60;.
1224
- * The date is on or after the last date/time any of the following changes were made:
1225
- * Changes in the recurring items or their prices.
1226
- * Addition of non-recurring items.
1227
- * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription&#x27;s plan is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
1228
- .
1229
-
1230
- */
1231
-
1232
411
  cancel_at?:number;
1233
412
 
1234
- /**
1235
- * @description For immediate cancellation (&#x60;end_of_term&#x60; &#x3D; &#x60;false&#x60;), specify how to provide credits for current term charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* none - No credits notes are created. \* full - Credits are issues for the full value of the current term charges. \* prorate - Prorated credits are issued.
1236
-
1237
- */
1238
-
1239
413
  credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
1240
414
 
1241
- /**
1242
- * @description For immediate cancellation (&#x60;end_of_term&#x60; &#x3D; &#x60;false&#x60;), specify how to handle any unbilled charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* invoice - An invoice is generated immediately with the unbilled charges. \* delete - The unbilled charges are deleted.
1243
-
1244
- */
1245
-
1246
415
  unbilled_charges_option?:UnbilledChargesOption;
1247
416
 
1248
- /**
1249
- * @description Applicable when the subscription has past due invoices. Specify this if you want to close the due invoices of the subscription. If specified as schedule_payment_collection/write_off, the due invoices of the subscription will be qualified for the selected operation after the remaining refundable credits and excess payments are applied. **Note:** The payment collection attempt will be asynchronous. Not applicable when &#x27;end_of_term&#x27; is true. \* no_action - No action is taken. \* write_off - The amount due in the invoices will be written-off. Credit notes created due to write-off will not be sent in the response. \* schedule_payment_collection - An automatic charge for the due amount of the past invoices will be attempted on the payment method available, if customer&#x27;s auto-collection property is &#x27;ON&#x27;.
1250
-
1251
- */
1252
-
1253
417
  account_receivables_handling?:AccountReceivablesHandling;
1254
418
 
1255
- /**
1256
- * @description Applicable when the customer has remaining refundable credits(issued against online payments). If specified as schedule_refund, the refund will be initiated for these credits after they are applied against the subscription&#x27;s past due invoices if any. **Note:** The refunds initiated will be asynchronous. Not applicable when &#x27;end_of_term&#x27; is true. \* schedule_refund - Initiates refund of the remaining credits. \* no_action - No action is taken.
1257
-
1258
- */
1259
-
1260
419
  refundable_credits_handling?:RefundableCreditsHandling;
1261
420
 
1262
- /**
1263
- * @description Cancels the current contract term.
1264
-
1265
- * &#x60;terminate_immediately&#x60; immediately does the following:
1266
- * sets the contract term [&#x60;status&#x60;](contract_terms#contract_term_status) to &#x60;terminated&#x60;.
1267
- * Cancels the subscription.
1268
- * Collects any [termination fee](contract_terms#termintation_fee).
1269
- * &#x60;end_of_contract_term&#x60; Sets the [&#x60;contract_term[action_at_term_end]&#x60;](contract_terms#contract_term_action_at_term_end) to &#x60;cancel&#x60;. In other words, the contract term is not renewed and the subscription is canceled at the end of the contract term.
1270
- . \* terminate_immediately - Terminate immediately \* end_of_contract_term - End of contract term
1271
-
1272
- */
1273
-
1274
421
  contract_term_cancel_option?:ContractTermCancelOption;
1275
422
 
1276
- /**
1277
- * @description The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if &#x60;create_pending_invoices&#x60; is &#x60;true&#x60;, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; are computed based on the &#x60;tax&#x60; configuration as of &#x60;invoice_date&#x60;. When passing this parameter, the following prerequisites must be met:
1278
-
1279
- * &#x60;invoice_date&#x60; must be in the past.
1280
- * &#x60;invoice_date&#x60; is not 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.
1281
- * It is not earlier than &#x60;cancel_at&#x60;.
1282
- .
1283
-
1284
- */
1285
-
1286
423
  invoice_date?:number;
1287
424
 
1288
- /**
1289
- * @description Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \&gt; Configure Chargebee \&gt; Reason Codes \&gt; Subscriptions \&gt; Subscription Cancellation**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
1290
-
1291
- */
425
+ subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
1292
426
 
1293
427
  cancel_reason_code?:string;
1294
-
1295
- /**
1296
- * @description Parameters for subscription_items
1297
-
1298
- */
1299
-
1300
- subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
1301
428
  }
1302
429
  export interface PauseSubscriptionResponse {
1303
430
  estimate:Estimate;
1304
431
  }
1305
432
  export interface PauseSubscriptionInputParam {
1306
433
 
1307
- /**
1308
- * @description List of options to pause the subscription. \* billing_cycles -
1309
-
1310
- Pause at the end of the current term, and resume automatically after the number of billing cycles you specify in [skip_billing_cycles](/docs/api/estimates?prod_cat_ver&#x3D;2#pause_subscription_estimate_subscription_skip_billing_cycles)
1311
- \* immediately - Pause immediately
1312
- \* end_of_term - Pause at the end of current term
1313
- \* specific_date - Pause on a specific date
1314
-
1315
- */
434
+ subscription?:{pause_date?:number,resume_date?:number,skip_billing_cycles?:number};
1316
435
 
1317
436
  pause_option?:PauseOption;
1318
437
 
1319
- /**
1320
- * @description Applicable when unbilled charges are present for the subscription and [pause_option](/docs/api/estimates#pause_subscription_estimate_pause_option) is set as &#x60;immediately&#x60;. **Note:** On the invoice raised, an automatic charge is attempted on the payment method available, if customer&#x27;s auto-collection property is set to &#x60;on&#x60;.
1321
- \* invoice -
1322
-
1323
- Invoice charges
1324
-
1325
- If &#x60;invoice&#x60; is chosen, an automatic charge is attempted on the payment method available if the customer has enabled auto-collection. If a payment collection fails or when auto-collection is not enabled, the invoice is closed as unpaid.
1326
- \* no_action -
1327
-
1328
- Retain as unbilled
1329
-
1330
- If &#x60;no_action&#x60; is chosen, charges are added to the resumption invoice.
1331
-
1332
- */
1333
-
1334
438
  unbilled_charges_handling?:UnbilledChargesHandling;
1335
-
1336
- /**
1337
- * @description Parameters for subscription
1338
-
1339
- */
1340
-
1341
- subscription?:{pause_date?:number,resume_date?:number,skip_billing_cycles?:number};
1342
439
  }
1343
440
  export interface ResumeSubscriptionResponse {
1344
441
  estimate:Estimate;
1345
442
  }
1346
443
  export interface ResumeSubscriptionInputParam {
1347
444
 
1348
- /**
1349
- * @description List of options to resume the subscription. \* immediately - Resume immediately \* specific_date - Resume on a specific date
1350
-
1351
- */
445
+ subscription?:{resume_date?:number};
1352
446
 
1353
447
  resume_option?:ResumeOption;
1354
448
 
1355
- /**
1356
- * @description Applicable when charges get added during this operation and **resume_option** is set as &#x27;immediately&#x27;. Allows to raise invoice immediately or add them to unbilled charges. \* add_to_unbilled_charges - Add to unbilled charges \* invoice_immediately - Invoice immediately
1357
-
1358
- */
1359
-
1360
449
  charges_handling?:ChargesHandling;
1361
-
1362
- /**
1363
- * @description Parameters for subscription
1364
-
1365
- */
1366
-
1367
- subscription?:{resume_date?:number};
1368
450
  }
1369
- export interface GiftSubscriptionForItemsResponse {
451
+ export interface GiftSubscriptionResponse {
1370
452
  estimate:Estimate;
1371
453
  }
1372
- export interface GiftSubscriptionForItemsInputParam {
454
+ export interface GiftSubscriptionInputParam {
1373
455
 
1374
- /**
1375
- * @description List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.
1376
-
1377
- */
456
+ gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
1378
457
 
1379
- coupon_ids?:string[];
458
+ gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
1380
459
 
1381
- /**
1382
- * @description Parameters for gift
1383
-
1384
- */
460
+ gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
1385
461
 
1386
- gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
462
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
1387
463
 
1388
- /**
1389
- * @description Parameters for gifter
1390
-
1391
- */
464
+ 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};
1392
465
 
1393
- gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
466
+ subscription:{plan_id:string,plan_quantity?:number,plan_quantity_in_decimal?:string};
1394
467
 
1395
- /**
1396
- * @description Parameters for gift_receiver
1397
-
1398
- */
468
+ addons?:{id?:string,quantity?:number,quantity_in_decimal?:string}[];
1399
469
 
1400
- gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
470
+ coupon_ids?:string[];
471
+ }
472
+ export interface GiftSubscriptionForItemsResponse {
473
+ estimate:Estimate;
474
+ }
475
+ export interface GiftSubscriptionForItemsInputParam {
476
+
477
+ gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
1401
478
 
1402
- /**
1403
- * @description Parameters for payment_intent
1404
-
1405
- */
479
+ gifter:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
1406
480
 
1407
- 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};
481
+ gift_receiver:{customer_id:string,email:string,first_name:string,last_name:string};
1408
482
 
1409
- /**
1410
- * @description Parameters for shipping_address
1411
-
1412
- */
483
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_payment_method_id?:string,gw_token?:string,id?:string,payment_method_type?:'card' | 'ideal' | 'sofort' | 'bancontact' | 'google_pay' | 'dotpay' | 'giropay' | 'apple_pay' | 'upi' | 'netbanking_emandates' | 'paypal_express_checkout' | 'direct_debit' | 'boleto' | 'venmo' | 'amazon_payments' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'klarna_pay_now' | 'online_banking_poland',reference_id?:string};
1413
484
 
1414
485
  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};
1415
486
 
1416
- /**
1417
- * @description Parameters for subscription_items
1418
-
1419
- */
1420
-
1421
487
  subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
488
+
489
+ coupon_ids?:string[];
1422
490
  }
1423
- export interface CreateInvoiceForItemsResponse {
491
+ export interface CreateInvoiceResponse {
1424
492
  estimate:Estimate;
1425
493
  }
1426
- export interface CreateInvoiceForItemsInputParam {
494
+ export interface CreateInvoiceInputParam {
1427
495
 
1428
- /**
1429
- * @description The currency code (ISO 4217 format) of the invoice amount.
1430
-
1431
- */
496
+ invoice?:{customer_id?:string,po_number?:string,subscription_id?:string};
1432
497
 
1433
- currency_code?:string;
498
+ 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};
1434
499
 
1435
- /**
1436
- * @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.
1437
-
1438
- */
500
+ addons?:{date_from?:number,date_to?:number,id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
1439
501
 
1440
- invoice_note?:string;
502
+ 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}[];
503
+
504
+ notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
1441
505
 
1442
- /**
1443
- * @description Set as &#x60;true&#x60; to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice.
1444
-
1445
- */
506
+ tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
507
+
508
+ currency_code?:string;
509
+
510
+ invoice_note?:string;
1446
511
 
1447
512
  remove_general_note?:boolean;
1448
513
 
1449
- /**
1450
- * @description List of Coupons to be added.
1451
-
1452
- */
514
+ coupon?:string;
1453
515
 
1454
516
  coupon_ids?:string[];
1455
517
 
1456
- /**
1457
- * @description Authorization transaction to be captured.
1458
-
1459
- */
1460
-
1461
518
  authorization_transaction_id?:string;
1462
519
 
1463
- /**
1464
- * @description Payment source to be used for this payment.
1465
-
1466
- */
1467
-
1468
520
  payment_source_id?:string;
1469
521
 
1470
- /**
1471
- * @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.
1472
-
1473
- */
1474
-
1475
522
  auto_collection?:AutoCollection;
1476
523
 
1477
- /**
1478
- * @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. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; 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.
1479
-
1480
- */
1481
-
1482
524
  invoice_date?:number;
1483
-
1484
- /**
1485
- * @description Parameters for invoice
1486
-
1487
- */
525
+ }
526
+ export interface CreateInvoiceForItemsResponse {
527
+ estimate:Estimate;
528
+ }
529
+ export interface CreateInvoiceForItemsInputParam {
1488
530
 
1489
531
  invoice?:{customer_id?:string,po_number?:string,subscription_id?:string};
1490
532
 
1491
- /**
1492
- * @description Parameters for shipping_address
1493
-
1494
- */
1495
-
1496
533
  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};
1497
534
 
1498
- /**
1499
- * @description Parameters for item_prices
1500
-
1501
- */
1502
-
1503
535
  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}[];
1504
536
 
1505
- /**
1506
- * @description Parameters for item_tiers
1507
-
1508
- */
1509
-
1510
537
  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}[];
1511
538
 
1512
- /**
1513
- * @description Parameters for charges
1514
-
1515
- */
1516
-
1517
539
  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}[];
1518
540
 
1519
- /**
1520
- * @description Parameters for notes_to_remove
1521
-
1522
- */
1523
-
1524
541
  notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
1525
542
 
1526
- /**
1527
- * @description Parameters for discounts
1528
-
1529
- */
1530
-
1531
543
  discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
544
+
545
+ tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
546
+
547
+ currency_code?:string;
548
+
549
+ invoice_note?:string;
550
+
551
+ remove_general_note?:boolean;
552
+
553
+ coupon?:string;
554
+
555
+ coupon_ids?:string[];
556
+
557
+ authorization_transaction_id?:string;
558
+
559
+ payment_source_id?:string;
560
+
561
+ auto_collection?:AutoCollection;
562
+
563
+ invoice_date?:number;
1532
564
  }
1533
565
 
1534
566
  }