chargebee 2.41.0 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +11 -15
  2. package/LICENSE +1 -1
  3. package/README.md +90 -170
  4. package/cjs/RequestWrapper.js +84 -0
  5. package/cjs/asyncApiSupport.js +39 -0
  6. package/cjs/chargebee.cjs.js +13 -0
  7. package/cjs/chargebee.cjs.worker.js +9 -0
  8. package/cjs/chargebeeError.js +17 -0
  9. package/cjs/coreCommon.js +72 -0
  10. package/cjs/createChargebee.js +92 -0
  11. package/cjs/environment.js +18 -0
  12. package/cjs/filter.js +1 -0
  13. package/cjs/net/ClientInterface.js +40 -0
  14. package/cjs/net/FetchClient.js +86 -0
  15. package/cjs/net/NodeClient.js +61 -0
  16. package/cjs/package.json +1 -0
  17. package/cjs/resources/api_endpoints.js +1086 -0
  18. package/cjs/util.js +218 -0
  19. package/esm/RequestWrapper.js +80 -0
  20. package/esm/asyncApiSupport.js +35 -0
  21. package/esm/chargebee.esm.js +9 -0
  22. package/esm/chargebee.esm.worker.js +5 -0
  23. package/esm/chargebeeError.js +13 -0
  24. package/esm/coreCommon.js +67 -0
  25. package/esm/createChargebee.js +88 -0
  26. package/esm/environment.js +15 -0
  27. package/esm/filter.js +1 -0
  28. package/esm/net/ClientInterface.js +35 -0
  29. package/esm/net/FetchClient.js +81 -0
  30. package/esm/net/NodeClient.js +56 -0
  31. package/esm/package.json +1 -0
  32. package/esm/resources/api_endpoints.js +1083 -0
  33. package/esm/util.js +202 -0
  34. package/package.json +69 -38
  35. package/types/core.d.ts +558 -89
  36. package/types/index.d.ts +90 -55
  37. package/types/resources/Address.d.ts +57 -272
  38. package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
  39. package/types/resources/AttachedItem.d.ts +91 -329
  40. package/types/resources/Attribute.d.ts +5 -5
  41. package/types/resources/BusinessEntity.d.ts +49 -69
  42. package/types/resources/BusinessEntityTransfer.d.ts +11 -17
  43. package/types/resources/Card.d.ts +146 -424
  44. package/types/resources/Comment.d.ts +72 -189
  45. package/types/resources/Contact.d.ts +12 -64
  46. package/types/resources/ContractTerm.d.ts +15 -96
  47. package/types/resources/Coupon.d.ts +282 -758
  48. package/types/resources/CouponCode.d.ts +56 -52
  49. package/types/resources/CouponSet.d.ts +92 -234
  50. package/types/resources/CreditNote.d.ts +588 -1758
  51. package/types/resources/CreditNoteEstimate.d.ts +131 -157
  52. package/types/resources/Currency.d.ts +75 -62
  53. package/types/resources/Customer.d.ts +892 -835
  54. package/types/resources/CustomerEntitlement.d.ts +24 -35
  55. package/types/resources/DifferentialPrice.d.ts +116 -314
  56. package/types/resources/Discount.d.ts +20 -125
  57. package/types/resources/Download.d.ts +6 -22
  58. package/types/resources/Entitlement.d.ts +51 -160
  59. package/types/resources/EntitlementOverride.d.ts +58 -139
  60. package/types/resources/Estimate.d.ts +1178 -527
  61. package/types/resources/Event.d.ts +67 -178
  62. package/types/resources/Export.d.ts +563 -723
  63. package/types/resources/Feature.d.ts +117 -433
  64. package/types/resources/GatewayErrorDetail.d.ts +16 -72
  65. package/types/resources/Gift.d.ts +265 -432
  66. package/types/resources/Hierarchy.d.ts +8 -36
  67. package/types/resources/HostedPage.d.ts +1017 -1153
  68. package/types/resources/ImpactedItem.d.ts +13 -50
  69. package/types/resources/ImpactedItemPrice.d.ts +13 -15
  70. package/types/resources/ImpactedSubscription.d.ts +13 -45
  71. package/types/resources/InAppSubscription.d.ts +93 -389
  72. package/types/resources/Installment.d.ts +35 -110
  73. package/types/resources/InstallmentConfig.d.ts +54 -155
  74. package/types/resources/InstallmentDetail.d.ts +19 -27
  75. package/types/resources/Invoice.d.ts +1574 -3157
  76. package/types/resources/InvoiceEstimate.d.ts +131 -161
  77. package/types/resources/Item.d.ts +133 -611
  78. package/types/resources/ItemEntitlement.d.ts +78 -215
  79. package/types/resources/ItemFamily.d.ts +69 -178
  80. package/types/resources/ItemPrice.d.ts +291 -1203
  81. package/types/resources/Metadata.d.ts +3 -5
  82. package/types/resources/Order.d.ts +538 -1471
  83. package/types/resources/PaymentIntent.d.ts +163 -347
  84. package/types/resources/PaymentReferenceNumber.d.ts +7 -29
  85. package/types/resources/PaymentSource.d.ts +476 -1272
  86. package/types/resources/PaymentVoucher.d.ts +87 -306
  87. package/types/resources/PortalSession.d.ts +71 -207
  88. package/types/resources/PriceVariant.d.ts +91 -279
  89. package/types/resources/PricingPageSession.d.ts +92 -41
  90. package/types/resources/PromotionalCredit.d.ts +90 -346
  91. package/types/resources/Purchase.d.ts +185 -315
  92. package/types/resources/Quote.d.ts +1406 -887
  93. package/types/resources/QuoteLineGroup.d.ts +125 -452
  94. package/types/resources/QuotedCharge.d.ts +45 -274
  95. package/types/resources/QuotedSubscription.d.ts +100 -488
  96. package/types/resources/Ramp.d.ts +230 -747
  97. package/types/resources/ResourceMigration.d.ts +25 -80
  98. package/types/resources/SiteMigrationDetail.d.ts +34 -112
  99. package/types/resources/Subscription.d.ts +2390 -4336
  100. package/types/resources/SubscriptionEntitlement.d.ts +59 -160
  101. package/types/resources/SubscriptionEstimate.d.ts +51 -75
  102. package/types/resources/TaxWithheld.d.ts +15 -40
  103. package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
  104. package/types/resources/TimeMachine.d.ts +43 -97
  105. package/types/resources/Token.d.ts +15 -85
  106. package/types/resources/Transaction.d.ts +276 -911
  107. package/types/resources/UnbilledCharge.d.ts +189 -164
  108. package/types/resources/Usage.d.ts +89 -279
  109. package/types/resources/VirtualBankAccount.d.ts +103 -255
  110. package/types/resources/filter.d.ts +52 -0
  111. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
  112. package/.github/ISSUE_TEMPLATE/config.yml +0 -6
  113. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
  114. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  115. package/lib/chargebee.js +0 -512
  116. package/lib/resources/api_endpoints.js +0 -2935
  117. package/types/resources/NonSubscription.d.ts +0 -30
  118. package/types/resources/Session.d.ts +0 -41
