chargebee 2.26.1 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +8 -1
  4. package/package.json +1 -1
  5. package/types/resources/Address.d.ts +0 -10
  6. package/types/resources/AttachedItem.d.ts +0 -20
  7. package/types/resources/Card.d.ts +0 -110
  8. package/types/resources/Comment.d.ts +0 -17
  9. package/types/resources/Coupon.d.ts +0 -37
  10. package/types/resources/CouponCode.d.ts +0 -10
  11. package/types/resources/CouponSet.d.ts +0 -30
  12. package/types/resources/CreditNote.d.ts +0 -102
  13. package/types/resources/Customer.d.ts +0 -313
  14. package/types/resources/DifferentialPrice.d.ts +0 -20
  15. package/types/resources/Estimate.d.ts +0 -160
  16. package/types/resources/Event.d.ts +0 -7
  17. package/types/resources/Export.d.ts +0 -81
  18. package/types/resources/Feature.d.ts +0 -69
  19. package/types/resources/Gift.d.ts +0 -55
  20. package/types/resources/HostedPage.d.ts +0 -166
  21. package/types/resources/InAppSubscription.d.ts +0 -267
  22. package/types/resources/Invoice.d.ts +0 -350
  23. package/types/resources/Item.d.ts +0 -20
  24. package/types/resources/ItemEntitlement.d.ts +0 -10
  25. package/types/resources/ItemFamily.d.ts +0 -20
  26. package/types/resources/ItemPrice.d.ts +0 -20
  27. package/types/resources/NonSubscription.d.ts +0 -5
  28. package/types/resources/Order.d.ts +0 -52
  29. package/types/resources/PaymentIntent.d.ts +0 -25
  30. package/types/resources/PaymentSource.d.ts +0 -275
  31. package/types/resources/PaymentVoucher.d.ts +0 -10
  32. package/types/resources/PortalSession.d.ts +0 -33
  33. package/types/resources/PromotionalCredit.d.ts +0 -51
  34. package/types/resources/Purchase.d.ts +0 -68
  35. package/types/resources/Quote.d.ts +0 -165
  36. package/types/resources/ResourceMigration.d.ts +0 -5
  37. package/types/resources/Subscription.d.ts +103 -1001
  38. package/types/resources/TimeMachine.d.ts +0 -17
  39. package/types/resources/Token.d.ts +0 -15
  40. package/types/resources/Transaction.d.ts +0 -30
  41. package/types/resources/UnbilledCharge.d.ts +0 -46
  42. package/types/resources/Usage.d.ts +0 -22
  43. package/types/resources/VirtualBankAccount.d.ts +0 -35
@@ -733,18 +733,8 @@ For contract terms in `active` state, import is allowed only if the as
733
733
  pause(subscription_id:string, input?:PauseInputParam):ChargebeeRequest<PauseResponse>;
734
734
  }
735
735
  export interface RemoveAdvanceInvoiceScheduleResponse {
736
- /**
737
- * @description Deletes an advance invoicing schedule. When *schedule_type &#x3D; specific_dates*, you also have the option of deleting a part of the schedule.
738
-
739
- */
740
-
741
736
  subscription:Subscription;
742
737
 
743
- /**
744
- * @description Deletes an advance invoicing schedule. When *schedule_type &#x3D; specific_dates*, you also have the option of deleting a part of the schedule.
745
-
746
- */
747
-
748
738
  advance_invoice_schedules?:AdvanceInvoiceSchedule[];
749
739
  }
750
740
  export interface RemoveAdvanceInvoiceScheduleInputParam {
@@ -757,58 +747,16 @@ For contract terms in &#x60;active&#x60; state, import is allowed only if the as
757
747
  specific_dates_schedule?:{id?:string}[];
758
748
  }
759
749
  export interface UpdateForItemsResponse {
760
- /**
761
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
762
-
763
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
764
-
765
- */
766
-
767
750
  subscription:Subscription;
768
751
 
769
- /**
770
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
771
-
772
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
773
-
774
- */
775
-
776
752
  customer:Customer;
777
753
 
778
- /**
779
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
780
-
781
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
782
-
783
- */
784
-
785
754
  card?:Card;
786
755
 
787
- /**
788
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
789
-
790
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
791
-
792
- */
793
-
794
756
  invoice?:Invoice;
795
757
 
796
- /**
797
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
798
-
799
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
800
-
801
- */
802
-
803
758
  unbilled_charges?:UnbilledCharge[];
804
759
 
805
- /**
806
- * @description **Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
807
-
808
- Updates the specified subscription by setting the parameters passed. Any parameters not provided are left unmodified. If an invoice is generated for this operation, any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied.
809
-
810
- */
811
-
812
760
  credit_notes?:CreditNote[];
813
761
  }
814
762
  export interface UpdateForItemsInputParam {
@@ -1168,25 +1116,10 @@ Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_bi
1168
1116
  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}[];
1169
1117
  }
1170
1118
  export interface RemoveCouponsResponse {
1171
- /**
1172
- * @description Removes Coupons associated with the Subscription. If the param &#x27;coupon_ids&#x27; is not specified, all the Coupons linked to the Subscription will be removed.
1173
-
1174
- */
1175
-
1176
1119
  subscription:Subscription;
1177
1120
 
1178
- /**
1179
- * @description Removes Coupons associated with the Subscription. If the param &#x27;coupon_ids&#x27; is not specified, all the Coupons linked to the Subscription will be removed.
1180
-
1181
- */
1182
-
1183
1121
  customer:Customer;
1184
1122
 
1185
- /**
1186
- * @description Removes Coupons associated with the Subscription. If the param &#x27;coupon_ids&#x27; is not specified, all the Coupons linked to the Subscription will be removed.
1187
-
1188
- */
1189
-
1190
1123
  card?:Card;
1191
1124
  }
1192
1125
  export interface RemoveCouponsInputParam {
@@ -1199,134 +1132,14 @@ Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_bi
1199
1132
  coupon_ids?:string[];
1200
1133
  }
