chargebee 2.27.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +69 -2
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -7
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +652 -363
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +23 -23
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
|
@@ -104,11 +104,11 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
104
104
|
export namespace AttachedItem {
|
|
105
105
|
export class AttachedItemResource {
|
|
106
106
|
/**
|
|
107
|
-
* @description
|
|
107
|
+
* @description Creates an attached addon or a charge item for a plan.
|
|
108
108
|
|
|
109
109
|
*/
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
create(item_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* @description Updates an attached addon or a charge item for a plan.
|
|
@@ -118,18 +118,11 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
118
118
|
update(attached_item_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* @description
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @description Creates an attached addon or a charge item for a plan.
|
|
121
|
+
* @description Retrieves details of an attached addon or a charge item.
|
|
129
122
|
|
|
130
123
|
*/
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
retrieve(attached_item_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
|
|
133
126
|
|
|
134
127
|
/**
|
|
135
128
|
* @description Deletes an attached addon or a charge item.
|
|
@@ -137,30 +130,25 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
137
130
|
*/
|
|
138
131
|
|
|
139
132
|
delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
140
|
-
}
|
|
141
|
-
export interface RetrieveResponse {
|
|
142
|
-
attached_item:AttachedItem;
|
|
143
|
-
}
|
|
144
|
-
export interface RetrieveInputParam {
|
|
145
133
|
|
|
146
134
|
/**
|
|
147
|
-
* @description
|
|
135
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
148
136
|
|
|
149
137
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
138
|
+
|
|
139
|
+
list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
152
140
|
}
|
|
153
|
-
export interface
|
|
141
|
+
export interface CreateResponse {
|
|
154
142
|
attached_item:AttachedItem;
|
|
155
143
|
}
|
|
156
|
-
export interface
|
|
144
|
+
export interface CreateInputParam {
|
|
157
145
|
|
|
158
146
|
/**
|
|
159
|
-
* @description The id of the
|
|
147
|
+
* @description The id of the addon or charge that is being attached to the plan-item.
|
|
160
148
|
|
|
161
149
|
*/
|
|
162
150
|
|
|
163
|
-
|
|
151
|
+
item_id:string;
|
|
164
152
|
|
|
165
153
|
/**
|
|
166
154
|
* @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API.
|
|
@@ -206,146 +194,158 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
206
194
|
|
|
207
195
|
charge_once?:boolean;
|
|
208
196
|
}
|
|
209
|
-
export interface
|
|
197
|
+
export interface UpdateResponse {
|
|
198
|
+
attached_item:AttachedItem;
|
|
199
|
+
}
|
|
200
|
+
export interface UpdateInputParam {
|
|
201
|
+
|
|
210
202
|
/**
|
|
211
|
-
* @description
|
|
203
|
+
* @description The id of the parent item in the attachment relationship.
|
|
212
204
|
|
|
213
205
|
*/
|
|
214
206
|
|
|
215
|
-
|
|
207
|
+
parent_item_id:string;
|
|
216
208
|
|
|
217
209
|
/**
|
|
218
|
-
* @description
|
|
210
|
+
* @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API.
|
|
219
211
|
|
|
220
212
|
*/
|
|
221
213
|
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
export interface ListInputParam {
|
|
225
|
-
[key : string]: any;
|
|
226
|
-
/**
|
|
227
|
-
* @description The number of resources to be returned.
|
|
228
|
-
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
limit?:number;
|
|
214
|
+
type?:'optional' | 'mandatory' | 'recommended';
|
|
232
215
|
|
|
233
216
|
/**
|
|
234
|
-
* @description
|
|
217
|
+
* @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
|
|
235
218
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
offset?:string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @description Filter attached items based on their id.
|
|
219
|
+
The value set explicitly for `billing_cycles` while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver=2).
|
|
242
220
|
|
|
243
221
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
222
|
+
|
|
223
|
+
billing_cycles?:number;
|
|
246
224
|
|
|
247
225
|
/**
|
|
248
|
-
* @description
|
|
226
|
+
* @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver=2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver=2#update_subscription_for_items) the subscription.
|
|
249
227
|
|
|
250
228
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
229
|
+
|
|
230
|
+
quantity?:number;
|
|
253
231
|
|
|
254
232
|
/**
|
|
255
|
-
* @description
|
|
233
|
+
* @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
256
234
|
|
|
257
235
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
236
|
+
|
|
237
|
+
quantity_in_decimal?:string;
|
|
260
238
|
|
|
261
239
|
/**
|
|
262
|
-
* @description
|
|
240
|
+
* @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions.
|
|
263
241
|
|
|
264
242
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
243
|
+
|
|
244
|
+
charge_on_event?:ChargeOnEvent;
|
|
267
245
|
|
|
268
246
|
/**
|
|
269
|
-
* @description Indicates
|
|
247
|
+
* @description Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items.
|
|
270
248
|
|
|
271
249
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
250
|
+
|
|
251
|
+
charge_once?:boolean;
|
|
252
|
+
}
|
|
253
|
+
export interface RetrieveResponse {
|
|
254
|
+
attached_item:AttachedItem;
|
|
255
|
+
}
|
|
256
|
+
export interface RetrieveInputParam {
|
|
274
257
|
|
|
275
258
|
/**
|
|
276
|
-
* @description
|
|
259
|
+
* @description Retrieves details of an attached addon or a charge item.
|
|
277
260
|
|
|
278
261
|
*/
|
|
279
262
|
|
|
280
|
-
|
|
263
|
+
parent_item_id:string;
|
|
281
264
|
}
|
|
282
|
-
export interface
|
|
265
|
+
export interface DeleteResponse {
|
|
283
266
|
attached_item:AttachedItem;
|
|
284
267
|
}
|
|
285
|
-
export interface
|
|
268
|
+
export interface DeleteInputParam {
|
|
286
269
|
|
|
287
270
|
/**
|
|
288
271
|
* @description The id of the addon or charge that is being attached to the plan-item.
|
|
289
272
|
|
|
290
273
|
*/
|
|
291
274
|
|
|
292
|
-
|
|
293
|
-
|
|
275
|
+
parent_item_id:string;
|
|
276
|
+
}
|
|
277
|
+
export interface ListResponse {
|
|
294
278
|
/**
|
|
295
|
-
* @description
|
|
279
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
296
280
|
|
|
297
281
|
*/
|
|
298
282
|
|
|
299
|
-
|
|
283
|
+
list:{attached_item:AttachedItem}[];
|
|
300
284
|
|
|
301
285
|
/**
|
|
302
|
-
* @description
|
|
303
|
-
|
|
304
|
-
The value set explicitly for `billing_cycles` while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver=2).
|
|
286
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
305
287
|
|
|
306
288
|
*/
|
|
307
289
|
|
|
308
|
-
|
|
309
|
-
|
|
290
|
+
next_offset?:string;
|
|
291
|
+
}
|
|
292
|
+
export interface ListInputParam {
|
|
293
|
+
[key : string]: any;
|
|
310
294
|
/**
|
|
311
|
-
* @description
|
|
295
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
312
296
|
|
|
313
297
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
298
|
+
|
|
299
|
+
limit?:number;
|
|
316
300
|
|
|
317
301
|
/**
|
|
318
|
-
* @description
|
|
302
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
319
303
|
|
|
320
304
|
*/
|
|
321
|
-
|
|
322
|
-
|
|
305
|
+
|
|
306
|
+
offset?:string;
|
|
323
307
|
|
|
324
308
|
/**
|
|
325
|
-
* @description
|
|
309
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
326
310
|
|
|
327
311
|
*/
|
|
312
|
+
|
|
313
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
328
314
|
|
|
329
|
-
|
|
315
|
+
/**
|
|
316
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
317
|
+
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
330
321
|
|
|
331
322
|
/**
|
|
332
|
-
* @description
|
|
323
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
333
324
|
|
|
334
325
|
*/
|
|
326
|
+
|
|
327
|
+
type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string};
|
|
335
328
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
329
|
+
/**
|
|
330
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
331
|
+
|
|
332
|
+
*/
|
|
333
|
+
|
|
334
|
+
item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
|
|
342
335
|
|
|
343
336
|
/**
|
|
344
|
-
* @description
|
|
337
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
345
338
|
|
|
346
339
|
*/
|
|
340
|
+
|
|
341
|
+
charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',is_not?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',not_in?:string};
|
|
347
342
|
|
|
348
|
-
|
|
343
|
+
/**
|
|
344
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
345
|
+
|
|
346
|
+
*/
|
|
347
|
+
|
|
348
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
}
|
|
@@ -10,14 +10,14 @@ declare module 'chargebee' {
|
|
|
10
10
|
payment_source_id:string;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @description Current status of the card. \* valid - A valid and active credit card \*
|
|
13
|
+
* @description Current status of the card. \* valid - A valid and active credit card \* expiring - A card which is expiring in the current month. \* expired - An expired card
|
|
14
14
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
status:'valid' | 'expiring' | 'expired';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \*
|
|
20
|
+
* @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America Gateway \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway
|
|
21
21
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
@@ -66,14 +66,14 @@ declare module 'chargebee' {
|
|
|
66
66
|
last4:string;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* @description Card type \*
|
|
69
|
+
* @description Card type \* bancontact - A Bancontact card. \* american_express - An American Express card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* diners_club - A Diner's Club card. \* discover - A Discover card. \* other - Card belonging to types other than those listed above. \* mastercard - A MasterCard. \* jcb - A JCB card. \* visa - A Visa card.
|
|
70
70
|
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* @description Card Funding type \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \*
|
|
76
|
+
* @description Card Funding type \* credit - A credit card. \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* not_known - An unknown card.
|
|
77
77
|
|
|
78
78
|
*/
|
|
79
79
|
|
|
@@ -185,7 +185,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
185
185
|
ip_address?:string;
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* @description Card is powered by payment method. \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable
|
|
188
|
+
* @description Card is powered by payment method. \* card - card \* ideal - ideal \* sofort - sofort \* bancontact - bancontact \* giropay - giropay \* latam_local_card - latam_local_card \* not_applicable - not_applicable
|
|
189
189
|
|
|
190
190
|
*/
|
|
191
191
|
|
|
@@ -207,20 +207,6 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
207
207
|
}
|
|
208
208
|
export namespace Card {
|
|
209
209
|
export class CardResource {
|
|
210
|
-
/**
|
|
211
|
-
* @description #### deprecated
|
|
212
|
-
|
|
213
|
-
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).
|
|
214
|
-
|
|
215
|
-
Copies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway.
|
|
216
|
-
|
|
217
|
-
**Limitation**
|
|
218
|
-
This request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
219
|
-
|
|
220
|
-
*/
|
|
221
|
-
|
|
222
|
-
copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
|
|
223
|
-
|
|
224
210
|
/**
|
|
225
211
|
* @description #### Deprecated
|
|
226
212
|
|
|
@@ -235,31 +221,6 @@ Retrieves the credit card for the customer id.
|
|
|
235
221
|
/**
|
|
236
222
|
* @description #### Deprecated
|
|
237
223
|
|
|
238
|
-
This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
|
|
239
|
-
|
|
240
|
-
Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`.
|
|
241
|
-
|
|
242
|
-
**Limitation**
|
|
243
|
-
This request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
244
|
-
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
|
-
switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @description #### deprecated
|
|
251
|
-
|
|
252
|
-
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source).
|
|
253
|
-
|
|
254
|
-
Deletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.
|
|
255
|
-
|
|
256
|
-
*/
|
|
257
|
-
|
|
258
|
-
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @description #### Deprecated
|
|
262
|
-
|
|
263
224
|
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards). This operation is obsoleted by the following:
|
|
264
225
|
|
|
265
226
|
* [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)
|
|
@@ -273,7 +234,7 @@ Passing credit card details to this API involves PCI liability at your end as se
|
|
|
273
234
|
* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.
|
|
274
235
|
* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.
|
|
275
236
|
* If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form.
|
|
276
|
-
* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/
|
|
237
|
+
* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.
|
|
277
238
|
* You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages#update_card) API to generate a 'Update Card' Hosted Page link.
|
|
278
239
|
|
|
279
240
|
|
|
@@ -286,39 +247,48 @@ Passing credit card details to this API involves PCI liability at your end as se
|
|
|
286
247
|
*/
|
|
287
248
|
|
|
288
249
|
update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
|
|
289
|
-
}
|
|
290
|
-
export interface CopyCardForCustomerResponse {
|
|
291
|
-
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
292
|
-
}
|
|
293
|
-
export interface CopyCardForCustomerInputParam {
|
|
294
250
|
|
|
295
251
|
/**
|
|
296
|
-
* @description
|
|
252
|
+
* @description #### Deprecated
|
|
253
|
+
|
|
254
|
+
This request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources#switch_gateway_account) for Payment Sources.
|
|
255
|
+
|
|
256
|
+
Switches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`.
|
|
257
|
+
|
|
258
|
+
**Limitation**
|
|
259
|
+
This request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
297
260
|
|
|
298
261
|
*/
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
export interface RetrieveResponse {
|
|
303
|
-
card:Card;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export interface SwitchGatewayForCustomerResponse {
|
|
307
|
-
customer:Customer;
|
|
308
|
-
|
|
309
|
-
card:Card;
|
|
310
|
-
}
|
|
311
|
-
export interface SwitchGatewayForCustomerInputParam {
|
|
262
|
+
|
|
263
|
+
switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
|
|
312
264
|
|
|
313
265
|
/**
|
|
314
|
-
* @description
|
|
266
|
+
* @description #### deprecated
|
|
267
|
+
|
|
268
|
+
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).
|
|
269
|
+
|
|
270
|
+
Copies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway.
|
|
271
|
+
|
|
272
|
+
**Limitation**
|
|
273
|
+
This request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home) to perform those actions.
|
|
315
274
|
|
|
316
275
|
*/
|
|
276
|
+
|
|
277
|
+
copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
|
|
317
278
|
|
|
318
|
-
|
|
279
|
+
/**
|
|
280
|
+
* @description #### deprecated
|
|
281
|
+
|
|
282
|
+
The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source).
|
|
283
|
+
|
|
284
|
+
Deletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.
|
|
285
|
+
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
|
|
319
289
|
}
|
|
320
|
-
export interface
|
|
321
|
-
|
|
290
|
+
export interface RetrieveResponse {
|
|
291
|
+
card:Card;
|
|
322
292
|
}
|
|
323
293
|
|
|
324
294
|
export interface UpdateCardForCustomerResponse {
|
|
@@ -442,6 +412,36 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
442
412
|
|
|
443
413
|
billing_country?:string;
|
|
444
414
|
}
|
|
415
|
+
export interface SwitchGatewayForCustomerResponse {
|
|
416
|
+
customer:Customer;
|
|
417
|
+
|
|
418
|
+
card:Card;
|
|
419
|
+
}
|
|
420
|
+
export interface SwitchGatewayForCustomerInputParam {
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @description The gateway account you want to switch to.
|
|
424
|
+
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
gateway_account_id:string;
|
|
428
|
+
}
|
|
429
|
+
export interface CopyCardForCustomerResponse {
|
|
430
|
+
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
431
|
+
}
|
|
432
|
+
export interface CopyCardForCustomerInputParam {
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @description The gateway account you want to copy the card.
|
|
436
|
+
|
|
437
|
+
*/
|
|
438
|
+
|
|
439
|
+
gateway_account_id:string;
|
|
440
|
+
}
|
|
441
|
+
export interface DeleteCardForCustomerResponse {
|
|
442
|
+
customer:Customer;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
445
|
|
|
446
446
|
}
|
|
447
447
|
}
|