@@ -1,1248 +1,1112 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
2
4
  declare module 'chargebee' {
3
5
  export interface HostedPage {
4
-
5
- /**
6
- * @description Unique identifier generated for each hosted page requested.
7
-
8
- */
9
-
10
- id?:string;
11
-
12
- /**
13
- * @description Type of the requested hosted page. \* collect_now - Collect Unpaid Invoices for a Customer \* checkout_gift - Checkout a gift subscription \* checkout_new - Checkout new Subscription \* extend_subscription - To extend a Subscription period \* checkout_one_time - Checkout one time \* update_payment_method - Update Payment Method for a Customer \* view_voucher - View Details of a voucher \* pre_cancel - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \* manage_payment_sources - Manage Payments for a customer \* checkout_existing - Checkout existing Subscription \* claim_gift - Claim a gift subscription
14
-
15
- */
16
-
17
- type?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel';
18
-
19
- /**
20
- * @description Unique URL for the hosted page that will be included in your website.
21
-
22
- */
23
-
24
- url?:string;
25
-
26
- /**
27
- * @description Indicating the current state of the hosted page resource. \* acknowledged - Indicates the succeeded hosted page is acknowledged. \* created - Indicates the hosted page is just created. \* requested - Indicates the hosted page is requested by the website \* cancelled - Indicates the page is cancelled by the end user after requesting it. \* succeeded - Indicates the hosted page is successfully submitted by the user and response is sent to the return url.
28
-
29
- */
30
-
31
- state?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded';
32
-
33
- /**
34
- * @description You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
35
-
36
- */
37
-
38
- pass_thru_content?:string;
39
-
40
- /**
41
- * @description Indicates when this hosted page url is generated.
42
-
43
- */
44
-
45
- created_at?:number;
46
-
47
- /**
48
- * @description Indicates when this hosted page url will expire. After this, the hosted page cannot be accessed.
49
-
50
- */
51
-
52
- expires_at?:number;
53
-
54
- /**
55
- * @description This attribute will be returned only during retrieve hosted page API call and also the retrieved hosted page resource state should be either in &quot;succeeded&quot; or &quot;cancelled&quot; state.
56
- If hosted page state is &quot;succeeded&quot;, then the subscription, customer, card \&amp; invoice(optional) resources during checkout can be obtained.
57
- If hosted page is state is &quot;cancelled&quot;, then it will be empty i.e no information about checkout.
58
-
59
- */
60
-
61
- content:object;
62
-
63
- /**
64
- * @description Timestamp indicating when this hosted page was last updated.
65
-
66
- */
67
-
68
- updated_at?:number;
69
-
70
- /**
71
- * @description The version number of this resource. For every change made to the resource, &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds.
72
-
73
- */
74
-
75
- resource_version?:number;
76
-
77
- /**
78
- * @description Customer Info (email, first name and last name) given in the checkout page used for tracking abandoned carts.
79
- [Learn more](https://www.chargebee.com/docs/abandoned-carts.html)
80
-
81
- */
82
-
83
- checkout_info?:object;
84
-
85
- /**
86
- * @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) of this &#x60;hosted_page&#x60;.
87
-
88
- */
89
-
90
- business_entity_id?:string;
6
+ id?: string;
7
+ type?:
8
+ | 'checkout_new'
9
+ | 'checkout_existing'
10
+ | 'update_payment_method'
11
+ | 'manage_payment_sources'
12
+ | 'collect_now'
13
+ | 'extend_subscription'
14
+ | 'checkout_one_time'
15
+ | 'pre_cancel'
16
+ | 'view_voucher'
17
+ | 'checkout_gift'
18
+ | 'claim_gift';
19
+ url?: string;
20
+ state?:
21
+ | 'created'
22
+ | 'requested'
23
+ | 'succeeded'
24
+ | 'cancelled'
25
+ | 'acknowledged';
26
+ failure_reason?: 'card_error' | 'server_error';
27
+ pass_thru_content?: string;
28
+ embed: boolean;
29
+ created_at?: number;
30
+ expires_at?: number;
31
+ updated_at?: number;
32
+ resource_version?: number;
33
+ checkout_info?: any;
34
+ business_entity_id?: string;
91
35
  }
92
- export namespace HostedPage {
93
- export class HostedPageResource {
94
- /**
95
- * @description Create a Chargebee hosted page to accept payment details from a customer and checkout [charge-items](./items?prod_cat_ver&#x3D;2) and [one-time charges](./invoices?prod_cat_ver&#x3D;2#create_invoice_for_items_and_one-time_charges).
96
-
97
- The following steps describe how best to use this API:
98
-
99
- 1. Call this endpoint, providing [item prices](./item_prices?prod_cat_ver&#x3D;2), [charges](./items?prod_cat_ver&#x3D;2), [coupons](./coupons?prod_cat_ver&#x3D;2) and a host of other details such as billing and shipping addresses of the customer, to be prefilled on the checkout page.
100
- 2. Send the customer to the Checkout &#x60;url&#x60; received in the response.
101
- 3. Once they complete checkout, the set of charge-items and one-time charges are automatically invoiced against the respective &#x60;customer&#x60; record in Chargebee, and they are redirected to the &#x60;redirect_url&#x60; with the &#x60;id&#x60; and &#x60;state&#x60; attributes passed as query string parameters.
102
- 4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver&#x3D;2#retrieve_a_hosted_page) at this stage to get the invoice details.
103
-
104
- #### Customer resource lookup and creation {#customer_lookup1}
105
-
106
- When [customer[id]](/docs/api/hosted_pages#checkout_charge_items_and_one_time_charges_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the hosted_page is created for it. If not found, a new customer resource is created with the ID provided, and the hosted_page is created.
107
-
108
- ##### Multiple business entities
109
-
110
- If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context) , and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
111
-
112
- */
113
-
114
- checkout_one_time_for_items(input?:CheckoutOneTimeForItemsInputParam):ChargebeeRequest<CheckoutOneTimeForItemsResponse>;
115
-
116
- /**
117
- * @description Create a Chargebee hosted page to accept payment details from a customer and checkout a new subscription.
118
-
119
- The following steps describe how best to use this API:
120
-
121
- 1. Call this endpoint, providing [item prices](./item_prices?prod_cat_ver&#x3D;2), [coupons](./coupons?prod_cat_ver&#x3D;2) and a host of other details such as billing and shipping addresses to be prefilled for the customer on the checkout page.
122
- 2. Send the customer to the Checkout &#x60;url&#x60; received in the response.
123
- 3. Once they complete checkout, a new subscription is automatically created and the customer is redirected to the &#x60;redirect_url&#x60; with the &#x60;id&#x60; and &#x60;state&#x60; attributes passed as query string parameters.
124
- Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons. Chargebee recommends listening to appropriate webhooks such as [subscription_created](./events#subscription_created) or [invoice_generated](./events#invoice_generated) to verify a successful checkout.
125
- 4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver&#x3D;2#retrieve_a_hosted_page) at this stage to get the subscription and invoice details.
126
-
127
-
128
-
129
- #### Customer resource lookup and creation {#customer_lookup2}
130
-
131
- When the [customer[id]](/docs/api/hosted_pages#create_checkout_for_a_new_subscription_customer_id) parameter is provided and if a customer resource with the ID is found to be already created in Chargebee, the subscription is created under that customer resource. If not found, then a new customer resource is created with the ID provided and the subscription is created under it.
132
-
133
- ##### Multiple business entities
134
-
135
- If multiple [business entities](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
136
-
137
- */
138
-
139
- checkout_new_for_items(input?:CheckoutNewForItemsInputParam):ChargebeeRequest<CheckoutNewForItemsResponse>;
140
-
141
- /**
142
- * @description Create a Chargebee hosted page to accept payment details from a customer and checkout to update the subscription.
143
-
144
- The following steps describe how best to use this API:
145
-
146
- 1. Provide [item prices](./item_prices?prod_cat_ver&#x3D;2), [coupons](./coupons?prod_cat_ver&#x3D;2) and a host of other details such as billing and shipping addresses to be prefilled for the customer on the checkout page.
147
- 2. Send the customer to the Checkout &#x60;url&#x60; received in the response. They can now add a payment method or use an existing one, to complete the checkout.
148
- 3. The subscription is updated and the customer is redirected to the &#x60;redirect_url&#x60; with the &#x60;id&#x60; and &#x60;state&#x60; attributes passed as query string parameters.
149
- Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons. Chargebee recommends listening to appropriate webhooks such as [subscription_created](./events#subscription_created) or [invoice_generated](./events#invoice_generated) to verify a successful checkout.
150
- 4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver&#x3D;2#retrieve_a_hosted_page) at this stage to get the subscription and invoice details.
151
-
152
36
 
37
+ export namespace HostedPage {
38
+ export class HostedPageResource {
39
+ checkoutNew(
40
+ input: CheckoutNewInputParam,
41
+ headers?: ChargebeeRequestHeader,
42
+ ): Promise<ChargebeeResponse<CheckoutNewResponse>>;
43
+
44
+ checkoutOneTime(
45
+ input?: CheckoutOneTimeInputParam,
46
+ headers?: ChargebeeRequestHeader,
47
+ ): Promise<ChargebeeResponse<CheckoutOneTimeResponse>>;
48
+
49
+ checkoutOneTimeForItems(
50
+ input: CheckoutOneTimeForItemsInputParam,
51
+ headers?: ChargebeeRequestHeader,
52
+ ): Promise<ChargebeeResponse<CheckoutOneTimeForItemsResponse>>;
53
+
54
+ checkoutNewForItems(
55
+ input: CheckoutNewForItemsInputParam,
56
+ headers?: ChargebeeRequestHeader,
57
+ ): Promise<ChargebeeResponse<CheckoutNewForItemsResponse>>;
58
+
59
+ checkoutExisting(
60
+ input: CheckoutExistingInputParam,
61
+ headers?: ChargebeeRequestHeader,
62
+ ): Promise<ChargebeeResponse<CheckoutExistingResponse>>;
63
+
64
+ checkoutExistingForItems(
65
+ input: CheckoutExistingForItemsInputParam,
66
+ headers?: ChargebeeRequestHeader,
67
+ ): Promise<ChargebeeResponse<CheckoutExistingForItemsResponse>>;
68
+
69
+ updateCard(
70
+ input: UpdateCardInputParam,
71
+ headers?: ChargebeeRequestHeader,
72
+ ): Promise<ChargebeeResponse<UpdateCardResponse>>;
73
+
74
+ updatePaymentMethod(
75
+ input: UpdatePaymentMethodInputParam,
76
+ headers?: ChargebeeRequestHeader,
77
+ ): Promise<ChargebeeResponse<UpdatePaymentMethodResponse>>;
78
+
79
+ managePaymentSources(
80
+ input: ManagePaymentSourcesInputParam,
81
+ headers?: ChargebeeRequestHeader,
82
+ ): Promise<ChargebeeResponse<ManagePaymentSourcesResponse>>;
83
+
84
+ collectNow(
85
+ input: CollectNowInputParam,
86
+ headers?: ChargebeeRequestHeader,
87
+ ): Promise<ChargebeeResponse<CollectNowResponse>>;
88
+
89
+ acceptQuote(
90
+ input: AcceptQuoteInputParam,
91
+ headers?: ChargebeeRequestHeader,
92
+ ): Promise<ChargebeeResponse<AcceptQuoteResponse>>;
93
+
94
+ extendSubscription(
95
+ input: ExtendSubscriptionInputParam,
96
+ headers?: ChargebeeRequestHeader,
97
+ ): Promise<ChargebeeResponse<ExtendSubscriptionResponse>>;
98
+
99
+ checkoutGift(
100
+ input: CheckoutGiftInputParam,
101
+ headers?: ChargebeeRequestHeader,
102
+ ): Promise<ChargebeeResponse<CheckoutGiftResponse>>;
103
+
104
+ checkoutGiftForItems(
105
+ input?: CheckoutGiftForItemsInputParam,
106
+ headers?: ChargebeeRequestHeader,
107
+ ): Promise<ChargebeeResponse<CheckoutGiftForItemsResponse>>;
108
+
109
+ claimGift(
110
+ input: ClaimGiftInputParam,
111
+ headers?: ChargebeeRequestHeader,
112
+ ): Promise<ChargebeeResponse<ClaimGiftResponse>>;
113
+
114
+ retrieveAgreementPdf(
115
+ input: RetrieveAgreementPdfInputParam,
116
+ headers?: ChargebeeRequestHeader,
117
+ ): Promise<ChargebeeResponse<RetrieveAgreementPdfResponse>>;
118
+
119
+ acknowledge(
120
+ hosted_page_id: string,
121
+ headers?: ChargebeeRequestHeader,
122
+ ): Promise<ChargebeeResponse<AcknowledgeResponse>>;
123
+
124
+ retrieve(
125
+ hosted_page_id: string,
126
+ headers?: ChargebeeRequestHeader,
127
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
128
+
129
+ list(
130
+ input?: ListInputParam,
131
+ headers?: ChargebeeRequestHeader,
132
+ ): Promise<ChargebeeResponse<ListResponse>>;
133
+
134
+ preCancel(
135
+ input: PreCancelInputParam,
136
+ headers?: ChargebeeRequestHeader,
137
+ ): Promise<ChargebeeResponse<PreCancelResponse>>;
138
+
139
+ events(
140
+ input: EventsInputParam,
141
+ headers?: ChargebeeRequestHeader,
142
+ ): Promise<ChargebeeResponse<EventsResponse>>;
143
+
144
+ viewVoucher(
145
+ input: ViewVoucherInputParam,
146
+ headers?: ChargebeeRequestHeader,
147
+ ): Promise<ChargebeeResponse<ViewVoucherResponse>>;
148
+ }
153
149
 
150
+ export interface CheckoutNewResponse {
151
+ hosted_page: HostedPage;
152
+ }
154
153
 
155
- */
156
-
157
- checkout_existing_for_items(input?:CheckoutExistingForItemsInputParam):ChargebeeRequest<CheckoutExistingForItemsResponse>;
158
-
159
- /**
160
- * @description **Note:** If you&#x27;re using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html), use [Manage Payment Sources API](/docs/api/hosted_pages#manage_payment_sources) to request your customers to update their payment method details or change their payment method.
161
-
162
- Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.
163
-
164
- When this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.
165
-
166
- Depending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.
167
- **Note:**
168
-
169
- * If the card\[gateway\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\[gateway\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.
170
- * The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed&#x3D;true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed&#x3D;true, the returned hosted page URL will show only Card Payment as a payment method.
171
-
172
- */
173
-
174
- update_payment_method(input?:UpdatePaymentMethodInputParam):ChargebeeRequest<UpdatePaymentMethodResponse>;
175
-
176
- /**
177
- * @description This API generates a hosted page URL to add new or update existing payment sources for the customer.
178
-
179
- */
180
-
181
- manage_payment_sources(input?:ManagePaymentSourcesInputParam):ChargebeeRequest<ManagePaymentSourcesResponse>;
182
-
183
- /**
184
- * @description This API generates a hosted page URL to collect due payments for the customer.
185
-
186
- */
187
-
188
- collect_now(input?:CollectNowInputParam):ChargebeeRequest<CollectNowResponse>;
189
-
190
- /**
191
- * @description This API generates a hosted page URL for the customer to accept a quote. If the hosted page URL has expired, a new URL will be generated automatically.
192
-
193
- */
194
-
195
- accept_quote(input?:AcceptQuoteInputParam):ChargebeeRequest<AcceptQuoteResponse>;
196
-
197
- /**
198
- * @description This API generates a hosted page URL to extend the billing cycle of a subscription.
199
-
200
- */
201
-
202
- extend_subscription(input?:ExtendSubscriptionInputParam):ChargebeeRequest<ExtendSubscriptionResponse>;
203
-
204
- /**
205
- * @description Creates a hosted page for a customer (called the gifter) to gift a subscription to another customer (called the receiver).
206
-
207
- #### Gifter customer resource lookup and creation {#gifter_lookup}
154
+ export interface CheckoutOneTimeResponse {
155
+ hosted_page: HostedPage;
156
+ }
208
157
 
209
- When [gifter[customer_id]](/docs/api/hosted_pages#checkout_gift_subscription_for_items_gifter_customer_id) is provided, it is looked up in Chargebee when the gifter completes the hosted page checkout. If not found, a new customer resource is created with this ID.
158
+ export interface CheckoutOneTimeForItemsResponse {
159
+ hosted_page: HostedPage;
160
+ }
210
161
 
211
- ##### Multiple business entities
162
+ export interface CheckoutNewForItemsResponse {
163
+ hosted_page: HostedPage;
164
+ }
212
165
 
213
- If multiple [business entities](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) are created for the site, the lookup and creation of the gifter customer resource happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity specified in this API call. If no business entity is [specified](/docs/api/advanced-features#mbe-header-main), the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
166
+ export interface CheckoutExistingResponse {
167
+ hosted_page: HostedPage;
168
+ }
214
169
 
215
- #### Gift receiver customer resource lookup and creation {#receiver_lookup}
170
+ export interface CheckoutExistingForItemsResponse {
171
+ hosted_page: HostedPage;
172
+ }
216
173
 
217
- Once the gifter checks out using the hosted page returned by this endpoint, Chargebee checks if a customer resource with the receiver&#x27;s email address exists. The first such customer record is considered the receiver&#x27;s customer resource. A new customer resource is created for the receiver if none are found.
174
+ export interface UpdateCardResponse {
175
+ hosted_page: HostedPage;
176
+ }
218
177
 
219
- ##### Multiple business entities
178
+ export interface UpdatePaymentMethodResponse {
179
+ hosted_page: HostedPage;
180
+ }
220
181
 
221
- If multiple [business entities](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) are created for the site, the lookup and creation of the gift receiver&#x27;s customer resource happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity of the gifter
182
+ export interface ManagePaymentSourcesResponse {
183
+ hosted_page: HostedPage;
184
+ }
222
185
 
223
- */
224
-
225
- checkout_gift_for_items(input?:CheckoutGiftForItemsInputParam):ChargebeeRequest<CheckoutGiftForItemsResponse>;
226
-
227
- /**
228
- * @description This API generates a hosted page URL to claim a gifted subscription.
186
+ export interface CollectNowResponse {
187
+ hosted_page: HostedPage;
188
+ }
229
189
 
230
- */
231
-
232
- claim_gift(input?:ClaimGiftInputParam):ChargebeeRequest<ClaimGiftResponse>;
233
-
234
- /**
235
- * @description This is applicable only for Direct Debit via SEPA, Bacs, Bg Autogiro, BECS (for both Australia and New Zealand) and PAD. For Direct Debit, the customer needs to accept an agreement that allows the merchant to debit their bank account. This agreement PDF allows you to easily display scheme-rules compliant Direct Debit mandates to your customers.
190
+ export interface AcceptQuoteResponse {
191
+ hosted_page: HostedPage;
192
+ }
236
193
 
237
- This API retrieves the redirect link to the corresponding agreement for customers. The agreement PDF can be your &quot;Thank You&quot; page or sent by email to customers. Communicating this PDF to your customers is mandatory.
194
+ export interface ExtendSubscriptionResponse {
195
+ hosted_page: HostedPage;
196
+ }
238
197
 
239
- Customer locale is used to generate the PDF in the required language. If a customer language is not supported, the PDF is generated in English. Checkout the [list of languages](https://developer.gocardless.com/api-reference/#mandate-pdfs-create-a-mandate-pdf) supported by GoCardless.
198
+ export interface CheckoutGiftResponse {
199
+ hosted_page: HostedPage;
200
+ }
240
201
 
241
- */
242
-
243
- retrieve_agreement_pdf(input:RetrieveAgreementPdfInputParam):ChargebeeRequest<RetrieveAgreementPdfResponse>;
244
-
245
- /**
246
- * @description When a hosted page is successfully completed by the user and processed by Chargebee, its [&#x60;state&#x60;](hosted_pages#hosted_page_state) is automatically changed to &#x60;succeeded&#x60;. Acknowledging a hosted page confirms that you have moved the customer details from Chargebee into your system and are ready to fulfill it. This API is used to acknowledge the hosted page in &#x60;succeeded&#x60; state and change its state to &#x60;acknowledged&#x60;.
202
+ export interface CheckoutGiftForItemsResponse {
203
+ hosted_page: HostedPage;
204
+ }
247
205
 
248
- **Note:** The hosted page status must be succeeded for this API call to be allowed.
206
+ export interface ClaimGiftResponse {
207
+ hosted_page: HostedPage;
208
+ }
249
209
 
250
- */
251
-
252
- acknowledge(hosted_page_id:string):ChargebeeRequest<AcknowledgeResponse>;
253
-
254
- /**
255
- * @description When you retrieve a hosted page whose &#x60;status&#x60; is &#x60;successful&#x60;, the &#x60;content&#x60; attribute has the following objects based on the &#x60;type&#x60; of the hosted page.
210
+ export interface RetrieveAgreementPdfResponse {
211
+ hosted_page: HostedPage;
212
+ }
256
213
 
257
- |---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
258
- | **&#x60;type&#x60; of hosted page** | **&#x60;content&#x60; attribute constituents** |
259
- | &#x60;checkout_new&#x60; | * &#x60;customer&#x60;: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) for whom the subscription was created. * &#x60;subscription&#x60;: the new Subscription object created. * &#x60;card&#x60;: the [Card](/docs/api/cards#card_attributes) object if the [payment method](/docs/api/customers#customer_payment_method) &#x60;type&#x60; used was &#x60;card&#x60;. * &#x60;invoice&#x60;: the Invoice object, if an invoice was generated. |
260
- | &#x60;checkout_existing&#x60; | * &#x60;customer&#x60;: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) whose subscription was changed. * &#x60;subscription&#x60;: the updated Subscription object created. * &#x60;card&#x60;: the [Card](/docs/api/cards#card_attributes) object if the [payment method](/docs/api/customers#customer_payment_method) &#x60;type&#x60; used was &#x60;card&#x60;. * &#x60;invoice&#x60;: the Invoice object, if an invoice was generated for the subscription change. |
261
- | &#x60;update_payment_method&#x60; | * &#x60;customer&#x60;: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) whose subscription was changed. * &#x60;card&#x60;: the [Card](/docs/api/cards#card_attributes) object if the new [payment method](/docs/api/customers#customer_payment_method) added was of &#x60;type&#x60; &#x60;card&#x60;. |
262
- | &#x60;pre_cancel&#x60; | &#x60;retention&#x60;: Use the &#x60;bypass&#x60; flag in this object to route the cancellation flow to the merchants&#x27; portal or the Chargebee Retention. * If &#x60;bypass&#x60; flag is &#x60;true&#x60;, you should route the end-customers to your native cancellation flow. * If the &#x60;bypass&#x60; flag is &#x60;false&#x60;, you should route the end-customers to the hosted page URL. **Note:** Retention is currently in &#x60;beta&#x60;. To enable Retention, [Contact Support.](https://support.chargebee.com/support/home) |
263
- | &#x60;collect_now&#x60; | * &#x60;transactions&#x60;: this object should contain a list of [transactions](/docs/api/transactions#transaction_attributes) triggered from the &#x60;collect_now&#x60; hosted page. Each transaction in the list should be represented as an array that includes relevant information about the transaction, such as transaction ID, customer ID, amount, currency, payment method, and any other relevant details. * &#x60;customer&#x60;: this object should contain the customer record associated with the transaction. The key, &#x60;customer_id&#x60; is used to link the transaction to the corresponding customer record. |
214
+ export interface AcknowledgeResponse {
215
+ hosted_page: HostedPage;
216
+ }
264
217
 
218
+ export interface RetrieveResponse {
219
+ hosted_page: HostedPage;
220
+ }
265
221
 
266
- */
267
-
268
- retrieve(hosted_page_id:string):ChargebeeRequest<RetrieveResponse>;
269
-
270
- /**
271
- * @description This API retrieves the list of hosted page resources.
222
+ export interface ListResponse {
223
+ list: { hosted_page: HostedPage }[];
224
+ next_offset?: string;
225
+ }
272
226
 
273
- */
274
-
275
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
276
-
277
- /**
278
- * @description Creates a &#x60;hosted_page&#x60; resource of &#x60;type&#x60; &#x60;pre_cancel&#x60;. Route canceling users to this page to provide them a retention experience and start saving revenue.
279
- The hosted page is created in accordance with the retention experience [configured in the Chargebee Retention app](https://help.brightback.com/article/239-steps-to-get-brightback-ready-to-launch-for-chargebee-billing-merchants), along with the data provided as input to this endpoint. Call the endpoint before your customer clicks the **Cancel** button, and when they do, route them to the [url](https://apidocs.chargebee.com/docs/api/hosted_pages#hosted_page_url) in the endpoint response.
227
+ export interface PreCancelResponse {
228
+ hosted_page: HostedPage;
229
+ }
280
230
 
281
- */
282
-
283
- pre_cancel(input?:PreCancelInputParam):ChargebeeRequest<PreCancelResponse>;
284
-
285
- /**
286
- * @description Use this API to notify Chargebee about important events that occur on your web pages, such as subscription cancellations. An event contains data about affected resources and additional details such as when the change occurred.
231
+ export interface EventsResponse {
232
+ success: boolean;
233
+ }
287
234
 
288
- */
289
-
290
- events(input:EventsInputParam):ChargebeeRequest<EventsResponse>;
291
-
292
- /**
293
- * @description Creates a &#x60;hosted_page&#x60; resource of type, &#x60;view_voucher&#x60;. When your end customers choose the Boleto payment method, you can generate a voucher for their pending invoice. Using this API, you can create a voucher_detail hosted page for your customers and email them a link to this hosted page. Your customers can review the voucher details on the page by clicking the link in the email.
235
+ export interface ViewVoucherResponse {
236
+ hosted_page: HostedPage;
237
+ }
294
238
 
295
- */
296
-
297
- view_voucher(input?:ViewVoucherInputParam):ChargebeeRequest<ViewVoucherResponse>;
239
+ // REQUEST PARAMS
240
+ //---------------
241
+
242
+ export interface CheckoutNewInputParam {
243
+ billing_cycles?: number;
244
+ mandatory_addons_to_remove?: string[];
245
+ terms_to_charge?: number;
246
+ billing_alignment_mode?: BillingAlignmentMode;
247
+ coupon_ids?: string[];
248
+ redirect_url?: string;
249
+ cancel_url?: string;
250
+ pass_thru_content?: string;
251
+ embed?: boolean;
252
+ iframe_messaging?: boolean;
253
+ allow_offline_payment_methods?: boolean;
254
+ subscription?: SubscriptionCheckoutNewInputParam;
255
+ customer?: CustomerCheckoutNewInputParam;
256
+ card?: CardCheckoutNewInputParam;
257
+ billing_address?: BillingAddressCheckoutNewInputParam;
258
+ shipping_address?: ShippingAddressCheckoutNewInputParam;
259
+ contract_term?: ContractTermCheckoutNewInputParam;
260
+ addons?: AddonsCheckoutNewInputParam[];
261
+ event_based_addons?: EventBasedAddonsCheckoutNewInputParam[];
298
262
  }
299
- export interface CheckoutOneTimeForItemsResponse {
300
- hosted_page:HostedPage;
263
+ export interface CheckoutOneTimeInputParam {
264
+ currency_code?: string;
265
+ invoice_note?: string /**
266
+ * @deprecated Please refer API docs to use other attributes
267
+ */;
268
+
269
+ coupon?: string;
270
+ coupon_ids?: string[];
271
+ redirect_url?: string;
272
+ cancel_url?: string;
273
+ pass_thru_content?: string;
274
+ embed?: boolean;
275
+ iframe_messaging?: boolean;
276
+ customer?: CustomerCheckoutOneTimeInputParam;
277
+ invoice?: InvoiceCheckoutOneTimeInputParam;
278
+ card?: CardCheckoutOneTimeInputParam;
279
+ billing_address?: BillingAddressCheckoutOneTimeInputParam;
280
+ shipping_address?: ShippingAddressCheckoutOneTimeInputParam;
281
+ addons?: AddonsCheckoutOneTimeInputParam[];
282
+ charges?: ChargesCheckoutOneTimeInputParam[];
301
283
  }
302
284
  export interface CheckoutOneTimeForItemsInputParam {
303
-
304
- /**
305
- * @description Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
306
- **Note**
307
-
308
- An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe-header-main).
309
- **See also**
310
-
311
- [Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup1)
312
-
313
- */
314
-
315
- business_entity_id?:string;
316
-
317
- /**
318
- * @description Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \&amp; Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version
319
-
320
- */
321
-
322
- layout?:Layout;
323
-
324
- /**
325
- * @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.
326
-
327
- */
328
-
329
- invoice_note?:string;
330
-
331
- /**
332
- * @description List of Coupons to be added.
333
-
334
- */
335
-
336
- coupon_ids?:string[];
337
-
338
- /**
339
- * @description The currency code (ISO 4217 format) of the invoice amount.
340
-
341
- */
342
-
343
- currency_code?:string;
344
-
345
- /**
346
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
347
-
348
- **Note** :
349
-
350
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
351
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
352
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
353
- * This parameter is not applicable for iframe messaging.
354
-
355
- */
356
-
357
- redirect_url?:string;
358
-
359
- /**
360
- * @description The customers will be redirected to this URL upon canceling checkout. The hosted page id and state will be passed as parameters to this URL.
361
-
362
- **Note** :
363
-
364
- * Cancel URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this cancel URL.
365
- *Eg : http://yoursite.com?id&#x3D;\&lt;hosted_page_id\&gt;\&amp;state&#x3D;cancelled*
366
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
367
-
368
- */
369
-
370
- cancel_url?:string;
371
-
372
- /**
373
- * @description You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
374
-
375
- */
376
-
377
- pass_thru_content?:string;
378
-
379
- /**
380
- * @description Parameters for customer
381
-
382
- */
383
-
384
- customer?:object;
385
-
386
- /**
387
- * @description Parameters for invoice
388
-
389
- */
390
-
391
- invoice?:{po_number?:string};
392
-
393
- /**
394
- * @description Parameters for card
395
-
396
- */
397
-
398
- card?:{gateway_account_id?:string};
399
-
400
- /**
401
- * @description Parameters for billing_address
402
-
403
- */
404
-
405
- billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
406
-
407
- /**
408
- * @description Parameters for shipping_address
409
-
410
- */
411
-
412
- 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};
413
-
414
- /**
415
- * @description Parameters for item_prices
416
-
417
- */
418
-
419
- 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}[];
420
-
421
- /**
422
- * @description Parameters for item_tiers
423
-
424
- */
425
-
426
- 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}[];
427
-
428
- /**
429
- * @description Parameters for charges
430
-
431
- */
432
-
433
- 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}[];
434
-
435
- /**
436
- * @description Parameters for discounts
437
-
438
- */
439
-
440
- discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
441
-
442
- /**
443
- * @description Parameters for entity_identifiers
444
-
445
- */
446
-
447
- entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
448
-
449
- change_option?:ChangeOption;
450
-
451
- changes_scheduled_at?:number;
452
- }
453
- export interface CheckoutNewForItemsResponse {
454
- hosted_page:HostedPage;
285
+ business_entity_id?: string;
286
+ layout?: Layout;
287
+ invoice_note?: string /**
288
+ * @deprecated Please refer API docs to use other attributes
289
+ */;
290
+
291
+ coupon?: string;
292
+ coupon_ids?: string[];
293
+ currency_code?: string;
294
+ redirect_url?: string;
295
+ cancel_url?: string;
296
+ pass_thru_content?: string;
297
+ customer?: CustomerCheckoutOneTimeForItemsInputParam;
298
+ invoice?: InvoiceCheckoutOneTimeForItemsInputParam;
299
+ card?: CardCheckoutOneTimeForItemsInputParam;
300
+ billing_address?: BillingAddressCheckoutOneTimeForItemsInputParam;
301
+ shipping_address?: ShippingAddressCheckoutOneTimeForItemsInputParam;
302
+ item_prices?: ItemPricesCheckoutOneTimeForItemsInputParam[];
303
+ item_tiers?: ItemTiersCheckoutOneTimeForItemsInputParam[];
304
+ charges?: ChargesCheckoutOneTimeForItemsInputParam[];
305
+ discounts?: DiscountsCheckoutOneTimeForItemsInputParam[];
306
+ entity_identifiers?: EntityIdentifiersCheckoutOneTimeForItemsInputParam[];
455
307
  }