1201
1134
  export interface ResumeResponse {
1202
- /**
1203
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
1204
-
1205
- This API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.
1206
-
1207
- You could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.
1208
-
1209
- For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.
1210
-
1211
- **What is an &quot;in-term resumption&quot;?**
1212
- An &quot;in-term resumption&quot; is when the pause and resumption happens within the billing term of the subscription.
1213
-
1214
- **Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.
1215
-
1216
- #### UNPAID INVOICES
1217
-
1218
- Specifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.
1219
-
1220
- If specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.
1221
-
1222
- **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.
1223
-
1224
- */
1225
-
1226
1135
  subscription:Subscription;
1227
1136
 
1228
- /**
1229
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
1230
-
1231
- This API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.
1232
-
1233
- You could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.
1234
-
1235
- For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.
1236
-
1237
- **What is an &quot;in-term resumption&quot;?**
1238
- An &quot;in-term resumption&quot; is when the pause and resumption happens within the billing term of the subscription.
1239
-
1240
- **Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.
1241
-
1242
- #### UNPAID INVOICES
1243
-
1244
- Specifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.
1245
-
1246
- If specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.
1247
-
1248
- **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.
1249
-
1250
- */
1251
-
1252
1137
  customer:Customer;
1253
1138
 
1254
- /**
1255
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
1256
-
1257
- This API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.
1258
-
1259
- You could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.
1260
-
1261
- For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.
1262
-
1263
- **What is an &quot;in-term resumption&quot;?**
1264
- An &quot;in-term resumption&quot; is when the pause and resumption happens within the billing term of the subscription.
1265
-
1266
- **Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.
1267
-
1268
- #### UNPAID INVOICES
1269
-
1270
- Specifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.
1271
-
1272
- If specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.
1273
-
1274
- **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.
1275
-
1276
- */
1277
-
1278
1139
  card?:Card;
1279
1140
 
1280
- /**
1281
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
1282
-
1283
- This API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.
1284
-
1285
- You could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.
1286
-
1287
- For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.
1288
-
1289
- **What is an &quot;in-term resumption&quot;?**
1290
- An &quot;in-term resumption&quot; is when the pause and resumption happens within the billing term of the subscription.
1291
-
1292
- **Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.
1293
-
1294
- #### UNPAID INVOICES
1295
-
1296
- Specifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.
1297
-
1298
- If specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.
1299
-
1300
- **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.
1301
-
1302
- */
1303
-
1304
1141
  invoice?:Invoice;
1305
1142
 
1306
- /**
1307
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
1308
-
1309
- This API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.
1310
-
1311
- You could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.
1312
-
1313
- For in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.
1314
-
1315
- **What is an &quot;in-term resumption&quot;?**
1316
- An &quot;in-term resumption&quot; is when the pause and resumption happens within the billing term of the subscription.
1317
-
1318
- **Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.
1319
-
1320
- #### UNPAID INVOICES
1321
-
1322
- Specifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.
1323
-
1324
- If specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.
1325
-
1326
- **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.
1327
-
1328
- */
1329
-
1330
1143
  unbilled_charges?:UnbilledCharge[];
1331
1144
  }
1332
1145
  export interface ResumeInputParam {
@@ -1374,167 +1187,59 @@ If specified as **schedule_payment_collection**, payment collection for the amou
1374
1187
  payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
1375
1188
  }
1376
1189
  export interface CancelForItemsResponse {
1190
+ subscription:Subscription;
1191
+
1192
+ customer:Customer;
1193
+
1194
+ card?:Card;
1195
+
1196
+ invoice?:Invoice;
1197
+
1198
+ unbilled_charges?:UnbilledCharge[];
1199
+
1200
+ credit_notes?:CreditNote[];
1201
+ }
1202
+ export interface CancelForItemsInputParam {
1203
+
1377
1204
  /**
1378
- * @description Cancels the subscription.
1379
-
1380
- #### Canceling contract terms
1381
-
1382
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1383
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1384
- * &#x60;credit_option_for_current_term_charges&#x60;
1385
- * &#x60;unbilled_charges_option&#x60;
1386
- * &#x60;account_receivables_handling&#x60;
1387
- * &#x60;refundable_credits_handling&#x60;
1388
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1389
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1390
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1391
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1205
+ * @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;.
1392
1206
 
1393
1207
  */
1394
1208
 
1395
- subscription:Subscription;
1209
+ end_of_term?:boolean;
1396
1210
 
1397
1211
  /**
1398
- * @description Cancels the subscription.
1212
+ * @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:
1399
1213
 
1400
- #### Canceling contract terms
1214
+ * Backdating must be enabled for subscription cancellation.
1215
+ * 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.
1216
+ * The date is on or after &#x60;current_term_start&#x60;.
1217
+ * The date is on or after the last date/time any of the following changes were made:
1218
+ * Changes in the recurring items or their prices.
1219
+ * Addition of non-recurring items.
1220
+ * 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.
1221
+ .
1401
1222
 
1402
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1403
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1404
- * &#x60;credit_option_for_current_term_charges&#x60;
1405
- * &#x60;unbilled_charges_option&#x60;
1406
- * &#x60;account_receivables_handling&#x60;
1407
- * &#x60;refundable_credits_handling&#x60;
1408
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1409
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1410
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1411
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1223
+ */
1224
+
1225
+ cancel_at?:number;
1226
+
1227
+ /**
1228
+ * @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.
1412
1229
 
1413
1230
  */
1414
1231
 
1415
- customer:Customer;
1232
+ credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
1416
1233
 
1417
1234
  /**
1418
- * @description Cancels the subscription.
1235
+ * @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.
1419
1236
 
1420
- #### Canceling contract terms
1421
-
1422
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1423
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1424
- * &#x60;credit_option_for_current_term_charges&#x60;
1425
- * &#x60;unbilled_charges_option&#x60;
1426
- * &#x60;account_receivables_handling&#x60;
1427
- * &#x60;refundable_credits_handling&#x60;
1428
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1429
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1430
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1431
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1432
-
1433
- */
1434
-
1435
- card?:Card;
1436
-
1437
- /**
1438
- * @description Cancels the subscription.
1439
-
1440
- #### Canceling contract terms
1441
-
1442
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1443
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1444
- * &#x60;credit_option_for_current_term_charges&#x60;
1445
- * &#x60;unbilled_charges_option&#x60;
1446
- * &#x60;account_receivables_handling&#x60;
1447
- * &#x60;refundable_credits_handling&#x60;
1448
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1449
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1450
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1451
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1452
-
1453
- */
1454
-
1455
- invoice?:Invoice;
1456
-
1457
- /**
1458
- * @description Cancels the subscription.
1459
-
1460
- #### Canceling contract terms
1461
-
1462
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1463
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1464
- * &#x60;credit_option_for_current_term_charges&#x60;
1465
- * &#x60;unbilled_charges_option&#x60;
1466
- * &#x60;account_receivables_handling&#x60;
1467
- * &#x60;refundable_credits_handling&#x60;
1468
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1469
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1470
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1471
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1472
-
1473
- */
1474
-
1475
- unbilled_charges?:UnbilledCharge[];
1476
-
1477
- /**
1478
- * @description Cancels the subscription.
1479
-
1480
- #### Canceling contract terms
1481
-
1482
- * Subscriptions with contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver&#x3D;2&amp;lang&#x3D;curl#cancel_subscription_for_items_contract_term_cancel_option).
1483
- * When canceling a contract term, the default value for the following parameters is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms) instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).
1484
- * &#x60;credit_option_for_current_term_charges&#x60;
1485
- * &#x60;unbilled_charges_option&#x60;
1486
- * &#x60;account_receivables_handling&#x60;
1487
- * &#x60;refundable_credits_handling&#x60;
1488
- * From among the parameters for this request, &#x60;end_of_term&#x60; or &#x60;cancel_at&#x60; should not be passed when using contract terms; use &#x60;contract_term_cancel_option&#x60; instead.
1489
- * The &#x60;subscription_items&#x60; parameter is used to override price or quantity for the termination fee. To use this parameter, the following two conditions must be met:
1490
- * &#x60;contract_term_cancel_option&#x60; must be set to &#x60;terminate_now&#x60;.
1491
- * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) attribute with &#x60;charge_on_event&#x60; set to &#x60;contract_term_termination&#x60;.
1492
-
1493
- */
1494
-
1495
- credit_notes?:CreditNote[];
1496
- }
1497
- export interface CancelForItemsInputParam {
1498
-
1499
- /**
1500
- * @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;.
1501
-
1502
- */
1503
-
1504
- end_of_term?:boolean;
1505
-
1506
- /**
1507
- * @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:
1508
-
1509
- * Backdating must be enabled for subscription cancellation.
1510
- * 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.
1511
- * The date is on or after &#x60;current_term_start&#x60;.
1512
- * The date is on or after the last date/time any of the following changes were made:
1513
- * Changes in the recurring items or their prices.
1514
- * Addition of non-recurring items.
1515
- * 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.
1516
- .
1517
-
1518
- */
1519
-
1520
- cancel_at?:number;
1521
-
1522
- /**
1523
- * @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.
1524
-
1525
- */
1526
-
1527
- credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
1528
-
1529
- /**
1530
- * @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.
1531
-
1532
- */
1533
-
1534
- unbilled_charges_option?:UnbilledChargesOption;
1535
-
1536
- /**
1537
- * @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;.
1237
+ */
1238
+
1239
+ unbilled_charges_option?:UnbilledChargesOption;
1240
+
1241
+ /**
1242
+ * @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;.
1538
1243
 
1539
1244
  */
1540
1245
 
@@ -1588,42 +1293,8 @@ If specified as **schedule_payment_collection**, payment collection for the amou
1588
1293
  subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
1589
1294
  }
1590
1295
  export interface RegenerateInvoiceResponse {
1591
- /**
1592
- * @description Regenerates the current invoice for the subscription. The current invoice is that which includes non-&#x60;metered&#x60; items from the current term and &#x60;metered&#x60; items from the previous term of the subscription.
1593
-
1594
- #### prerequisites
1595
-
1596
- * The current invoice of the subscription must have been [voided](/docs/api/invoices?prod_cat_ver&#x3D;2#void_an_invoice) or [deleted](/docs/api/invoices?prod_cat_ver&#x3D;2#delete_an_invoice).
1597
- * The subscription &#x60;status&#x60; must be &#x60;active&#x60; or &#x60;non_renewing&#x60;.
1598
- * There should be no [unbilled charges](/docs/api/unbilled_charges?prod_cat_ver&#x3D;2) for non-&#x60;metered&#x60; items for the current term.
1599
- * There should be no [unbilled charges](/docs/api/unbilled_charges?prod_cat_ver&#x3D;2) for &#x60;metered&#x60; items for the previous term.
1600
- * The subscription must not have any [advance invoice](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice) or [advance invoice schedule](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice_setting-up-an-advance-invoicing-schedule).
1601
-
1602
- #### deleting an invoice
1603
-
1604
- Usages are also deleted when an invoice is deleted. Therefore, if the invoice was deleted, you may [add](/docs/api/usages?prod_cat_ver&#x3D;2#create_a_usage) or [bulk import](https://www.chargebee.com/docs/2.0/bulk-operations.html#overview_available-bulk-operations) usages before regenerating an invoice.
1605
-
1606
- */
1607
-
1608
1296
  invoice?:Invoice;
1609
1297
 
1610
- /**
1611
- * @description Regenerates the current invoice for the subscription. The current invoice is that which includes non-&#x60;metered&#x60; items from the current term and &#x60;metered&#x60; items from the previous term of the subscription.
1612
-
1613
- #### prerequisites
1614
-
1615
- * The current invoice of the subscription must have been [voided](/docs/api/invoices?prod_cat_ver&#x3D;2#void_an_invoice) or [deleted](/docs/api/invoices?prod_cat_ver&#x3D;2#delete_an_invoice).
1616
- * The subscription &#x60;status&#x60; must be &#x60;active&#x60; or &#x60;non_renewing&#x60;.
1617
- * There should be no [unbilled charges](/docs/api/unbilled_charges?prod_cat_ver&#x3D;2) for non-&#x60;metered&#x60; items for the current term.
1618
- * There should be no [unbilled charges](/docs/api/unbilled_charges?prod_cat_ver&#x3D;2) for &#x60;metered&#x60; items for the previous term.
1619
- * The subscription must not have any [advance invoice](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice) or [advance invoice schedule](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice_setting-up-an-advance-invoicing-schedule).
1620
-
1621
- #### deleting an invoice
1622
-
1623
- Usages are also deleted when an invoice is deleted. Therefore, if the invoice was deleted, you may [add](/docs/api/usages?prod_cat_ver&#x3D;2#create_a_usage) or [bulk import](https://www.chargebee.com/docs/2.0/bulk-operations.html#overview_available-bulk-operations) usages before regenerating an invoice.
1624
-
1625
- */
1626
-
1627
1298
  unbilled_charges?:UnbilledCharge[];
1628
1299
  }
1629
1300
  export interface RegenerateInvoiceInputParam {
@@ -1847,32 +1518,12 @@ The ID of the business entity created for the site. For Product Catalog 1.0, all
1847
1518
  channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
1848
1519
  }
1849
1520
  export interface ImportForItemsResponse {
1850
- /**
1851
- * @description Imports a subscription into Chargebee.
1852
-
1853
- */
1854
-
1855
1521
  subscription:Subscription;
1856
1522
 
1857
- /**
1858
- * @description Imports a subscription into Chargebee.
1859
-
1860
- */
1861
-
1862
1523
  customer:Customer;
1863
1524
 
1864
- /**
1865
- * @description Imports a subscription into Chargebee.
1866
-
1867
- */
1868
-
1869
1525
  card?:Card;
1870
1526
 
1871
- /**
1872
- * @description Imports a subscription into Chargebee.
1873
-
1874
- */
1875
-
1876
1527
  invoice?:Invoice;
1877
1528
  }