456
308
  export interface CheckoutNewForItemsInputParam {
457
-
458
- /**
459
- * @description Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \&amp; Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version
460
-
461
- */
462
-
463
- layout?:Layout;
464
-
465
- /**
466
- * @description Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
467
- **Note**
468
-
469
- An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe-header-main).
470
- **See also**
471
-
472
- [Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup2)
473
-
474
- */
475
-
476
- business_entity_id?:string;
477
-
478
- /**
479
- * @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.
480
-
481
- */
482
-
483
- billing_cycles?:number;
484
-
485
- /**
486
- * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
487
-
488
- */
489
-
490
- mandatory_items_to_remove?:string[];
491
-
492
- /**
493
- * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
494
-
495
- */
496
-
497
- terms_to_charge?:number;
498
-
499
- /**
500
- * @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.
501
-
502
- */
503
-
504
- billing_alignment_mode?:BillingAlignmentMode;
505
-
506
- /**
507
- * @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).
508
-
509
- */
510
-
511
- coupon_ids?:string[];
512
-
513
- /**
514
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
515
-
516
- **Note** :
517
-
518
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
519
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
520
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
521
- * This parameter is not applicable for iframe messaging.
522
-
523
- */
524
-
525
- redirect_url?:string;
526
-
527
- /**
528
- * @description The customers will be redirected to this URL upon canceling checkout. The hosted page id and state will be passed as parameters to this URL.
529
-
530
- **Note** :
531
-
532
- * Cancel URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this cancel URL.
533
- *Eg : http://yoursite.com?id&#x3D;\&lt;hosted_page_id\&gt;\&amp;state&#x3D;cancelled*
534
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
535
-
536
- */
537
-
538
- cancel_url?:string;
539
-
540
- /**
541
- * @description You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
542
-
543
- */
544
-
545
- pass_thru_content?:string;
546
-
547
- /**
548
- * @description Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.
549
-
550
- */
551
-
552
- allow_offline_payment_methods?:boolean;
553
-
554
- /**
555
- * @description Parameters for subscription
556
-
557
- */
558
-
559
- subscription?:object;
560
-
561
- /**
562
- * @description Parameters for customer
563
-
564
- */
565
-
566
- customer?:object;
567
-
568
- /**
569
- * @description Parameters for card
570
-
571
- */
572
-
573
- card?:{gateway_account_id?:string};
574
-
575
- /**
576
- * @description Parameters for billing_address
577
-
578
- */
579
-
580
- billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
581
-
582
- /**
583
- * @description Parameters for shipping_address
584
-
585
- */
586
-
587
- 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};
588
-
589
- /**
590
- * @description Parameters for contract_term
591
-
592
- */
593
-
594
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
595
-
596
- /**
597
- * @description Parameters for subscription_items
598
-
599
- */
600
-
601
- 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}[];
602
-
603
- /**
604
- * @description Parameters for discounts
605
-
606
- */
607
-
608
- discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
609
-
610
- /**
611
- * @description Parameters for item_tiers
612
-
613
- */
614
-
615
- 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}[];
616
-
617
- /**
618
- * @description Parameters for entity_identifiers
619
-
620
- */
621
-
622
- entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
309
+ layout?: Layout;
310
+ business_entity_id?: string;
311
+ billing_cycles?: number;
312
+ mandatory_items_to_remove?: string[];
313
+ terms_to_charge?: number;
314
+ billing_alignment_mode?: BillingAlignmentMode;
315
+ coupon_ids?: string[];
316
+ redirect_url?: string;
317
+ cancel_url?: string;
318
+ pass_thru_content?: string;
319
+ allow_offline_payment_methods?: boolean;
320
+ subscription?: SubscriptionCheckoutNewForItemsInputParam;
321
+ customer?: CustomerCheckoutNewForItemsInputParam;
322
+ card?: CardCheckoutNewForItemsInputParam;
323
+ billing_address?: BillingAddressCheckoutNewForItemsInputParam;
324
+ shipping_address?: ShippingAddressCheckoutNewForItemsInputParam;
325
+ contract_term?: ContractTermCheckoutNewForItemsInputParam;
326
+ subscription_items?: SubscriptionItemsCheckoutNewForItemsInputParam[];
327
+ discounts?: DiscountsCheckoutNewForItemsInputParam[];
328
+ item_tiers?: ItemTiersCheckoutNewForItemsInputParam[];
329
+ entity_identifiers?: EntityIdentifiersCheckoutNewForItemsInputParam[];
623
330
  }