1878
1529
  export interface ImportForItemsInputParam {
@@ -2138,49 +1789,52 @@ Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_bi
2138
1789
  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}[];
2139
1790
  }
2140
1791
  export interface RetrieveAdvanceInvoiceScheduleResponse {
2141
- /**
2142
- * @description Retrieves the *advance_invoice_schedule* for a subscription. Note that this endpoint is only applicable for *schedule_type &#x3D; specific_dates* or fixed_intervals.
2143
-
2144
- */
2145
-
2146
1792
  advance_invoice_schedules:AdvanceInvoiceSchedule[];
2147
1793
  }
2148
1794
 
2149
1795
  export interface RemoveScheduledCancellationResponse {
1796
+ subscription:Subscription;
1797
+
1798
+ customer:Customer;
1799
+
1800
+ card?:Card;
1801
+ }
1802
+ export interface RemoveScheduledCancellationInputParam {
1803
+
2150
1804
  /**
2151
- * @description **Note:** Cannot be called when the subscription is on a [contract term](contract_terms). (That is, when the &#x60;contract_term.status attribute&#x60; is &#x60;active&#x60;.)
2152
-
2153
- If the subscription is in **Non Renewing** or **In Trial** state and is also scheduled to cancel at the end of current term, then this API can be used to remove the scheduled cancellation. When a scheduled cancellation is removed, the subscription will revert to **Active** or **In Trial** state, whichever is the state before cancellation was scheduled.
2154
-
2155
- While removing the scheduled cancellation, you may specify the number of billing cycles. If the billing cycle is not specified, the default billing cycle from the plan will be applied on the subscription.
1805
+ * @description Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
2156
1806
 
2157
1807
  */
2158
1808
 
1809
+ billing_cycles?:number;
1810
+ }
1811
+ export interface RetrieveWithScheduledChangesResponse {
2159
1812
  subscription:Subscription;
2160
1813
 
2161
- /**
2162
- * @description **Note:** Cannot be called when the subscription is on a [contract term](contract_terms). (That is, when the &#x60;contract_term.status attribute&#x60; is &#x60;active&#x60;.)
2163
-
2164
- If the subscription is in **Non Renewing** or **In Trial** state and is also scheduled to cancel at the end of current term, then this API can be used to remove the scheduled cancellation. When a scheduled cancellation is removed, the subscription will revert to **Active** or **In Trial** state, whichever is the state before cancellation was scheduled.
2165
-
2166
- While removing the scheduled cancellation, you may specify the number of billing cycles. If the billing cycle is not specified, the default billing cycle from the plan will be applied on the subscription.
2167
-
2168
- */
1814
+ customer:Customer;
1815
+
1816
+ card?:Card;
1817
+ }
1818
+
1819
+ export interface ReactivateResponse {
1820
+ subscription:Subscription;
2169
1821
 
2170
1822
  customer:Customer;
2171
1823
 
1824
+ card?:Card;
1825
+
1826
+ invoice?:Invoice;
1827
+
1828
+ unbilled_charges?:UnbilledCharge[];
1829
+ }
1830
+ export interface ReactivateInputParam {
1831
+
2172
1832
  /**
2173
- * @description **Note:** Cannot be called when the subscription is on a [contract term](contract_terms). (That is, when the &#x60;contract_term.status attribute&#x60; is &#x60;active&#x60;.)
2174
-
2175
- If the subscription is in **Non Renewing** or **In Trial** state and is also scheduled to cancel at the end of current term, then this API can be used to remove the scheduled cancellation. When a scheduled cancellation is removed, the subscription will revert to **Active** or **In Trial** state, whichever is the state before cancellation was scheduled.
2176
-
2177
- While removing the scheduled cancellation, you may specify the number of billing cycles. If the billing cycle is not specified, the default billing cycle from the plan will be applied on the subscription.
1833
+ * @description Providing this parameter indicates that the subscription reactivates with an &#x60;in_trial&#x60; &#x60;status&#x60; and the trial period ends at the date provided. The value must not be earlier than &#x60;reactivate_from&#x60;. Note: This parameter can be backdated (set to a value in the past) only when &#x60;reactivate_from&#x60; has been backdated. Do this to keep a record of when the trial ended in case it ended at some point in the past. When &#x60;trial_end&#x60; is backdated, the subscription immediately goes into &#x60;active&#x60; or &#x60;non_renewing&#x60; status.
2178
1834
 
2179
1835
  */
2180
1836
 
2181
- card?:Card;
2182
- }
2183
- export interface RemoveScheduledCancellationInputParam {
1837
+ trial_end?:number;
2184
1838
 
2185
1839
  /**
2186
1840
  * @description Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
@@ -2188,241 +1842,22 @@ While removing the scheduled cancellation, you may specify the number of billing
2188
1842
  */
2189
1843
 
2190
1844
  billing_cycles?:number;
2191
- }
2192
- export interface RetrieveWithScheduledChangesResponse {
1845
+
2193
1846
  /**
2194
- * @description Retrieves a subscription with the scheduled changes applied.
2195
- **Note:** Only the following attributes are changed
2196
-
2197
- * item_id
2198
- * item_price_id
2199
- * billing_period
2200
- * billing_period_unit
2201
- * remaining_billing_cycles
2202
- * coupons
2203
-
2204
- Other attributes such as **status** ,**next_billing_at** are not changed and will reflect the current subscription values.
2205
-
2206
-
1847
+ * @description The date/time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API. The value of this parameter must always be in the past (backdating). Do this when the subscription has already been reactivated and the billing has been delayed. The following prerequisites must be met for this parameter to be passed:
2207
1848
 
1849
+ * The backdating feature has been enabled for subscription reactivation operations.
1850
+ * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is the day of the month by which the accounting for the previous month must be closed.
1851
+ * 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;reactivate_from&#x60; cannot be earlier than 14th February.
1852
+ .
2208
1853
 
2209
1854
  */
2210
1855
 
2211
- subscription:Subscription;
1856
+ reactivate_from?:number;
2212
1857
 
2213
1858
  /**
2214
- * @description Retrieves a subscription with the scheduled changes applied.
2215
- **Note:** Only the following attributes are changed
2216
-
2217
- * item_id
2218
- * item_price_id
2219
- * billing_period
2220
- * billing_period_unit
2221
- * remaining_billing_cycles
2222
- * coupons
2223
-
2224
- Other attributes such as **status** ,**next_billing_at** are not changed and will reflect the current subscription values.
2225
-
2226
-
2227
-
2228
-
2229
- */
2230
-
2231
- customer:Customer;
2232
-
2233
- /**
2234
- * @description Retrieves a subscription with the scheduled changes applied.
2235
- **Note:** Only the following attributes are changed
2236
-
2237
- * item_id
2238
- * item_price_id
2239
- * billing_period
2240
- * billing_period_unit
2241
- * remaining_billing_cycles
2242
- * coupons
2243
-
2244
- Other attributes such as **status** ,**next_billing_at** are not changed and will reflect the current subscription values.
2245
-
2246
-
2247
-
2248
-
2249
- */
2250
-
2251
- card?:Card;
2252
- }
2253
-
2254
- export interface ReactivateResponse {
2255
- /**
2256
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
2257
-
2258
- This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.
2259
-
2260
- Unless the billing cycle is specified, it will be set to plan&#x27;s default billing cycle.
2261
-
2262
- During an in-term reactivation^++^, unless the billing cycle is specified, the subscription&#x27;s remaining billing cycles will be restored. If a trial end date is specified, then the plan&#x27;s default billing cycle is used.
2263
-
2264
- **What is an &quot;in-term reactivation&quot;?**
2265
- An &quot;in-term reactivation&quot; happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.
2266
-
2267
- **When is the &#x27;billing term&#x27; retained for a cancelled subscription?**
2268
- When dunning (payment failure retry settings) is configured with the last retry configured as
2269
-
2270
- * cancel subscription and mark invoice as &#x27;Not Paid&#x27;, or
2271
- * cancel subscription and mark the invoice as &#x27;Voided&#x27; and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as &#x27;Not Paid&#x27;.
2272
-
2273
-
2274
-
2275
- **Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.
2276
-
2277
- **Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.
2278
-
2279
- */
2280
-
2281
- subscription:Subscription;
2282
-
2283
- /**
2284
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
2285
-
2286
- This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.
2287
-
2288
- Unless the billing cycle is specified, it will be set to plan&#x27;s default billing cycle.
2289
-
2290
- During an in-term reactivation^++^, unless the billing cycle is specified, the subscription&#x27;s remaining billing cycles will be restored. If a trial end date is specified, then the plan&#x27;s default billing cycle is used.
2291
-
2292
- **What is an &quot;in-term reactivation&quot;?**
2293
- An &quot;in-term reactivation&quot; happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.
2294
-
2295
- **When is the &#x27;billing term&#x27; retained for a cancelled subscription?**
2296
- When dunning (payment failure retry settings) is configured with the last retry configured as
2297
-
2298
- * cancel subscription and mark invoice as &#x27;Not Paid&#x27;, or
2299
- * cancel subscription and mark the invoice as &#x27;Voided&#x27; and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as &#x27;Not Paid&#x27;.
2300
-
2301
-
2302
-
2303
- **Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.
2304
-
2305
- **Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.
2306
-
2307
- */
2308
-
2309
- customer:Customer;
2310
-
2311
- /**
2312
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
2313
-
2314
- This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.
2315
-
2316
- Unless the billing cycle is specified, it will be set to plan&#x27;s default billing cycle.
2317
-
2318
- During an in-term reactivation^++^, unless the billing cycle is specified, the subscription&#x27;s remaining billing cycles will be restored. If a trial end date is specified, then the plan&#x27;s default billing cycle is used.
2319
-
2320
- **What is an &quot;in-term reactivation&quot;?**
2321
- An &quot;in-term reactivation&quot; happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.
2322
-
2323
- **When is the &#x27;billing term&#x27; retained for a cancelled subscription?**
2324
- When dunning (payment failure retry settings) is configured with the last retry configured as
2325
-
2326
- * cancel subscription and mark invoice as &#x27;Not Paid&#x27;, or
2327
- * cancel subscription and mark the invoice as &#x27;Voided&#x27; and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as &#x27;Not Paid&#x27;.
2328
-
2329
-
2330
-
2331
- **Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.
2332
-
2333
- **Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.
2334
-
2335
- */
2336
-
2337
- card?:Card;
2338
-
2339
- /**
2340
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
2341
-
2342
- This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.
2343
-
2344
- Unless the billing cycle is specified, it will be set to plan&#x27;s default billing cycle.
2345
-
2346
- During an in-term reactivation^++^, unless the billing cycle is specified, the subscription&#x27;s remaining billing cycles will be restored. If a trial end date is specified, then the plan&#x27;s default billing cycle is used.
2347
-
2348
- **What is an &quot;in-term reactivation&quot;?**
2349
- An &quot;in-term reactivation&quot; happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.
2350
-
2351
- **When is the &#x27;billing term&#x27; retained for a cancelled subscription?**
2352
- When dunning (payment failure retry settings) is configured with the last retry configured as
2353
-
2354
- * cancel subscription and mark invoice as &#x27;Not Paid&#x27;, or
2355
- * cancel subscription and mark the invoice as &#x27;Voided&#x27; and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as &#x27;Not Paid&#x27;.
2356
-
2357
-
2358
-
2359
- **Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.
2360
-
2361
- **Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.
2362
-
2363
- */
2364
-
2365
- invoice?:Invoice;
2366
-
2367
- /**
2368
- * @description **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide) and pass it as input parameter to this API.
2369
-
2370
- This API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.
2371
-
2372
- Unless the billing cycle is specified, it will be set to plan&#x27;s default billing cycle.
2373
-
2374
- During an in-term reactivation^++^, unless the billing cycle is specified, the subscription&#x27;s remaining billing cycles will be restored. If a trial end date is specified, then the plan&#x27;s default billing cycle is used.
2375
-
2376
- **What is an &quot;in-term reactivation&quot;?**
2377
- An &quot;in-term reactivation&quot; happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.
2378
-
2379
- **When is the &#x27;billing term&#x27; retained for a cancelled subscription?**
2380
- When dunning (payment failure retry settings) is configured with the last retry configured as
2381
-
2382
- * cancel subscription and mark invoice as &#x27;Not Paid&#x27;, or
2383
- * cancel subscription and mark the invoice as &#x27;Voided&#x27; and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as &#x27;Not Paid&#x27;.
2384
-
2385
-
2386
-
2387
- **Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.
2388
-
2389
- **Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation.
2390
-
2391
- */
2392
-
2393
- unbilled_charges?:UnbilledCharge[];
2394
- }
2395
- export interface ReactivateInputParam {
2396
-
2397
- /**
2398
- * @description Providing this parameter indicates that the subscription reactivates with an &#x60;in_trial&#x60; &#x60;status&#x60; and the trial period ends at the date provided. The value must not be earlier than &#x60;reactivate_from&#x60;. Note: This parameter can be backdated (set to a value in the past) only when &#x60;reactivate_from&#x60; has been backdated. Do this to keep a record of when the trial ended in case it ended at some point in the past. When &#x60;trial_end&#x60; is backdated, the subscription immediately goes into &#x60;active&#x60; or &#x60;non_renewing&#x60; status.
2399
-
2400
- */
2401
-
2402
- trial_end?:number;
2403
-
2404
- /**
2405
- * @description Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.
2406
-
2407
- */
2408
-
2409
- billing_cycles?:number;
2410
-
2411
- /**
2412
- * @description The date/time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API. The value of this parameter must always be in the past (backdating). Do this when the subscription has already been reactivated and the billing has been delayed. The following prerequisites must be met for this parameter to be passed:
2413
-
2414
- * The backdating feature has been enabled for subscription reactivation operations.
2415
- * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is the day of the month by which the accounting for the previous month must be closed.
2416
- * 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;reactivate_from&#x60; cannot be earlier than 14th February.
2417
- .
2418
-
2419
- */
2420
-
2421
- reactivate_from?:number;
2422
-
2423
- /**
2424
- * @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).
2425
- **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. .
1859
+ * @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).
1860
+ **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. .
2426
1861
 
2427
1862
  */
2428
1863
 
@@ -2484,39 +1919,14 @@ When dunning (payment failure retry settings) is configured with the last retry
2484
1919
  payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
2485
1920
  }
2486
1921
  export interface ChargeFutureRenewalsResponse {
2487
- /**
2488
- * @description Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [&#x60;auto_collection&#x60;](subscriptions#subscription_auto_collection) is &#x60;on&#x60; for the subscription, the [&#x60;payment_source&#x60;](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [&#x60;paused&#x60;](subscriptions#subscription_status) status. Advance invoices are generated only for non-&#x60;metered&#x60; items in a subscription.
2489
-
2490
- */
2491
-
2492
1922
  subscription:Subscription;
2493
1923
 
2494
- /**
2495
- * @description Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [&#x60;auto_collection&#x60;](subscriptions#subscription_auto_collection) is &#x60;on&#x60; for the subscription, the [&#x60;payment_source&#x60;](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [&#x60;paused&#x60;](subscriptions#subscription_status) status. Advance invoices are generated only for non-&#x60;metered&#x60; items in a subscription.
2496
-
2497
- */
2498
-
2499
1924
  customer:Customer;
2500
1925
 
2501
- /**
2502
- * @description Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [&#x60;auto_collection&#x60;](subscriptions#subscription_auto_collection) is &#x60;on&#x60; for the subscription, the [&#x60;payment_source&#x60;](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [&#x60;paused&#x60;](subscriptions#subscription_status) status. Advance invoices are generated only for non-&#x60;metered&#x60; items in a subscription.
2503
-
2504
- */
2505
-
2506
1926
  card?:Card;
2507
1927
 
2508
- /**
2509
- * @description Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [&#x60;auto_collection&#x60;](subscriptions#subscription_auto_collection) is &#x60;on&#x60; for the subscription, the [&#x60;payment_source&#x60;](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [&#x60;paused&#x60;](subscriptions#subscription_status) status. Advance invoices are generated only for non-&#x60;metered&#x60; items in a subscription.
2510
-
2511
- */
2512
-
2513
1928
  invoice?:Invoice;
2514
1929
 
2515
- /**
2516
- * @description Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [&#x60;auto_collection&#x60;](subscriptions#subscription_auto_collection) is &#x60;on&#x60; for the subscription, the [&#x60;payment_source&#x60;](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [&#x60;paused&#x60;](subscriptions#subscription_status) status. Advance invoices are generated only for non-&#x60;metered&#x60; items in a subscription.
2517
-
2518
- */
2519
-
2520
1930
  advance_invoice_schedules?:AdvanceInvoiceSchedule[];
2521
1931
  }