624
- export interface CheckoutExistingForItemsResponse {
625
- hosted_page:HostedPage;
331
+ export interface CheckoutExistingInputParam {
332
+ replace_addon_list?: boolean;
333
+ mandatory_addons_to_remove?: string[];
334
+ invoice_date?: number;
335
+ billing_cycles?: number;
336
+ terms_to_charge?: number;
337
+ reactivate_from?: number;
338
+ billing_alignment_mode?: BillingAlignmentMode;
339
+ coupon_ids?: string[];
340
+ reactivate?: boolean;
341
+ force_term_reset?: boolean;
342
+ redirect_url?: string;
343
+ cancel_url?: string;
344
+ pass_thru_content?: string;
345
+ embed?: boolean;
346
+ iframe_messaging?: boolean;
347
+ allow_offline_payment_methods?: boolean;
348
+ subscription?: SubscriptionCheckoutExistingInputParam;
349
+ customer?: CustomerCheckoutExistingInputParam;
350
+ card?: CardCheckoutExistingInputParam;
351
+ contract_term?: ContractTermCheckoutExistingInputParam;
352
+ addons?: AddonsCheckoutExistingInputParam[];
353
+ event_based_addons?: EventBasedAddonsCheckoutExistingInputParam[];
626
354
  }
627
355
  export interface CheckoutExistingForItemsInputParam {
628
-
629
- /**
630
- * @description Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \&amp; Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version
631
-
632
- */
633
-
634
- layout?:Layout;
635
-
636
- /**
637
- * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
638
-
639
- */
640
-
641
- mandatory_items_to_remove?:string[];
642
-
643
- /**
644
- * @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.
645
-
646
- */
647
-
648
- replace_items_list?:boolean;
649
-
650
- /**
651
- * @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:
652
-
653
- * &#x60;invoice_date&#x60; must be in the past.
654
- * &#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.
655
- * It is not earlier than &#x60;changes_scheduled_at&#x60;, &#x60;reactivate_from&#x60;, or &#x60;trial_end&#x60;.
656
- * &#x60;invoice_immediately&#x60; is &#x60;true&#x60;.
657
- .
658
-
659
- */
660
-
661
- invoice_date?:number;
662
-
663
- /**
664
- * @description Billing cycles set for plan-item price is used by default.
665
-
666
- */
667
-
668
- billing_cycles?:number;
669
-
670
- /**
671
- * @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.
672
-
673
- */
674
-
675
- terms_to_charge?:number;
676
-
677
- /**
678
- * @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.
679
- **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:
680
-
681
- * Backdating must be enabled for subscription reactivation operations.
682
- * 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.
683
- * The date is on or after the last date/time any of the product catalog items of the subscription were changed.
684
- * 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.
685
- .
686
-
687
- */
688
-
689
- reactivate_from?:number;
690
-
691
- /**
692
- * @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.
693
-
694
- */
695
-
696
- billing_alignment_mode?:BillingAlignmentMode;
697
-
698
- /**
699
- * @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).
700
-
701
- */
702
-
703
- coupon_ids?:string[];
704
-
705
- /**
706
- * @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.
707
-
708
- */
709
-
710
- reactivate?:boolean;
711
-
712
- /**
713
- * @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).
714
- **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.
715
-
716
- */
717
-
718
- force_term_reset?:boolean;
719
-
720
- /**
721
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
722
-
723
- **Note** :
724
-
725
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
726
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
727
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
728
- * This parameter is not applicable for iframe messaging.
729
-
730
- */
731
-
732
- redirect_url?:string;
733
-
734
- /**
735
- * @description The customers will be redirected to this URL upon canceling checkout. The hosted page id and state will be passed as parameters to this URL.
736
-
737
- **Note** :
738
-
739
- * Cancel URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this cancel URL.
740
- *Eg : http://yoursite.com?id&#x3D;\&lt;hosted_page_id\&gt;\&amp;state&#x3D;cancelled*
741
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
742
-
743
- */
744
-
745
- cancel_url?:string;
746
-
747
- /**
748
- * @description You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
749
-
750
- */
751
-
752
- pass_thru_content?:string;
753
-
754
- /**
755
- * @description Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.
756
-
757
- */
758
-
759
- allow_offline_payment_methods?:boolean;
760
-
761
- /**
762
- * @description Parameters for subscription
763
-
764
- */
765
-
766
- subscription?:object;
767
-
768
- /**
769
- * @description Parameters for customer
770
-
771
- */
772
-
773
- customer?:object;
774
-
775
- /**
776
- * @description Parameters for card
777
-
778
- */
779
-
780
- card?:{gateway_account_id?:string};
781
-
782
- /**
783
- * @description Parameters for contract_term
784
-
785
- */
786
-
787
- contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
788
-
789
- /**
790
- * @description Parameters for subscription_items
791
-
792
- */
793
-
794
- 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}[];
795
-
796
- /**
797
- * @description Parameters for discounts
798
-
799
- */
800
-
801
- 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}[];
802
-
803
- /**
804
- * @description Parameters for item_tiers
805
-
806
- */
807
-
808
- 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}[];
809
-
810
- /**
811
- * @description Parameters for entity_identifiers
812
-
813
- */
814
-
815
- entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
356
+ layout?: Layout;
357
+ mandatory_items_to_remove?: string[];
358
+ replace_items_list?: boolean;
359
+ invoice_date?: number;
360
+ billing_cycles?: number;
361
+ terms_to_charge?: number;
362
+ reactivate_from?: number;
363
+ billing_alignment_mode?: BillingAlignmentMode;
364
+ coupon_ids?: string[];
365
+ reactivate?: boolean;
366
+ force_term_reset?: boolean;
367
+ change_option?: ChangeOption;
368
+ changes_scheduled_at?: number;
369
+ redirect_url?: string;
370
+ cancel_url?: string;
371
+ pass_thru_content?: string;
372
+ allow_offline_payment_methods?: boolean;
373
+ subscription?: SubscriptionCheckoutExistingForItemsInputParam;
374
+ customer?: CustomerCheckoutExistingForItemsInputParam;
375
+ card?: CardCheckoutExistingForItemsInputParam;
376
+ contract_term?: ContractTermCheckoutExistingForItemsInputParam;
377
+ subscription_items?: SubscriptionItemsCheckoutExistingForItemsInputParam[];
378
+ discounts?: DiscountsCheckoutExistingForItemsInputParam[];
379
+ item_tiers?: ItemTiersCheckoutExistingForItemsInputParam[];
380
+ entity_identifiers?: EntityIdentifiersCheckoutExistingForItemsInputParam[];
816
381
  }