2522
1932
  export interface ChargeFutureRenewalsInputParam {
@@ -2559,13 +1969,6 @@ When dunning (payment failure retry settings) is configured with the last retry
2559
1969
  specific_dates_schedule?:{date?:number,terms_to_charge?:number}[];
2560
1970
  }
2561
1971
  export interface AddChargeAtTermEndResponse {
2562
- /**
2563
- * @description Adds a one time charge to the subscription which will be added to the invoice generated at the end of the current term. If there are any applicable coupons in the subscription, an appropriate discount will be applied.
2564
-
2565
- To collect a charge immediately, [use this API](/docs/api/invoices#create_invoice_for_charge).
2566
-
2567
- */
2568
-
2569
1972
  estimate:Estimate;
2570
1973
  }
2571
1974
  export interface AddChargeAtTermEndInputParam {
@@ -2613,126 +2016,40 @@ To collect a charge immediately, [use this API](/docs/api/invoices#create_invoic
2613
2016
  avalara_service_type?:number;
2614
2017
 
2615
2018
  /**
2616
- * @description The time when the service period for the charge starts.
2617
-
2618
- */
2619
-
2620
- date_from?:number;
2621
-
2622
- /**
2623
- * @description The time when the service period for the charge ends.
2624
-
2625
- */
2626
-
2627
- date_to?:number;
2628
- }
2629
- export interface RemoveScheduledChangesResponse {
2630
- /**
2631
- * @description Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal.
2632
-
2633
- */
2634
-
2635
- subscription:Subscription;
2636
-
2637
- /**
2638
- * @description Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal.
2639
-
2640
- */
2641
-
2642
- customer:Customer;
2643
-
2644
- /**
2645
- * @description Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal.
2646
-
2647
- */
2648
-
2649
- card?:Card;
2650
-
2651
- /**
2652
- * @description Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal.
2653
-
2654
- */
2655
-
2656
- credit_notes?:CreditNote[];
2657
- }
2658
-
2659
- export interface ChangeTermEndResponse {
2660
- /**
2661
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2662
-
2663
- * If the Subscription is in **trial**, it affects trial end date.
2664
- * If the Subscription is **active**, it affects the next billing date.
2665
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2666
-
2667
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2668
-
2669
- */
2670
-
2671
- subscription:Subscription;
2672
-
2673
- /**
2674
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2675
-
2676
- * If the Subscription is in **trial**, it affects trial end date.
2677
- * If the Subscription is **active**, it affects the next billing date.
2678
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2679
-
2680
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2681
-
2682
- */
2683
-
2684
- customer:Customer;
2685
-
2686
- /**
2687
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2688
-
2689
- * If the Subscription is in **trial**, it affects trial end date.
2690
- * If the Subscription is **active**, it affects the next billing date.
2691
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2692
-
2693
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2694
-
2695
- */
2696
-
2697
- card?:Card;
2698
-
2699
- /**
2700
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2701
-
2702
- * If the Subscription is in **trial**, it affects trial end date.
2703
- * If the Subscription is **active**, it affects the next billing date.
2704
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2705
-
2706
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2707
-
2708
- */
2709
-
2710
- invoice?:Invoice;
2711
-
2712
- /**
2713
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2714
-
2715
- * If the Subscription is in **trial**, it affects trial end date.
2716
- * If the Subscription is **active**, it affects the next billing date.
2717
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2718
-
2719
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2019
+ * @description The time when the service period for the charge starts.
2720
2020
 
2721
2021
  */
2722
2022
 
2723
- unbilled_charges?:UnbilledCharge[];
2023
+ date_from?:number;
2724
2024
 
2725
2025
  /**
2726
- * @description Changes the subscription&#x27;s current term end date. Depending on the &quot;status&quot; of the subscription, &quot;term end date&quot; has different effects.
2727
-
2728
- * If the Subscription is in **trial**, it affects trial end date.
2729
- * If the Subscription is **active**, it affects the next billing date.
2730
- * If the Subscription&#x27;s status is **non_renewing**, this affects the upcoming cancellation date.
2731
-
2732
- **Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API.
2026
+ * @description The time when the service period for the charge ends.
2733
2027
 
2734
2028
  */
2735
2029
 
2030
+ date_to?:number;
2031
+ }
2032
+ export interface RemoveScheduledChangesResponse {
2033
+ subscription:Subscription;
2034
+
2035
+ customer:Customer;
2036
+
2037
+ card?:Card;
2038
+
2039
+ credit_notes?:CreditNote[];
2040
+ }
2041
+
2042
+ export interface ChangeTermEndResponse {
2043
+ subscription:Subscription;
2044
+
2045
+ customer:Customer;
2046
+
2047
+ card?:Card;
2048
+
2049
+ invoice?:Invoice;
2050
+
2051
+ unbilled_charges?:UnbilledCharge[];
2052
+
2736
2053
  credit_notes?:CreditNote[];
2737
2054
  }
2738
2055
  export interface ChangeTermEndInputParam {
@@ -2760,87 +2077,22 @@ To collect a charge immediately, [use this API](/docs/api/invoices#create_invoic
2760
2077
  invoice_immediately?:boolean;
2761
2078
  }
2762
2079
  export interface DeleteResponse {
2763
- /**
2764
- * @description Deletes the subscription resource.
2765
-
2766
- */
2767
-
2768
2080
  subscription:Subscription;
2769
2081
 
2770
- /**
2771
- * @description Deletes the subscription resource.
2772
-
2773
- */
2774
-
2775
2082
  customer:Customer;
2776
2083
 
2777
- /**
2778
- * @description Deletes the subscription resource.
2779
-
2780
- */
2781
-
2782
2084
  card?:Card;
2783
2085
  }
2784
2086
 
2785
2087
  export interface CreateWithItemsResponse {
2786
- /**
2787
- * @description **Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
2788
-
2789
- Creates a new subscription for an existing customer in Chargebee. Any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied on the invoice.
2790
- **See also**
2791
-
2792
- * [Create a purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase): an operation that creates a purchase representing multiple subscriptions bought together by a customer.
2793
-
2794
- */
2795
-
2796
2088
  subscription:Subscription;
2797
2089
 
2798
- /**
2799
- * @description **Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
2800
-
2801
- Creates a new subscription for an existing customer in Chargebee. Any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied on the invoice.
2802
- **See also**
2803
-
2804
- * [Create a purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase): an operation that creates a purchase representing multiple subscriptions bought together by a customer.
2805
-
2806
- */
2807
-
2808
2090
  customer:Customer;
2809
2091
 
2810
- /**
2811
- * @description **Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
2812
-
2813
- Creates a new subscription for an existing customer in Chargebee. Any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied on the invoice.
2814
- **See also**
2815
-
2816
- * [Create a purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase): an operation that creates a purchase representing multiple subscriptions bought together by a customer.
2817
-
2818
- */
2819
-
2820
2092
  card?:Card;
2821
2093
 
2822
- /**
2823
- * @description **Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
2824
-
2825
- Creates a new subscription for an existing customer in Chargebee. Any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied on the invoice.
2826
- **See also**
2827
-
2828
- * [Create a purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase): an operation that creates a purchase representing multiple subscriptions bought together by a customer.
2829
-
2830
- */
2831
-
2832
2094
  invoice?:Invoice;
2833
2095
 
2834
- /**
2835
- * @description **Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver&#x3D;2#create_a_payment_intent) a &#x60;payment_intent&#x60; and provide it via this endpoint.
2836
-
2837
- Creates a new subscription for an existing customer in Chargebee. Any available [credits and excess payments](./customers?prod_cat_ver&#x3D;2#customer_balances) for the customer are automatically applied on the invoice.
2838
- **See also**
2839
-
2840
- * [Create a purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase): an operation that creates a purchase representing multiple subscriptions bought together by a customer.
2841
-
2842
- */
2843
-
2844
2096
  unbilled_charges?:UnbilledCharge[];
2845
2097
  }
2846
2098
  export interface CreateWithItemsInputParam {
@@ -3108,11 +2360,6 @@ If any non-&#x60;metered&#x60; items are present for the current term, they&#x27
3108
2360
  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}[];
3109
2361
  }
3110
2362
  export interface ImportUnbilledChargesResponse {
3111
- /**
3112
- * @description Imports unbilled charges into Chargebee.
3113
-
3114
- */
3115
-
3116
2363
  unbilled_charges:UnbilledCharge[];
3117
2364
  }
3118
2365
  export interface ImportUnbilledChargesInputParam {
@@ -3139,59 +2386,22 @@ If any non-&#x60;metered&#x60; items are present for the current term, they&#x27
3139
2386
  tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unbilled_charge_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
3140
2387
  }
3141
2388
  export interface RemoveScheduledResumptionResponse {
3142
- /**
3143
- * @description If the subscription is in **Paused** state and is scheduled to resume on a specific_date, this API can be used to remove the scheduled resumption. When the scheduled resumption is removed, the subscription will remain **Paused**.
3144
-
3145
- */
3146
-
3147
2389
  subscription:Subscription;
3148
2390
 
3149
- /**
3150
- * @description If the subscription is in **Paused** state and is scheduled to resume on a specific_date, this API can be used to remove the scheduled resumption. When the scheduled resumption is removed, the subscription will remain **Paused**.
3151
-
3152
- */
3153
-
3154
2391
  customer:Customer;
3155
2392
 
3156
- /**
3157
- * @description If the subscription is in **Paused** state and is scheduled to resume on a specific_date, this API can be used to remove the scheduled resumption. When the scheduled resumption is removed, the subscription will remain **Paused**.
3158
-
3159
- */
3160
-
3161
2393
  card?:Card;
3162
2394
  }
3163
2395
 
3164
2396
  export interface RetrieveResponse {
3165
- /**
3166
- * @description Retrieves a subscription.
3167
-
3168
- */
3169
-
3170
2397
  subscription:Subscription;
3171
2398
 
3172
- /**
3173
- * @description Retrieves a subscription.
3174
-
3175
- */
3176
-
3177
2399
  customer:Customer;
3178
2400
 
3179
- /**
3180
- * @description Retrieves a subscription.
3181
-
3182
- */
3183
-
3184
2401
  card?:Card;
3185
2402
  }
3186
2403
 
3187
2404
  export interface ImportContractTermResponse {
3188
- /**
3189
- * @description Import previous and active [contract terms](./contract_terms).
3190
-
3191
- For contract terms in &#x60;active&#x60; state, import is allowed only if the associated subscription is &#x60;active&#x60;, &#x60;in_trial&#x60;, &#x60;future&#x60; or &#x60;non-renewing&#x60;.
3192
-
3193
- */
3194
-
3195
2405
  contract_term:ContractTerm;
3196
2406
  }
3197
2407
  export interface ImportContractTermInputParam {
@@ -3211,18 +2421,8 @@ For contract terms in &#x60;active&#x60; state, import is allowed only if the as
3211
2421
  contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',billing_cycle?:number,cancellation_cutoff_period?:number,contract_end?:number,contract_start?:number,created_at?:number,id?:string,status?:'active' | 'cancelled' | 'completed' | 'terminated',total_amount_raised?:number,total_amount_raised_before_tax?:number,total_contract_value?:number,total_contract_value_before_tax?:number};
3212
2422
  }
3213
2423
  export interface OverrideBillingProfileResponse {
3214
- /**
3215
- * @description Assigns the payment source and sets auto collection state for the subscription.
3216
-
3217
- */
3218
-
3219
2424
  subscription:Subscription;
3220
2425
 
3221
- /**
3222
- * @description Assigns the payment source and sets auto collection state for the subscription.
3223
-
3224
- */
3225
-
3226
2426
  payment_source?:PaymentSource;
3227
2427
  }
3228
2428
  export interface OverrideBillingProfileInputParam {
@@ -3242,34 +2442,14 @@ For contract terms in &#x60;active&#x60; state, import is allowed only if the as
3242
2442
  auto_collection?:AutoCollection;
3243
2443
  }
3244
2444
  export interface RemoveScheduledPauseResponse {
3245
- /**
3246
- * @description If the subscription is in **Active** or **Non Renewing** state and is also scheduled to pause at the end_of_term/specific_date, this API can be used to remove the scheduled pause.
3247
-
3248
- */
3249
-
3250
2445
  subscription:Subscription;
3251
2446
 
3252
- /**
3253
- * @description If the subscription is in **Active** or **Non Renewing** state and is also scheduled to pause at the end_of_term/specific_date, this API can be used to remove the scheduled pause.
3254
-
3255
- */
3256
-
3257
2447
  customer:Customer;
3258
2448
 
3259
- /**
3260
- * @description If the subscription is in **Active** or **Non Renewing** state and is also scheduled to pause at the end_of_term/specific_date, this API can be used to remove the scheduled pause.
3261
-
3262
- */
3263
-
3264
2449
  card?:Card;
3265
2450
  }
3266
2451
 
3267
2452
  export interface EditAdvanceInvoiceScheduleResponse {
3268
- /**
3269
- * @description Modifies the [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule) for a subscription.
3270
-
3271
- */
3272
-
3273
2453
  advance_invoice_schedules:AdvanceInvoiceSchedule[];
3274
2454
  }
3275
2455
  export interface EditAdvanceInvoiceScheduleInputParam {
@@ -3365,94 +2545,16 @@ For contract terms in &#x60;active&#x60; state, import is allowed only if the as
3365
2545
  offset?:string;
3366
2546
  }
3367
2547
  export interface PauseResponse {
3368
- /**
3369
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3370
-
3371
-
3372
-
3373
- #### Note:
3374
-
3375
- * Applicable only for **active/non-renewing** subscriptions.
3376
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3377
- * Advance charges, if any, are refunded as credits.
3378
-
3379
- */
3380
-
3381
2548
  subscription:Subscription;
3382
2549
 
3383
- /**
3384
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3385
-
3386
-
3387
-
3388
- #### Note:
3389
-
3390
- * Applicable only for **active/non-renewing** subscriptions.
3391
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3392
- * Advance charges, if any, are refunded as credits.
3393
-
3394
- */
3395
-
3396
2550
  customer:Customer;
3397
2551
 
3398
- /**
3399
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3400
-
3401
-
3402
-
3403
- #### Note:
3404
-
3405
- * Applicable only for **active/non-renewing** subscriptions.
3406
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3407
- * Advance charges, if any, are refunded as credits.
3408
-
3409
- */
3410
-
3411
2552
  card?:Card;
3412
2553
 
3413
- /**
3414
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3415
-
3416
-
3417
-
3418
- #### Note:
3419
-
3420
- * Applicable only for **active/non-renewing** subscriptions.
3421
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3422
- * Advance charges, if any, are refunded as credits.
3423
-
3424
- */
3425
-
3426
2554
  invoice?:Invoice;
3427
2555
 
3428
- /**
3429
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3430
-
3431
-
3432
-
3433
- #### Note:
3434
-
3435
- * Applicable only for **active/non-renewing** subscriptions.
3436
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3437
- * Advance charges, if any, are refunded as credits.
3438
-
3439
- */
3440
-
3441
2556
  unbilled_charges?:UnbilledCharge[];
3442
2557
 
3443
- /**
3444
- * @description Pauses the subscription, changing its &#x60;status&#x60; to &#x60;paused&#x60;. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed.
3445
-
3446
-
3447
-
3448
- #### Note:
3449
-
3450
- * Applicable only for **active/non-renewing** subscriptions.
3451
- * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date.
3452
- * Advance charges, if any, are refunded as credits.
3453
-
3454
- */
3455
-
3456
2558
  credit_notes?:CreditNote[];
3457
2559
  }
3458
2560
  export interface PauseInputParam {