817
- export interface UpdatePaymentMethodResponse {
818
- hosted_page:HostedPage;
382
+ export interface UpdateCardInputParam {
383
+ redirect_url?: string;
384
+ cancel_url?: string;
385
+ pass_thru_content?: string;
386
+ embed?: boolean;
387
+ iframe_messaging?: boolean;
388
+ customer?: CustomerUpdateCardInputParam;
389
+ card?: CardUpdateCardInputParam;
819
390
  }
820
391
  export interface UpdatePaymentMethodInputParam {
821
-
822
- /**
823
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
824
-
825
- **Note** :
826
-
827
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
828
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
829
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
830
- * This parameter is not applicable for iframe messaging.
831
-
832
- */
833
-
834
- redirect_url?:string;
835
-
836
- /**
837
- * @description The customers will be redirected to this URL upon canceling checkout. The hosted page id and state will be passed as parameters to this URL.
838
-
839
- **Note** :
840
-
841
- * Cancel URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this cancel URL.
842
- *Eg : http://yoursite.com?id&#x3D;\&lt;hosted_page_id\&gt;\&amp;state&#x3D;cancelled*
843
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
844
-
845
- */
846
-
847
- cancel_url?:string;
848
-
849
- /**
850
- * @description You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
851
-
852
- */
853
-
854
- pass_thru_content?:string;
855
-
856
- /**
857
- * @description If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you&#x27;re using iframe_messaging you need to implement onSuccess \&amp; onCancel callbacks.
858
-
859
- **Note** : This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html) checkout.
860
-
861
- */
862
-
863
- iframe_messaging?:boolean;
864
-
865
- /**
866
- * @description Parameters for customer
867
-
868
- */
869
-
870
- customer?:{id:string};
871
-
872
- /**
873
- * @description Parameters for card
874
-
875
- */
876
-
877
- card?:{gateway_account_id?:string};
878
- }
879
- export interface ManagePaymentSourcesResponse {
880
- hosted_page:HostedPage;
392
+ redirect_url?: string;
393
+ cancel_url?: string;
394
+ pass_thru_content?: string;
395
+ embed?: boolean;
396
+ iframe_messaging?: boolean;
397
+ customer?: CustomerUpdatePaymentMethodInputParam;
398
+ card?: CardUpdatePaymentMethodInputParam;
881
399
  }
882
400
  export interface ManagePaymentSourcesInputParam {
883
-
884
- /**
885
- * @description URL to redirect after payment method is added.
886
-
887
- */
888
-
889
- redirect_url?:string;
890
-
891
- /**
892
- * @description Parameters for customer
893
-
894
- */
895
-
896
- customer?:{id:string};
897
-
898
- /**
899
- * @description Parameters for card
900
-
901
- */
902
-
903
- card?:{gateway_account_id?:string};
904
- }
905
- export interface CollectNowResponse {
906
- hosted_page:HostedPage;
401
+ redirect_url?: string;
402
+ customer?: CustomerManagePaymentSourcesInputParam;
403
+ card?: CardManagePaymentSourcesInputParam;
907
404
  }
908
405
  export interface CollectNowInputParam {
909
-
910
- /**
911
- * @description Used to specify the destination URL to which a user is redirected after invoices are paid. The [transaction ID](/docs/api/transactions#transaction_id) of the transactions made through the Pay Now hosted page will be sent as return variables along with the URL.
912
-
913
- */
914
-
915
- redirect_url?:string;
916
-
917
- /**
918
- * @description The currency code (ISO 4217 format) of the specified *credit amount*.
919
-
920
- */
921
-
922
- currency_code?:string;
923
-
924
- /**
925
- * @description Parameters for customer
926
-
927
- */
928
-
929
- customer?:{id:string};
930
-
931
- /**
932
- * @description Parameters for card
933
-
934
- */
935
-
936
- card?:{gateway_account_id?:string};
937
- }
938
- export interface AcceptQuoteResponse {
939
- hosted_page:HostedPage;
406
+ redirect_url?: string;
407
+ currency_code?: string;
408
+ customer?: CustomerCollectNowInputParam;
409
+ card?: CardCollectNowInputParam;
940
410
  }
941
411
  export interface AcceptQuoteInputParam {
942
-
943
- /**
944
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
945
-
946
- **Note** :
947
-
948
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
949
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
950
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
951
- * This parameter is not applicable for iframe messaging.
952
-
953
- */
954
-
955
- redirect_url?:string;
956
-
957
- /**
958
- * @description null
959
-
960
- */
961
-
962
- layout?:Layout;
963
-
964
- /**
965
- * @description Parameters for quote
966
-
967
- */
968
-
969
- quote?:{id:string};
970
- }
971
- export interface ExtendSubscriptionResponse {
972
- hosted_page:HostedPage;
412
+ redirect_url?: string;
413
+ layout?: Layout;
414
+ quote?: QuoteAcceptQuoteInputParam;
973
415
  }
974
416
  export interface ExtendSubscriptionInputParam {
975
-
976
- /**
977
- * @description Expiry (in days) for the link generated. No expiry will be set if this is not specified.
978
-
979
- */
980
-
981
- expiry?:number;
982
-
983
- /**
984
- * @description Number of billing cycles to extend. If not specified, plan&#x27;s billing cycle will be used.
985
-
986
- */
987
-
988
- billing_cycle?:number;
989
-
990
- /**
991
- * @description Parameters for subscription
992
-
993
- */
994
-
995
- subscription?:{id:string};
417
+ expiry?: number;
418
+ billing_cycle?: number;
419
+ subscription?: SubscriptionExtendSubscriptionInputParam;
996
420
  }
997
- export interface CheckoutGiftForItemsResponse {
998
- hosted_page:HostedPage;
421
+ export interface CheckoutGiftInputParam {
422
+ redirect_url?: string;
423
+ coupon_ids?: string[];
424
+ gifter?: GifterCheckoutGiftInputParam;
425
+ subscription?: SubscriptionCheckoutGiftInputParam;
426
+ addons?: AddonsCheckoutGiftInputParam[];
999
427
  }
1000
428
  export interface CheckoutGiftForItemsInputParam {
1001
-
1002
- /**
1003
- * @description Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
1004
- **Note**
1005
-
1006
- An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe-header-main).
1007
- **See also**
1008
-
1009
- Gifter customer resource lookup and creation.
1010
-
1011
- */
1012
-
1013
- business_entity_id?:string;
1014
-
1015
- /**
1016
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
1017
-
1018
- **Note** :
1019
-
1020
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
1021
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
1022
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
1023
- * This parameter is not applicable for iframe messaging.
1024
-
1025
- */
1026
-
1027
- redirect_url?:string;
1028
-
1029
- /**
1030
- * @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).
1031
-
1032
- */
1033
-
1034
- coupon_ids?:string[];
1035
-
1036
- /**
1037
- * @description Parameters for gifter
1038
-
1039
- */
1040
-
1041
- gifter?:{customer_id?:string,locale?:string};
1042
-
1043
- /**
1044
- * @description Parameters for subscription_items
1045
-
1046
- */
1047
-
1048
- subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
1049
- }
1050
- export interface ClaimGiftResponse {
1051
- hosted_page:HostedPage;
429
+ business_entity_id?: string;
430
+ redirect_url?: string;
431
+ coupon_ids?: string[];
432
+ gifter?: GifterCheckoutGiftForItemsInputParam;
433
+ subscription_items?: SubscriptionItemsCheckoutGiftForItemsInputParam[];
1052
434
  }
1053
435
  export interface ClaimGiftInputParam {
1054
-
436
+ redirect_url?: string;
437
+ gift?: GiftClaimGiftInputParam;
438
+ customer?: CustomerClaimGiftInputParam;
439
+ }
440
+ export interface RetrieveAgreementPdfInputParam {
441
+ payment_source_id: string;
442
+ }
443
+ export interface ListInputParam {
444
+ limit?: number;
445
+ offset?: string;
446
+ id?: filter.String;
447
+ type?: filter.Enum;
448
+ state?: filter.Enum;
449
+ updated_at?: filter.Timestamp;
450
+ }
451
+ export interface PreCancelInputParam {
452
+ pass_thru_content?: string;
453
+ cancel_url?: string;
454
+ redirect_url?: string;
455
+ subscription?: SubscriptionPreCancelInputParam;
456
+ }
457
+ export interface EventsInputParam {
458
+ event_name: EventName;
459
+ occurred_at?: number;
460
+ event_data: any;
461
+ }
462
+ export interface ViewVoucherInputParam {
463
+ payment_voucher?: PaymentVoucherViewVoucherInputParam;
464
+ customer?: CustomerViewVoucherInputParam;
465
+ }
466
+ export interface BillingAddressCheckoutNewInputParam {
467
+ first_name?: string;
468
+ last_name?: string;
469
+ email?: string;
470
+ company?: string;
471
+ phone?: string;
472
+ line1?: string;
473
+ line2?: string;
474
+ line3?: string;
475
+ city?: string;
476
+ state_code?: string;
477
+ state?: string;
478
+ zip?: string;
479
+ country?: string;
480
+ validation_status?: ValidationStatus;
481
+ }
482
+ export interface CustomerCheckoutNewInputParam {
483
+ id?: string;
484
+ email?: string;
485
+ first_name?: string;
486
+ last_name?: string;
487
+ company?: string;
488
+ phone?: string;
489
+ locale?: string;
490
+ taxability?: Taxability;
491
+ vat_number?: string;
492
+ vat_number_prefix?: string;
493
+ consolidated_invoicing?: boolean;
494
+ }
495
+ export interface ShippingAddressCheckoutNewInputParam {
496
+ first_name?: string;
497
+ last_name?: string;
498
+ email?: string;
499
+ company?: string;
500
+ phone?: string;
501
+ line1?: string;
502
+ line2?: string;
503
+ line3?: string;
504
+ city?: string;
505
+ state_code?: string;
506
+ state?: string;
507
+ zip?: string;
508
+ country?: string;
509
+ validation_status?: ValidationStatus;
510
+ }
511
+ export interface ContractTermCheckoutNewInputParam {
512
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
513
+ cancellation_cutoff_period?: number;
514
+ }
515
+ export interface SubscriptionCheckoutNewInputParam {
516
+ id?: string;
517
+ plan_id: string;
518
+ plan_quantity?: number;
519
+ plan_quantity_in_decimal?: string;
520
+ plan_unit_price?: number;
521
+ plan_unit_price_in_decimal?: string;
522
+ setup_fee?: number;
523
+ trial_end?: number;
524
+ start_date?: number;
525
+ /**
526
+ * @deprecated Please refer API docs to use other attributes
527
+ */
528
+ coupon?: string;
529
+ auto_collection?: AutoCollection;
530
+ offline_payment_method?: OfflinePaymentMethod;
531
+ invoice_notes?: string;
532
+ affiliate_token?: string;
533
+ contract_term_billing_cycle_on_renewal?: number;
534
+ }
535
+ export interface CardCheckoutNewInputParam {
1055
536
  /**
1056
- * @description The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.
1057
-
1058
- **Note** :
1059
-
1060
- * Although the customer will be redirected to the &#x60;redirect_url&#x60; after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [&#x60;subscription_created&#x60;](https://apidocs.chargebee.com/docs/api/events#subscription_created) or [&#x60;invoice_generated&#x60;](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to verify a successful checkout.
1061
- * Redirect URL configured in Settings \&gt; Hosted Pages Settings would be overriden by this redirect URL.
1062
- * *Eg :* *http://yoursite.com?id&#x3D;* *\&lt;hosted_page_id\&gt;\&amp;state&#x3D;succeeded*
1063
- * This parameter is not applicable for iframe messaging.
537
+ * @deprecated Please refer API docs to use other attributes
538
+ */
539
+ gateway?: Gateway;
540
+ gateway_account_id?: string;
541
+ }
1064
542
 
1065
- */
1066
-
1067
- redirect_url?:string;
1068
-
543
+ export interface EventBasedAddonsCheckoutNewInputParam {
544
+ id?: string;
545
+ quantity?: number;
546
+ unit_price?: number;
547
+ quantity_in_decimal?: string;
548
+ unit_price_in_decimal?: string;
549
+ service_period_in_days?: number;
550
+ on_event?: OnEvent;
551
+ charge_once?: boolean;
552
+ charge_on?: ChargeOn;
553
+ }
554
+ export interface AddonsCheckoutNewInputParam {
555
+ id?: string;
556
+ quantity?: number;
557
+ quantity_in_decimal?: string;
558
+ unit_price?: number;
559
+ unit_price_in_decimal?: string;
560
+ billing_cycles?: number;
561
+ }
562
+ export interface BillingAddressCheckoutOneTimeInputParam {
563
+ first_name?: string;
564
+ last_name?: string;
565
+ email?: string;
566
+ company?: string;
567
+ phone?: string;
568
+ line1?: string;
569
+ line2?: string;
570
+ line3?: string;
571
+ city?: string;
572
+ state_code?: string;
573
+ state?: string;
574
+ zip?: string;
575
+ country?: string;
576
+ validation_status?: ValidationStatus;
577
+ }
578
+ export interface InvoiceCheckoutOneTimeInputParam {
579
+ po_number?: string;
580
+ }
581
+ export interface CustomerCheckoutOneTimeInputParam {
582
+ id?: string;
583
+ email?: string;
584
+ first_name?: string;
585
+ last_name?: string;
586
+ company?: string;
587
+ phone?: string;
588
+ locale?: string;
589
+ taxability?: Taxability;
590
+ vat_number?: string;
591
+ vat_number_prefix?: string;
592
+ consolidated_invoicing?: boolean;
593
+ }
594
+ export interface ShippingAddressCheckoutOneTimeInputParam {
595
+ first_name?: string;
596
+ last_name?: string;
597
+ email?: string;
598
+ company?: string;
599
+ phone?: string;
600
+ line1?: string;
601
+ line2?: string;
602
+ line3?: string;
603
+ city?: string;
604
+ state_code?: string;
605
+ state?: string;
606
+ zip?: string;
607
+ country?: string;
608
+ validation_status?: ValidationStatus;
609
+ }
610
+ export interface CardCheckoutOneTimeInputParam {
1069
611
  /**
1070
- * @description Parameters for gift
612
+ * @deprecated Please refer API docs to use other attributes
613
+ */
614
+ gateway?: Gateway;
615
+ gateway_account_id?: string;
616
+ }
1071
617
 
1072
- */
1073
-
1074
- gift?:{id:string};
1075
-
618
+ export interface ChargesCheckoutOneTimeInputParam {
619
+ amount?: number;
620
+ amount_in_decimal?: string;
621
+ description?: string;
622
+ taxable?: boolean;
623
+ tax_profile_id?: string;
624
+ avalara_tax_code?: string;
625
+ hsn_code?: string;
626
+ taxjar_product_code?: string;
627
+ avalara_sale_type?: AvalaraSaleType;
628
+ avalara_transaction_type?: number;
629
+ avalara_service_type?: number;
630
+ date_from?: number;
631
+ date_to?: number;
632
+ }
633
+ export interface AddonsCheckoutOneTimeInputParam {
634
+ id?: string;
635
+ quantity?: number;
636
+ unit_price?: number;
637
+ quantity_in_decimal?: string;
638
+ unit_price_in_decimal?: string;
639
+ date_from?: number;
640
+ date_to?: number;
641
+ }
642
+ export interface BillingAddressCheckoutOneTimeForItemsInputParam {
643
+ first_name?: string;
644
+ last_name?: string;
645
+ email?: string;
646
+ company?: string;
647
+ phone?: string;
648
+ line1?: string;
649
+ line2?: string;
650
+ line3?: string;
651
+ city?: string;
652
+ state_code?: string;
653
+ state?: string;
654
+ zip?: string;
655
+ country?: string;
656
+ validation_status?: ValidationStatus;
657
+ }
658
+ export interface InvoiceCheckoutOneTimeForItemsInputParam {
659
+ po_number?: string;
660
+ }
661
+ export interface CustomerCheckoutOneTimeForItemsInputParam {
662
+ id?: string;
663
+ email?: string;
664
+ first_name?: string;
665
+ last_name?: string;
666
+ company?: string;
667
+ phone?: string;
668
+ locale?: string;
669
+ taxability?: Taxability;
670
+ vat_number?: string;
671
+ vat_number_prefix?: string;
672
+ einvoicing_method?: EinvoicingMethod;
673
+ is_einvoice_enabled?: boolean;
674
+ entity_identifier_scheme?: string;
675
+ entity_identifier_standard?: string;
676
+ consolidated_invoicing?: boolean;
677
+ }
678
+ export interface ShippingAddressCheckoutOneTimeForItemsInputParam {
679
+ first_name?: string;
680
+ last_name?: string;
681
+ email?: string;
682
+ company?: string;
683
+ phone?: string;
684
+ line1?: string;
685
+ line2?: string;
686
+ line3?: string;
687
+ city?: string;
688
+ state_code?: string;
689
+ state?: string;
690
+ zip?: string;
691
+ country?: string;
692
+ validation_status?: ValidationStatus;
693
+ }
694
+ export interface CardCheckoutOneTimeForItemsInputParam {
1076
695
  /**
1077
- * @description Parameters for customer
696
+ * @deprecated Please refer API docs to use other attributes
697
+ */
698
+ gateway?: Gateway;
699
+ gateway_account_id?: string;
700
+ }
1078
701
 
1079
- */
1080
-
1081
- customer?:{locale?:string};
702
+ export interface ChargesCheckoutOneTimeForItemsInputParam {
703
+ amount?: number;
704
+ amount_in_decimal?: string;
705
+ description?: string;
706
+ taxable?: boolean;
707
+ tax_profile_id?: string;
708
+ avalara_tax_code?: string;
709
+ hsn_code?: string;
710
+ taxjar_product_code?: string;
711
+ avalara_sale_type?: AvalaraSaleType;
712
+ avalara_transaction_type?: number;
713
+ avalara_service_type?: number;
714
+ date_from?: number;
715
+ date_to?: number;
1082
716
  }
1083
- export interface RetrieveAgreementPdfResponse {
1084
- hosted_page:HostedPage;
717
+ export interface DiscountsCheckoutOneTimeForItemsInputParam {
718
+ percentage?: number;
719
+ amount?: number;
720
+ apply_on: ApplyOn;
721
+ item_price_id?: string;
1085
722
  }
1086
- export interface RetrieveAgreementPdfInputParam {
1087
-
723
+ export interface EntityIdentifiersCheckoutOneTimeForItemsInputParam {
724
+ id?: string;
725
+ scheme?: string;
726
+ value?: string;
727
+ operation?: Operation;
728
+ standard?: string;
729
+ }
730
+ export interface ItemTiersCheckoutOneTimeForItemsInputParam {
731
+ item_price_id?: string;
732
+ starting_unit?: number;
733
+ ending_unit?: number;
734
+ price?: number;
735
+ starting_unit_in_decimal?: string;
736
+ ending_unit_in_decimal?: string;
737
+ price_in_decimal?: string;
738
+ }
739
+ export interface ItemPricesCheckoutOneTimeForItemsInputParam {
740
+ item_price_id?: string;
741
+ quantity?: number;
742
+ quantity_in_decimal?: string;
743
+ unit_price?: number;
744
+ unit_price_in_decimal?: string;
745
+ date_from?: number;
746
+ date_to?: number;
747
+ }
748
+ export interface BillingAddressCheckoutNewForItemsInputParam {
749
+ first_name?: string;
750
+ last_name?: string;
751
+ email?: string;
752
+ company?: string;
753
+ phone?: string;
754
+ line1?: string;
755
+ line2?: string;
756
+ line3?: string;
757
+ city?: string;
758
+ state_code?: string;
759
+ state?: string;
760
+ zip?: string;
761
+ country?: string;
762
+ validation_status?: ValidationStatus;
763
+ }
764
+ export interface CustomerCheckoutNewForItemsInputParam {
765
+ id?: string;
766
+ email?: string;
767
+ first_name?: string;
768
+ last_name?: string;
769
+ company?: string;
770
+ phone?: string;
771
+ locale?: string;
772
+ taxability?: Taxability;
773
+ vat_number?: string;
774
+ vat_number_prefix?: string;
775
+ is_einvoice_enabled?: boolean;
776
+ entity_identifier_scheme?: string;
777
+ entity_identifier_standard?: string;
778
+ einvoicing_method?: EinvoicingMethod;
779
+ }
780
+ export interface ShippingAddressCheckoutNewForItemsInputParam {
781
+ first_name?: string;
782
+ last_name?: string;
783
+ email?: string;
784
+ company?: string;
785
+ phone?: string;
786
+ line1?: string;
787
+ line2?: string;
788
+ line3?: string;
789
+ city?: string;
790
+ state_code?: string;
791
+ state?: string;
792
+ zip?: string;
793
+ country?: string;
794
+ validation_status?: ValidationStatus;
795
+ }
796
+ export interface ContractTermCheckoutNewForItemsInputParam {
797
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
798
+ cancellation_cutoff_period?: number;
799
+ }
800
+ export interface SubscriptionCheckoutNewForItemsInputParam {
801
+ id?: string;
802
+ trial_end?: number;
803
+ /**
804
+ * @deprecated Please refer API docs to use other attributes
805
+ */
806
+ setup_fee?: number;
807
+ start_date?: number;
808
+ coupon?: string;
809
+ auto_collection?: AutoCollection;
810
+ invoice_notes?: string;
811
+ contract_term_billing_cycle_on_renewal?: number;
812
+ }
813
+ export interface CardCheckoutNewForItemsInputParam {
1088
814
  /**
1089
- * @description Payment source to be used for this payment.
815
+ * @deprecated Please refer API docs to use other attributes
816
+ */
817
+ gateway?: Gateway;
818
+ gateway_account_id?: string;
819
+ }
1090
820
 
1091
- */
1092
-
1093
- payment_source_id:string;
821
+ export interface SubscriptionItemsCheckoutNewForItemsInputParam {
822
+ item_price_id: string;
823
+ quantity?: number;
824
+ quantity_in_decimal?: string;
825
+ unit_price?: number;
826
+ unit_price_in_decimal?: string;
827
+ billing_cycles?: number;
828
+ trial_end?: number;
829
+ service_period_days?: number;
830
+ charge_on_event?: ChargeOnEvent;
831
+ charge_once?: boolean;
832
+ /**
833
+ * @deprecated Please refer API docs to use other attributes
834
+ */
835
+ item_type?: ItemType;
836
+ charge_on_option?: ChargeOnOption;
837
+ }
838
+ export interface DiscountsCheckoutNewForItemsInputParam {
839
+ apply_on: ApplyOn;
840
+ duration_type: DurationType;
841
+ percentage?: number;
842
+ amount?: number;
843
+ period?: number;
844
+ period_unit?: PeriodUnit;
845
+ included_in_mrr?: boolean;
846
+ item_price_id?: string;
847
+ }
848
+ export interface EntityIdentifiersCheckoutNewForItemsInputParam {
849
+ id?: string;
850
+ scheme?: string;
851
+ value?: string;
852
+ operation?: Operation;
853
+ standard?: string;
1094
854
  }
1095
- export interface AcknowledgeResponse {
1096
- hosted_page:HostedPage;
855
+ export interface ItemTiersCheckoutNewForItemsInputParam {
856
+ item_price_id?: string;
857
+ starting_unit?: number;
858
+ ending_unit?: number;
859
+ price?: number;
860
+ starting_unit_in_decimal?: string;
861
+ ending_unit_in_decimal?: string;
862
+ price_in_decimal?: string;
1097
863
  }
1098
-
1099
- export interface RetrieveResponse {
1100
- hosted_page:HostedPage;
864
+ export interface CustomerCheckoutExistingInputParam {
865
+ vat_number?: string;
866
+ vat_number_prefix?: string;
1101
867
  }
1102
-
1103
- export interface ListResponse {
868
+ export interface ContractTermCheckoutExistingInputParam {
869
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
870
+ cancellation_cutoff_period?: number;
871
+ }
872
+ export interface SubscriptionCheckoutExistingInputParam {
873
+ id: string;
874
+ plan_id?: string;
875
+ plan_quantity?: number;
876
+ plan_unit_price?: number;
877
+ setup_fee?: number;
878
+ plan_quantity_in_decimal?: string;
879
+ plan_unit_price_in_decimal?: string;
880
+ start_date?: number;
881
+ trial_end?: number;
882
+ /**
883
+ * @deprecated Please refer API docs to use other attributes
884
+ */
885
+ coupon?: string;
886
+ auto_collection?: AutoCollection;
887
+ offline_payment_method?: OfflinePaymentMethod;
888
+ invoice_notes?: string;
889
+ contract_term_billing_cycle_on_renewal?: number;
890
+ }
891
+ export interface CardCheckoutExistingInputParam {
1104
892
  /**
1105
- * @description This API retrieves the list of hosted page resources.
893
+ * @deprecated Please refer API docs to use other attributes
894
+ */
895
+ gateway?: Gateway;
896
+ gateway_account_id?: string;
897
+ }
1106
898
 
1107
- */
1108
-
1109
- list:{hosted_page:HostedPage}[];
1110
-
899
+ export interface EventBasedAddonsCheckoutExistingInputParam {
900
+ id?: string;
901
+ quantity?: number;
902
+ unit_price?: number;
903
+ service_period_in_days?: number;
904
+ charge_on?: ChargeOn;
905
+ on_event?: OnEvent;
906
+ charge_once?: boolean;
907
+ quantity_in_decimal?: string;
908
+ unit_price_in_decimal?: string;
909
+ }
910
+ export interface AddonsCheckoutExistingInputParam {
911
+ id?: string;
912
+ quantity?: number;
913
+ unit_price?: number;
914
+ billing_cycles?: number;
915
+ quantity_in_decimal?: string;
916
+ unit_price_in_decimal?: string;
917
+ }
918
+ export interface CustomerCheckoutExistingForItemsInputParam {
919
+ vat_number?: string;
920
+ vat_number_prefix?: string;
921
+ is_einvoice_enabled?: boolean;
922
+ entity_identifier_scheme?: string;
923
+ entity_identifier_standard?: string;
924
+ }
925
+ export interface ContractTermCheckoutExistingForItemsInputParam {
926
+ action_at_term_end?: 'renew' | 'evergreen' | 'cancel';
927
+ cancellation_cutoff_period?: number;
928
+ }
929
+ export interface SubscriptionCheckoutExistingForItemsInputParam {
930
+ id: string;
931
+ /**
932
+ * @deprecated Please refer API docs to use other attributes
933
+ */
934
+ setup_fee?: number;
935
+ start_date?: number;
936
+ trial_end?: number;
937
+ /**
938
+ * @deprecated Please refer API docs to use other attributes
939
+ */
940
+ coupon?: string;
941
+ auto_collection?: AutoCollection;
942
+ offline_payment_method?: OfflinePaymentMethod;
943
+ invoice_notes?: string;
944
+ contract_term_billing_cycle_on_renewal?: number;
945
+ }
946
+ export interface CardCheckoutExistingForItemsInputParam {
1111
947
  /**
1112
- * @description This API retrieves the list of hosted page resources.
948
+ * @deprecated Please refer API docs to use other attributes
949
+ */
950
+ gateway?: Gateway;
951
+ gateway_account_id?: string;
952
+ }
1113
953
 
1114
- */
1115
-
1116
- next_offset?:string;
954
+ export interface SubscriptionItemsCheckoutExistingForItemsInputParam {
955
+ item_price_id: string;
956
+ quantity?: number;
957
+ quantity_in_decimal?: string;
958
+ unit_price?: number;
959
+ unit_price_in_decimal?: string;
960
+ billing_cycles?: number;
961
+ trial_end?: number;
962
+ service_period_days?: number;
963
+ charge_on_event?: ChargeOnEvent;
964
+ charge_once?: boolean;
965
+ charge_on_option?: ChargeOnOption;
966
+ /**
967
+ * @deprecated Please refer API docs to use other attributes
968
+ */
969
+ item_type?: ItemType;
1117
970
  }
1118
- export interface ListInputParam {
1119
- [key : string]: any;
971
+ export interface DiscountsCheckoutExistingForItemsInputParam {
972
+ apply_on: ApplyOn;
973
+ duration_type: DurationType;
974
+ percentage?: number;
975
+ amount?: number;
976
+ period?: number;
977
+ period_unit?: PeriodUnit;
978
+ included_in_mrr?: boolean;
979
+ item_price_id?: string;
980
+ operation_type: OperationType;
981
+ id?: string;
982
+ }
983
+ export interface EntityIdentifiersCheckoutExistingForItemsInputParam {
984
+ id?: string;
985
+ scheme?: string;
986
+ value?: string;
987
+ operation?: Operation;
988
+ standard?: string;
989
+ }
990
+ export interface ItemTiersCheckoutExistingForItemsInputParam {
991
+ item_price_id?: string;
992
+ starting_unit?: number;
993
+ ending_unit?: number;
994
+ price?: number;
995
+ starting_unit_in_decimal?: string;
996
+ ending_unit_in_decimal?: string;
997
+ price_in_decimal?: string;
998
+ }
999
+ export interface CustomerUpdateCardInputParam {
1000
+ id: string;
1120
1001
  /**
1121
- * @description This API retrieves the list of hosted page resources.
1122
-
1123
- */
1124
-
1125
- limit?:number;
1126
-
1002
+ * @deprecated Please refer API docs to use other attributes
1003
+ */
1004
+ vat_number?: string;
1127
1005
  /**
1128
- * @description This API retrieves the list of hosted page resources.
1129
-
1130
- */
1131
-
1132
- offset?:string;
1133
-
1006
+ * @deprecated Please refer API docs to use other attributes
1007
+ */
1008
+ vat_number_prefix?: string;
1009
+ }
1010
+ export interface CardUpdateCardInputParam {
1134
1011
  /**
1135
- * @description This API retrieves the list of hosted page resources.
1012
+ * @deprecated Please refer API docs to use other attributes
1013
+ */
1014
+ gateway?: Gateway;
1015
+ gateway_account_id?: string;
1016
+ }
1136
1017
 
1137
- */
1138
-
1139
- id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
1140
-
1018
+ export interface CustomerUpdatePaymentMethodInputParam {
1019
+ id: string;
1141
1020
  /**
1142
- * @description This API retrieves the list of hosted page resources.
1143
-
1144
- */
1145
-
1146
- type?:{in?:string,is?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel',is_not?:'update_payment_method' | 'checkout_one_time' | 'manage_payment_sources' | 'checkout_new' | 'view_voucher' | 'collect_now' | 'checkout_existing' | 'extend_subscription' | 'pre_cancel',not_in?:string};
1147
-
1021
+ * @deprecated Please refer API docs to use other attributes
1022
+ */
1023
+ vat_number?: string;
1148
1024
  /**
1149
- * @description This API retrieves the list of hosted page resources.
1150
-
1151
- */
1152
-
1153
- state?:{in?:string,is?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded',is_not?:'requested' | 'acknowledged' | 'created' | 'cancelled' | 'succeeded',not_in?:string};
1154
-
1025
+ * @deprecated Please refer API docs to use other attributes
1026
+ */
1027
+ vat_number_prefix?: string;
1028
+ }
1029
+ export interface CardUpdatePaymentMethodInputParam {
1155
1030
  /**
1156
- * @description This API retrieves the list of hosted page resources.
1157
-
1158
- */
1159
-
1160
- updated_at?:{after?:string,before?:string,between?:string,on?:string};
1031
+ * @deprecated Please refer API docs to use other attributes
1032
+ */
1033
+ gateway?: Gateway;
1034
+ gateway_account_id?: string;
1161
1035
  }
1162
- export interface PreCancelResponse {
1163
- hosted_page:HostedPage;
1036
+
1037
+ export interface CustomerManagePaymentSourcesInputParam {
1038
+ id: string;
1164
1039
  }
1165
- export interface PreCancelInputParam {
1166
-
1040
+ export interface CardManagePaymentSourcesInputParam {
1167
1041
  /**
1168
- * @description Additional data to be passed to Chargebee Retention. Only the value of &#x60;pass_thru_content.custom&#x60; is sent to Chargebee Retention. It is sent as the value of the [&#x60;custom&#x60; property](https://help.brightback.com/article/43-installing-brightback). The fields provided in &#x60;pass_thru_content.custom&#x60; must be preconfigured in Chargebee Retention.
1169
-
1170
- Although only &#x60;pass_thru_content.custom&#x60; is sent to Chargebee Retention, all of &#x60;pass_thru_content&#x60; is stored by Chargebee billing and is retrievable as an [attribute](/docs/api/hosted_pages#hosted_page_pass_thru_content) of the &#x60;hosted_page&#x60;.
1171
- .
1042
+ * @deprecated Please refer API docs to use other attributes
1043
+ */
1044
+ gateway?: Gateway;
1045
+ gateway_account_id?: string;
1046
+ }
1172
1047
 
1173
- */
1174
-
1175
- pass_thru_content?:string;
1176
-
1048
+ export interface CustomerCollectNowInputParam {
1049
+ id: string;
1050
+ }
1051
+ export interface CardCollectNowInputParam {
1177
1052
  /**
1178
- * @description The customer is sent to this URL if they finally decide to cancel the subscription, despite the attempt to retain them.
1053
+ * @deprecated Please refer API docs to use other attributes
1054
+ */
1055
+ gateway?: Gateway;
1056
+ gateway_account_id?: string;
1057
+ }
1179
1058
 
1180
- */
1181
-
1182
- cancel_url?:string;
1183
-
1184
- /**
1185
- * @description The customer is sent to this URL upon successful retention. In other words, this is the page to which the customer is sent when they decide **not** to cancel the subscription.
1059
+ export interface QuoteAcceptQuoteInputParam {
1060
+ id: string;
1061
+ }
1186
1062
 
1187
- */
1188
-
1189
- redirect_url?:string;
1190
-
1191
- /**
1192
- * @description Parameters for subscription
1063
+ export interface SubscriptionExtendSubscriptionInputParam {
1064
+ id: string;
1065
+ }
1193
1066
 
1194
- */
1195
-
1196
- subscription?:{id:string};
1067
+ export interface GifterCheckoutGiftInputParam {
1068
+ customer_id?: string;
1197
1069
  }
1198
- export interface EventsResponse {
1199
- success:boolean;
1070
+ export interface SubscriptionCheckoutGiftInputParam {
1071
+ plan_id: string;
1072
+ plan_quantity?: number;
1073
+ plan_quantity_in_decimal?: string;
1074
+ /**
1075
+ * @deprecated Please refer API docs to use other attributes
1076
+ */
1077
+ coupon?: string;
1200
1078
  }
1201
- export interface EventsInputParam {
1202
-
1203
- /**
1204
- * @description The event that need to passed to a different system. \* cancellation_page_loaded - Indicates native cancellation flow provided by the merchant is loaded rather than the retention flow.
1205
-
1206
- */
1207
-
1208
- event_name:EventName;
1209
-
1210
- /**
1211
- * @description Timestamp indicating when this event had occurred. .
1212
-
1213
- */
1214
-
1215
- occurred_at?:number;
1216
-
1217
- /**
1218
- * @description The meta data description of the event in key-value pair. The value is a JSON object with the following keys and their values.
1219
1079
 
1220
- * &#x60;subscription_id&#x60;: A unique and immutable identifier for the subscription.
1221
- .
1080
+ export interface AddonsCheckoutGiftInputParam {
1081
+ id?: string;
1082
+ quantity?: number;
1083
+ quantity_in_decimal?: string;
1084
+ }
1085
+ export interface GifterCheckoutGiftForItemsInputParam {
1086
+ customer_id?: string;
1087
+ }
1222
1088
 
1223
- */
1224
-
1225
- event_data:object;
1089
+ export interface SubscriptionItemsCheckoutGiftForItemsInputParam {
1090
+ item_price_id?: string;
1091
+ quantity?: number;
1092
+ quantity_in_decimal?: string;
1226
1093
  }
1227
- export interface ViewVoucherResponse {
1228
- hosted_page:HostedPage;
1094
+ export interface GiftClaimGiftInputParam {
1095
+ id: string;
1096
+ }
1097
+ export interface CustomerClaimGiftInputParam {
1098
+ locale?: string;
1229
1099
  }
1230
- export interface ViewVoucherInputParam {
1231
-
1232
- /**
1233
- * @description Parameters for payment_voucher
1234
1100
 
1235
- */
1236
-
1237
- payment_voucher?:{id:string};
1238
-
1239
- /**
1240
- * @description Parameters for customer
1101
+ export interface SubscriptionPreCancelInputParam {
1102
+ id: string;
1103
+ }
1241
1104
 
1242
- */
1243
-
1244
- customer?:{locale?:string};
1105
+ export interface CustomerViewVoucherInputParam {
1106
+ locale?: string;
1107
+ }
1108
+ export interface PaymentVoucherViewVoucherInputParam {
1109
+ id: string;
1245
1110
  }
1246
-
1247
1111
  }
1248
- }
1112
+ }