chargebee 2.30.0 → 2.31.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/CHANGELOG.md +55 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +16 -0
- package/package.json +1 -1
- package/types/core.d.ts +6 -5
- package/types/index.d.ts +2 -0
- package/types/resources/Card.d.ts +2 -2
- package/types/resources/CreditNote.d.ts +23 -2
- package/types/resources/CreditNoteEstimate.d.ts +2 -2
- package/types/resources/Customer.d.ts +98 -74
- package/types/resources/Entitlement.d.ts +78 -0
- package/types/resources/Export.d.ts +7 -7
- package/types/resources/Feature.d.ts +89 -17
- package/types/resources/Hierarchy.d.ts +5 -5
- package/types/resources/Invoice.d.ts +99 -49
- package/types/resources/InvoiceEstimate.d.ts +26 -20
- package/types/resources/ItemPrice.d.ts +21 -0
- package/types/resources/PaymentSource.d.ts +380 -246
- package/types/resources/Quote.d.ts +46 -25
- package/types/resources/QuoteLineGroup.d.ts +23 -17
- package/types/resources/Subscription.d.ts +29 -17
- package/types/resources/SubscriptionEntitlement.d.ts +1 -1
- package/types/resources/SubscriptionEstimate.d.ts +12 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/Transaction.d.ts +35 -3
- package/types/resources/VirtualBankAccount.d.ts +4 -4
|
@@ -60,7 +60,7 @@ declare module 'chargebee' {
|
|
|
60
60
|
status:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* @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
|
|
63
|
+
* @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 \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
|
|
64
64
|
|
|
65
65
|
*/
|
|
66
66
|
|
|
@@ -150,6 +150,8 @@ declare module 'chargebee' {
|
|
|
150
150
|
|
|
151
151
|
paypal?:PaymentSource.Paypal;
|
|
152
152
|
|
|
153
|
+
venmo?:PaymentSource.Venmo;
|
|
154
|
+
|
|
153
155
|
/**
|
|
154
156
|
* @description Mandate details associated with the payment source.
|
|
155
157
|
|
|
@@ -160,95 +162,97 @@ declare module 'chargebee' {
|
|
|
160
162
|
export namespace PaymentSource {
|
|
161
163
|
export class PaymentSourceResource {
|
|
162
164
|
/**
|
|
163
|
-
* @description This API
|
|
165
|
+
* @description This API offers an alternative way to create a payment source using a single-use gateway temporary token, which is generally provided by your payment gateway. In the case of Stripe, this temporary token is generated according to the instruction detailed in [Stripe documentation](https://stripe.com/docs/api/tokens/create_card).
|
|
164
166
|
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
165
167
|
|
|
166
168
|
*/
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
|
|
169
171
|
|
|
170
172
|
/**
|
|
171
|
-
* @description
|
|
172
|
-
|
|
173
|
-
* **Deleted payment source is Primary, and Backup is available**
|
|
174
|
-
* The Backup payment source will become the Primary payment source.
|
|
175
|
-
* **Deleted payment source is Primary, and no Backup is available**
|
|
176
|
-
* The other payment source available, but not assigned to any subscription, will become the Primary payment source. **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.
|
|
177
|
-
|
|
178
|
-
* If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events *card_deleted* and *payment_source_deleted* will be triggered.
|
|
179
|
-
* **Deleted payment source is attached to subscriptions**
|
|
180
|
-
* Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
185
|
-
**Note** :
|
|
186
|
-
If you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use [Local Delete a Payment Source API](/docs/api/payment_sources#local_delete_a_payment_source).
|
|
173
|
+
* @description This API provides an alternative way to create a payment source using a permanent token, instead of having to add the full payment method details via API or the Chargebee UI. Permanent tokens are provided by payment gateways such as Stripe.
|
|
174
|
+
Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
187
175
|
|
|
188
176
|
*/
|
|
189
177
|
|
|
190
|
-
|
|
178
|
+
create_using_permanent_token(input:CreateUsingPermanentTokenInputParam):ChargebeeRequest<CreateUsingPermanentTokenResponse>;
|
|
191
179
|
|
|
192
180
|
/**
|
|
193
181
|
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
194
182
|
|
|
195
183
|
*/
|
|
196
184
|
|
|
197
|
-
|
|
185
|
+
create_using_token(input:CreateUsingTokenInputParam):ChargebeeRequest<CreateUsingTokenResponse>;
|
|
198
186
|
|
|
199
187
|
/**
|
|
200
|
-
* @description
|
|
201
|
-
|
|
202
|
-
For verifying bank accounts via **micro-deposit**, Stripe deposits two small amounts to the bank account being added. These deposits will take 1-2 business days to appear on the customer's bank statement. The bank statement description for the two micro-deposits contains the amount and the values deposited. Your customer will need to relay the value of the two deposits to you, after which you can verify the bank account. Once the bank account has been verified, the payment source will be marked as "Valid".
|
|
188
|
+
* @description Used to attach the card to the customer after 3DS completion. [Learn more](/docs/api/3ds_card_payments) on the 3DS implementation via Chargebee APIs.
|
|
203
189
|
|
|
204
190
|
*/
|
|
205
191
|
|
|
206
|
-
|
|
192
|
+
create_using_payment_intent(input:CreateUsingPaymentIntentInputParam):ChargebeeRequest<CreateUsingPaymentIntentResponse>;
|
|
207
193
|
|
|
208
194
|
/**
|
|
209
|
-
* @description
|
|
195
|
+
* @description Create a voucher payment method for the payment source.
|
|
210
196
|
|
|
211
197
|
*/
|
|
212
198
|
|
|
213
|
-
|
|
199
|
+
create_voucher_payment_source(input:CreateVoucherPaymentSourceInputParam):ChargebeeRequest<CreateVoucherPaymentSourceResponse>;
|
|
214
200
|
|
|
215
201
|
/**
|
|
216
|
-
* @description
|
|
217
|
-
|
|
218
|
-
This is useful if you want to port your customer's card details into another gateway.
|
|
202
|
+
* @description Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion.
|
|
219
203
|
|
|
220
204
|
*/
|
|
221
205
|
|
|
222
|
-
|
|
206
|
+
create_card(input:CreateCardInputParam):ChargebeeRequest<CreateCardResponse>;
|
|
223
207
|
|
|
224
208
|
/**
|
|
225
|
-
* @description
|
|
209
|
+
* @description This API adds a Direct Debit payment source for a customer. The bank account details collected from your customer are passed as input to this API.
|
|
226
210
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
create_using_payment_intent(input:CreateUsingPaymentIntentInputParam):ChargebeeRequest<CreateUsingPaymentIntentResponse>;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @description Retrieves the payment source identified by the unique identifier.
|
|
211
|
+
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
233
212
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
retrieve(cust_payment_source_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* @description Create a voucher payment method for the payment source.
|
|
213
|
+
ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html) , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html), and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html).
|
|
214
|
+
**Note:**
|
|
240
215
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
216
|
+
* For ACH via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).
|
|
217
|
+
|
|
218
|
+
##### Bank account verification
|
|
219
|
+
|
|
220
|
+
Once the bank account has been added, it needs to be verified.
|
|
221
|
+
|
|
222
|
+
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
223
|
+
* For [Authorize.net](https://www.authorize.net/), the verification is done by them in 2-3 days after the account is added. No intervention is needed from your side or your customer.
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
#### Single Euro Payment Area (SEPA)
|
|
228
|
+
|
|
229
|
+
SEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html), [Stripe](https://www.chargebee.com/docs/sepa-stripe.html) and [Adyen](https://www.chargebee.com/docs/adyen-sepa.html).
|
|
230
|
+
**Note:**
|
|
231
|
+
|
|
232
|
+
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details) such as IP address and device information.
|
|
233
|
+
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
234
|
+
|
|
235
|
+
#### Bacs Payment Schemes Limited (BACS) and Bg Autogiro
|
|
236
|
+
|
|
237
|
+
Bacs is an organization that manages the Direct Debit and Direct Credit payment methods in the UK. Bg Autogiro is a Direct Debit scheme for krona denominated payments in Sweden. Both Bacs and Bg Autogiro are supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html).
|
|
238
|
+
**Note:**
|
|
239
|
+
|
|
240
|
+
* For BACS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).
|
|
241
|
+
|
|
242
|
+
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
243
|
+
|
|
244
|
+
BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html) supports both.
|
|
245
|
+
|
|
246
|
+
For Direct Debit, the customer needs to accept a mandate that allows the merchant to debit their bank account. This agreement PDF can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages#retrieve_direct_debit_agreement_pdf).
|
|
247
|
+
|
|
248
|
+
If the customer has already reached the payment source limit allowed for the site, pass `replace_primary_payment_source` as `true`. Alternatively, [delete](/docs/api/payment_sources#delete_a_payment_source) one of the payment sources first and then add the bank account payment source for the customer.
|
|
249
|
+
**Note:**
|
|
250
|
+
|
|
251
|
+
* For BECS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).
|
|
248
252
|
|
|
249
253
|
*/
|
|
250
254
|
|
|
251
|
-
|
|
255
|
+
create_bank_account(input:CreateBankAccountInputParam):ChargebeeRequest<CreateBankAccountResponse>;
|
|
252
256
|
|
|
253
257
|
/**
|
|
254
258
|
* @description Merchants look to update card details when:
|
|
@@ -268,87 +272,94 @@ In **Stripe** and **Braintree** payment gateways, changes in card details are au
|
|
|
268
272
|
update_card(cust_payment_source_id:string, input?:UpdateCardInputParam):ChargebeeRequest<UpdateCardResponse>;
|
|
269
273
|
|
|
270
274
|
/**
|
|
271
|
-
* @description
|
|
275
|
+
* @description This API is used to update the payment source details of a customer. Information related to bank account payment source such as email, first name, and last name can be updated.
|
|
276
|
+
|
|
277
|
+
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
278
|
+
* For Stripe, Chargebee only supports SEPA.
|
|
279
|
+
|
|
280
|
+
|
|
272
281
|
|
|
273
|
-
This is applicable only if the payment source is present in Spreedly vault.
|
|
274
282
|
|
|
275
283
|
*/
|
|
276
284
|
|
|
277
|
-
|
|
285
|
+
update_bank_account(cust_payment_source_id:string, input?:UpdateBankAccountInputParam):ChargebeeRequest<UpdateBankAccountResponse>;
|
|
278
286
|
|
|
279
287
|
/**
|
|
280
|
-
* @description
|
|
288
|
+
* @description This API can be used to verify bank accounts which have been added as payment source. This is applicable for **Stripe ACH with micro-deposit mode bank accounts** only. Stripe handles verification in two ways - via Plaid, and micro-deposit.
|
|
289
|
+
|
|
290
|
+
For verifying bank accounts via **micro-deposit**, Stripe deposits two small amounts to the bank account being added. These deposits will take 1-2 business days to appear on the customer's bank statement. The bank statement description for the two micro-deposits contains the amount and the values deposited. Your customer will need to relay the value of the two deposits to you, after which you can verify the bank account. Once the bank account has been verified, the payment source will be marked as "Valid".
|
|
281
291
|
|
|
282
292
|
*/
|
|
283
293
|
|
|
284
|
-
|
|
294
|
+
verify_bank_account(cust_payment_source_id:string, input:VerifyBankAccountInputParam):ChargebeeRequest<VerifyBankAccountResponse>;
|
|
285
295
|
|
|
286
296
|
/**
|
|
287
|
-
* @description
|
|
297
|
+
* @description Retrieves the payment source identified by the unique identifier.
|
|
288
298
|
|
|
289
299
|
*/
|
|
290
300
|
|
|
291
|
-
|
|
301
|
+
retrieve(cust_payment_source_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
292
302
|
|
|
293
303
|
/**
|
|
294
|
-
* @description
|
|
295
|
-
|
|
296
|
-
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
297
|
-
|
|
298
|
-
ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html) , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html), and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html).
|
|
299
|
-
|
|
300
|
-
##### Bank account verification
|
|
301
|
-
|
|
302
|
-
Once the bank account has been added, it needs to be verified.
|
|
303
|
-
|
|
304
|
-
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
305
|
-
* For [Authorize.net](https://www.authorize.net/), the verification is done by them in 2-3 days after the account is added. No intervention is needed from your side or your customer.
|
|
306
|
-
|
|
304
|
+
* @description Lists all the payment sources
|
|
307
305
|
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @description Switches the gateway in which this payment source information is stored.
|
|
308
312
|
|
|
309
|
-
|
|
313
|
+
This is applicable only if the payment source is present in Spreedly vault.
|
|
310
314
|
|
|
311
|
-
|
|
312
|
-
|
|
315
|
+
*/
|
|
316
|
+
|
|
317
|
+
switch_gateway_account(cust_payment_source_id:string, input:SwitchGatewayAccountInputParam):ChargebeeRequest<SwitchGatewayAccountResponse>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @description Copies this payment source information to the gateway specified in the API.
|
|
313
321
|
|
|
314
|
-
|
|
315
|
-
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
322
|
+
This is useful if you want to port your customer's card details into another gateway.
|
|
316
323
|
|
|
317
|
-
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
export_payment_source(cust_payment_source_id:string, input:ExportPaymentSourceInputParam):ChargebeeRequest<ExportPaymentSourceResponse>;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
318
330
|
|
|
319
|
-
|
|
331
|
+
* **Deleted payment source is Primary, and Backup is available**
|
|
332
|
+
* The Backup payment source will become the Primary payment source.
|
|
333
|
+
* **Deleted payment source is Primary, and no Backup is available**
|
|
334
|
+
* The other payment source available, but not assigned to any subscription, will become the Primary payment source. **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.
|
|
320
335
|
|
|
321
|
-
|
|
336
|
+
* If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events *card_deleted* and *payment_source_deleted* will be triggered.
|
|
337
|
+
* **Deleted payment source is attached to subscriptions**
|
|
338
|
+
* Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.
|
|
322
339
|
|
|
323
|
-
BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html) supports both.
|
|
324
340
|
|
|
325
|
-
For Direct Debit, the customer needs to accept a mandate that allows the merchant to debit their bank account. This agreement PDF can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages#retrieve_direct_debit_agreement_pdf).
|
|
326
341
|
|
|
327
|
-
If
|
|
342
|
+
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
343
|
+
**Note** :
|
|
344
|
+
If you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use [Local Delete a Payment Source API](/docs/api/payment_sources#local_delete_a_payment_source).
|
|
328
345
|
|
|
329
346
|
*/
|
|
330
347
|
|
|
331
|
-
|
|
348
|
+
delete(cust_payment_source_id:string):ChargebeeRequest<DeleteResponse>;
|
|
332
349
|
|
|
333
350
|
/**
|
|
334
|
-
* @description
|
|
335
|
-
|
|
336
|
-
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
337
|
-
* For Stripe, Chargebee only supports SEPA.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
351
|
+
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
341
352
|
|
|
342
353
|
*/
|
|
343
354
|
|
|
344
|
-
|
|
355
|
+
delete_local(cust_payment_source_id:string):ChargebeeRequest<DeleteLocalResponse>;
|
|
345
356
|
}
|
|
346
|
-
export interface
|
|
357
|
+
export interface CreateUsingTempTokenResponse {
|
|
347
358
|
customer:Customer;
|
|
348
359
|
|
|
349
360
|
payment_source:PaymentSource;
|
|
350
361
|
}
|
|
351
|
-
export interface
|
|
362
|
+
export interface CreateUsingTempTokenInputParam {
|
|
352
363
|
|
|
353
364
|
/**
|
|
354
365
|
* @description Identifier of the customer with whom this payment source is associated.
|
|
@@ -358,25 +369,25 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
358
369
|
customer_id:string;
|
|
359
370
|
|
|
360
371
|
/**
|
|
361
|
-
* @description The
|
|
372
|
+
* @description The gateway account to which the payment source is associated.
|
|
362
373
|
|
|
363
374
|
*/
|
|
364
375
|
|
|
365
|
-
|
|
376
|
+
gateway_account_id?:string;
|
|
366
377
|
|
|
367
378
|
/**
|
|
368
|
-
* @description
|
|
379
|
+
* @description Type of payment source. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* dotpay - Payments made via Dotpay. \* bancontact - Payments made via Bancontact Card. \* unionpay - Payments made via UnionPay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* alipay - Payments made via Alipay. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* sofort - Payments made via Sofort. \* generic - Payments made via Generic Payment Method. \* amazon_payments - Payments made via Amazon Payments. \* google_pay - Payments made via Google Pay. \* giropay - Payments made via giropay. \* wechat_pay - Payments made via WeChat Pay. \* ideal - Payments made via iDEAL. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* upi - UPI Payments.
|
|
369
380
|
|
|
370
381
|
*/
|
|
371
382
|
|
|
372
|
-
|
|
383
|
+
type:Type;
|
|
373
384
|
|
|
374
385
|
/**
|
|
375
|
-
* @description
|
|
386
|
+
* @description Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.
|
|
376
387
|
|
|
377
388
|
*/
|
|
378
389
|
|
|
379
|
-
|
|
390
|
+
tmp_token:string;
|
|
380
391
|
|
|
381
392
|
/**
|
|
382
393
|
* @description 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.
|
|
@@ -393,7 +404,7 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
393
404
|
replace_primary_payment_source?:boolean;
|
|
394
405
|
|
|
395
406
|
/**
|
|
396
|
-
* @description * `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://
|
|
407
|
+
* @description * `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://docs.checkout.com/payment-methods/cards/dlocal).
|
|
397
408
|
* `payer`: User related information.
|
|
398
409
|
* `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
|
|
399
410
|
* `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
|
|
@@ -403,28 +414,33 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
403
414
|
* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
|
|
404
415
|
* `fraud`: Fraud identification related information.
|
|
405
416
|
* `device_session_id`: Session ID associated with the user's device.
|
|
406
|
-
* `fraud_merchant_id`: Your merchant ID for fraud detection.
|
|
417
|
+
* `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
|
|
407
418
|
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
408
419
|
* `fraud`: Fraud identification related information.
|
|
409
420
|
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
421
|
+
* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
|
|
422
|
+
* `fraud`: Fraud identification related information.
|
|
423
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
424
|
+
* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
|
|
425
|
+
* `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
|
|
426
|
+
* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
|
|
427
|
+
* `payer`: User related information.
|
|
428
|
+
* `document`: Document is the user's identification number based on their country.
|
|
429
|
+
* `fraud`: Fraud identification related information.
|
|
430
|
+
* `device_session_id`: Session ID associated with the user's device
|
|
431
|
+
|
|
410
432
|
.
|
|
411
433
|
|
|
412
434
|
*/
|
|
413
435
|
|
|
414
436
|
additional_information?:object;
|
|
415
437
|
}
|
|
416
|
-
export interface
|
|
417
|
-
customer:Customer;
|
|
418
|
-
|
|
419
|
-
payment_source:PaymentSource;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export interface CreateCardResponse {
|
|
438
|
+
export interface CreateUsingPermanentTokenResponse {
|
|
423
439
|
customer:Customer;
|
|
424
440
|
|
|
425
441
|
payment_source:PaymentSource;
|
|
426
442
|
}
|
|
427
|
-
export interface
|
|
443
|
+
export interface CreateUsingPermanentTokenInputParam {
|
|
428
444
|
|
|
429
445
|
/**
|
|
430
446
|
* @description Identifier of the customer with whom this payment source is associated.
|
|
@@ -434,129 +450,175 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
434
450
|
customer_id:string;
|
|
435
451
|
|
|
436
452
|
/**
|
|
437
|
-
* @description
|
|
453
|
+
* @description The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* faster_payments - Payments made via Faster Payments \* google_pay - Payments made via Google Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* pay_to - Payments made via PayTo \* generic - Payments made via Generic Payment Method. \* giropay - Payments made via giropay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* alipay - Payments made via Alipay. \* venmo - Payments made via Venmo \* sofort - Payments made via Sofort. \* wechat_pay - Payments made via WeChat Pay. \* ideal - Payments made via iDEAL. \* netbanking_emandates - Netbanking (eMandates) Payments. \* upi - UPI Payments. \* bancontact - Payments made via Bancontact Card. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* amazon_payments - Payments made via Amazon Payments. \* apple_pay - Payments made via Apple Pay.
|
|
438
454
|
|
|
439
455
|
*/
|
|
440
456
|
|
|
441
|
-
|
|
457
|
+
type:Type;
|
|
442
458
|
|
|
443
459
|
/**
|
|
444
|
-
* @description
|
|
460
|
+
* @description The gateway account to which the payment source is associated.
|
|
445
461
|
|
|
446
462
|
*/
|
|
447
463
|
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
export interface VerifyBankAccountResponse {
|
|
451
|
-
payment_source:PaymentSource;
|
|
452
|
-
}
|
|
453
|
-
export interface VerifyBankAccountInputParam {
|
|
464
|
+
gateway_account_id?:string;
|
|
454
465
|
|
|
455
466
|
/**
|
|
456
|
-
* @description
|
|
467
|
+
* @description The reference id. In the case of Amazon and PayPal, this will be the billing agreement ID. For GoCardless direct debit this will be `mandate_id`. In the case of a card, this will be the identifier provided by the gateway or card vault for the specific payment method resource.
|
|
468
|
+
**Note:**
|
|
469
|
+
|
|
470
|
+
* This is not the one-time temporary token provided by gateways like Stripe.
|
|
471
|
+
|
|
472
|
+
* `reference_id` is an alternative for `payment_method_token`, `customer_profile_token`, `network_transaction_id`, or `mandate_id`.
|
|
473
|
+
|
|
474
|
+
* `payment_method_token`, `customer_profile_token`, `network_transaction_id`, or `mandate_id` cannot be used with `reference_id`.
|
|
475
|
+
|
|
476
|
+
* `reference_id` is a combination of multiple tokens available at the gateway. Learn more about the combination of each gateway from this [document](https://apidocs.chargebee.com/docs/api/payment_parameters).
|
|
477
|
+
|
|
457
478
|
|
|
458
479
|
*/
|
|
459
480
|
|
|
460
|
-
|
|
481
|
+
reference_id?:string;
|
|
461
482
|
|
|
462
483
|
/**
|
|
463
|
-
* @description
|
|
484
|
+
* @description 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.
|
|
464
485
|
|
|
465
486
|
*/
|
|
466
487
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
export interface ListResponse {
|
|
488
|
+
issuing_country?:string;
|
|
489
|
+
|
|
470
490
|
/**
|
|
471
|
-
* @description
|
|
491
|
+
* @description Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
|
|
472
492
|
|
|
473
493
|
*/
|
|
474
494
|
|
|
475
|
-
|
|
495
|
+
replace_primary_payment_source?:boolean;
|
|
476
496
|
|
|
477
497
|
/**
|
|
478
|
-
* @description
|
|
498
|
+
* @description An identifier provided by the gateway or card vault for the specific payment method resource.
|
|
499
|
+
**Note:**
|
|
500
|
+
|
|
501
|
+
`payment_method_token` is an alternative for reference_id and cannot be used with `reference_id`.
|
|
479
502
|
|
|
480
503
|
*/
|
|
481
504
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
export interface ListInputParam {
|
|
485
|
-
[key : string]: any;
|
|
505
|
+
payment_method_token?:string;
|
|
506
|
+
|
|
486
507
|
/**
|
|
487
|
-
* @description
|
|
508
|
+
* @description A unique identifier associated with a customer\`s profile within a payment gateway.
|
|
509
|
+
**Note:**
|
|
510
|
+
|
|
511
|
+
`customer_profile_token` is an alternative for reference_id and cannot be used with `reference_id`.
|
|
488
512
|
|
|
489
513
|
*/
|
|
490
|
-
|
|
491
|
-
|
|
514
|
+
|
|
515
|
+
customer_profile_token?:string;
|
|
492
516
|
|
|
493
517
|
/**
|
|
494
|
-
* @description
|
|
518
|
+
* @description An identifier of the payment or authorization transaction at the gateway initiated using this payment method.
|
|
519
|
+
**Note:**
|
|
520
|
+
|
|
521
|
+
`network_transaction_id` is an alternative for reference_id and cannot be used with `reference_id`.
|
|
495
522
|
|
|
496
523
|
*/
|
|
497
|
-
|
|
498
|
-
|
|
524
|
+
|
|
525
|
+
network_transaction_id?:string;
|
|
499
526
|
|
|
500
527
|
/**
|
|
501
|
-
* @description
|
|
528
|
+
* @description An identifier of mandates which is an authorization given by the payer (usually a customer or account holder) to allow a third party such as a merchant or service provider to initiate payments from their account.
|
|
529
|
+
**Note:**
|
|
530
|
+
|
|
531
|
+
`mandate_id` is an alternative for reference_id and cannot be used with `reference_id`.
|
|
502
532
|
|
|
503
533
|
*/
|
|
504
|
-
|
|
505
|
-
|
|
534
|
+
|
|
535
|
+
mandate_id?:string;
|
|
506
536
|
|
|
507
537
|
/**
|
|
508
|
-
* @description
|
|
538
|
+
* @description By default, the value is `false` and payment method details will be retrieved from the selected payment gateway using `reference_id` or `payment_method_token` / `customer_profile_token` / `network_transaction_id` / `mandate_id`. Learn more about the multiple token combinations of each gateway from this [document](https://apidocs.chargebee.com/docs/api/payment_parameters).
|
|
539
|
+
|
|
540
|
+
Enter the value as `true` for the payment gateways that do not allow to retrieve the payment method details. Once passed, it will create payment method at Chargebee with the provided attributes in `payment_method_token`, `customer_profile_token`, `network_transaction_id`, `mandate_id`, `card`, and `billing_address`.
|
|
541
|
+
**Note:**
|
|
542
|
+
|
|
543
|
+
Currently, the `skip_retrieval` value as `true` is only supported for the Vantiv payment gateway.
|
|
509
544
|
|
|
510
545
|
*/
|
|
511
|
-
|
|
512
|
-
|
|
546
|
+
|
|
547
|
+
skip_retrieval?:boolean;
|
|
513
548
|
|
|
514
549
|
/**
|
|
515
|
-
* @description
|
|
550
|
+
* @description * `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://docs.checkout.com/payment-methods/cards/dlocal).
|
|
551
|
+
* `payer`: User related information.
|
|
552
|
+
* `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
|
|
553
|
+
* `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
|
|
554
|
+
* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
|
|
555
|
+
* `fraud`: Fraud identification related information.
|
|
556
|
+
* `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
|
|
557
|
+
* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
|
|
558
|
+
* `fraud`: Fraud identification related information.
|
|
559
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
560
|
+
* `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
|
|
561
|
+
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
562
|
+
* `fraud`: Fraud identification related information.
|
|
563
|
+
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
564
|
+
* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
|
|
565
|
+
* `fraud`: Fraud identification related information.
|
|
566
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
567
|
+
* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
|
|
568
|
+
* `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
|
|
569
|
+
* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
|
|
570
|
+
* `payer`: User related information.
|
|
571
|
+
* `document`: Document is the user's identification number based on their country.
|
|
572
|
+
* `fraud`: Fraud identification related information.
|
|
573
|
+
* `device_session_id`: Session ID associated with the user's device
|
|
574
|
+
|
|
575
|
+
.
|
|
516
576
|
|
|
517
577
|
*/
|
|
518
|
-
|
|
519
|
-
|
|
578
|
+
|
|
579
|
+
additional_information?:object;
|
|
520
580
|
|
|
521
581
|
/**
|
|
522
|
-
* @description
|
|
582
|
+
* @description Parameters of tokenized card details
|
|
523
583
|
|
|
524
584
|
*/
|
|
525
|
-
|
|
526
|
-
|
|
585
|
+
|
|
586
|
+
card?:{brand?:'discover' | 'other' | 'argencard' | 'jcb' | 'mastercard' | 'elo' | 'cencosud' | 'cmr_falabella' | 'american_express' | 'cabal' | 'nativa' | 'bancontact' | 'tarjeta_naranja' | 'carnet' | 'visa' | 'diners_club' | 'rupay' | 'hipercard' | 'maestro',expiry_month?:number,expiry_year?:number,funding_type?:'not_known' | 'prepaid' | 'credit' | 'debit',iin?:string,last4?:string};
|
|
527
587
|
|
|
528
588
|
/**
|
|
529
|
-
* @description
|
|
589
|
+
* @description Parameters for billing_address
|
|
530
590
|
|
|
531
591
|
*/
|
|
532
|
-
|
|
533
|
-
|
|
592
|
+
|
|
593
|
+
billing_address?:{city?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,state?:string,state_code?:string,zip?:string};
|
|
594
|
+
}
|
|
595
|
+
export interface CreateUsingTokenResponse {
|
|
596
|
+
customer:Customer;
|
|
597
|
+
|
|
598
|
+
payment_source:PaymentSource;
|
|
599
|
+
}
|
|
600
|
+
export interface CreateUsingTokenInputParam {
|
|
534
601
|
|
|
535
602
|
/**
|
|
536
|
-
* @description
|
|
603
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
537
604
|
|
|
538
605
|
*/
|
|
539
|
-
|
|
540
|
-
|
|
606
|
+
|
|
607
|
+
customer_id:string;
|
|
541
608
|
|
|
542
609
|
/**
|
|
543
|
-
* @description
|
|
610
|
+
* @description Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
|
|
544
611
|
|
|
545
612
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}
|
|
549
|
-
export interface ExportPaymentSourceResponse {
|
|
550
|
-
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
551
|
-
}
|
|
552
|
-
export interface ExportPaymentSourceInputParam {
|
|
613
|
+
|
|
614
|
+
replace_primary_payment_source?:boolean;
|
|
553
615
|
|
|
554
616
|
/**
|
|
555
|
-
* @description
|
|
617
|
+
* @description Token generated by Chargebee JS representing payment method details.
|
|
556
618
|
|
|
557
619
|
*/
|
|
558
620
|
|
|
559
|
-
|
|
621
|
+
token_id:string;
|
|
560
622
|
}
|
|
561
623
|
export interface CreateUsingPaymentIntentResponse {
|
|
562
624
|
customer:Customer;
|
|
@@ -584,12 +646,8 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
584
646
|
|
|
585
647
|
*/
|
|
586
648
|
|
|
587
|
-
payment_intent?:{additional_info?:object,additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
|
|
588
|
-
}
|
|
589
|
-
export interface RetrieveResponse {
|
|
590
|
-
payment_source:PaymentSource;
|
|
649
|
+
payment_intent?:{additional_info?:object,additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'faster_payments' | 'sofort' | 'upi' | 'venmo' | 'amazon_payments' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'pay_to' | 'card',reference_id?:string};
|
|
591
650
|
}
|
|
592
|
-
|
|
593
651
|
export interface CreateVoucherPaymentSourceResponse {
|
|
594
652
|
customer:Customer;
|
|
595
653
|
|
|
@@ -609,14 +667,14 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
609
667
|
|
|
610
668
|
*/
|
|
611
669
|
|
|
612
|
-
voucher_payment_source
|
|
670
|
+
voucher_payment_source:{billing_address?:object,gateway_account_id?:string,tax_id?:string,voucher_type:VoucherType};
|
|
613
671
|
}
|
|
614
|
-
export interface
|
|
672
|
+
export interface CreateCardResponse {
|
|
615
673
|
customer:Customer;
|
|
616
674
|
|
|
617
675
|
payment_source:PaymentSource;
|
|
618
676
|
}
|
|
619
|
-
export interface
|
|
677
|
+
export interface CreateCardInputParam {
|
|
620
678
|
|
|
621
679
|
/**
|
|
622
680
|
* @description Identifier of the customer with whom this payment source is associated.
|
|
@@ -626,28 +684,35 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
626
684
|
customer_id:string;
|
|
627
685
|
|
|
628
686
|
/**
|
|
629
|
-
* @description
|
|
687
|
+
* @description Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
|
|
630
688
|
|
|
631
689
|
*/
|
|
632
690
|
|
|
633
|
-
|
|
691
|
+
replace_primary_payment_source?:boolean;
|
|
634
692
|
|
|
635
693
|
/**
|
|
636
|
-
* @description
|
|
694
|
+
* @description Parameters for card
|
|
637
695
|
|
|
638
696
|
*/
|
|
639
697
|
|
|
640
|
-
|
|
698
|
+
card:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
|
|
699
|
+
}
|
|
700
|
+
export interface CreateBankAccountResponse {
|
|
701
|
+
customer:Customer;
|
|
702
|
+
|
|
703
|
+
payment_source:PaymentSource;
|
|
704
|
+
}
|
|
705
|
+
export interface CreateBankAccountInputParam {
|
|
641
706
|
|
|
642
707
|
/**
|
|
643
|
-
* @description
|
|
708
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
644
709
|
|
|
645
710
|
*/
|
|
646
711
|
|
|
647
|
-
|
|
712
|
+
customer_id:string;
|
|
648
713
|
|
|
649
714
|
/**
|
|
650
|
-
* @description 2-letter
|
|
715
|
+
* @description 2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN.
|
|
651
716
|
|
|
652
717
|
*/
|
|
653
718
|
|
|
@@ -661,25 +726,11 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
661
726
|
replace_primary_payment_source?:boolean;
|
|
662
727
|
|
|
663
728
|
/**
|
|
664
|
-
* @description
|
|
665
|
-
* `payer`: User related information.
|
|
666
|
-
* `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
|
|
667
|
-
* `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
|
|
668
|
-
* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
|
|
669
|
-
* `fraud`: Fraud identification related information.
|
|
670
|
-
* `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
|
|
671
|
-
* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
|
|
672
|
-
* `fraud`: Fraud identification related information.
|
|
673
|
-
* `device_session_id`: Session ID associated with the user's device.
|
|
674
|
-
* `fraud_merchant_id`: Your merchant ID for fraud detection.
|
|
675
|
-
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
676
|
-
* `fraud`: Fraud identification related information.
|
|
677
|
-
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
678
|
-
.
|
|
729
|
+
* @description Parameters for bank_account
|
|
679
730
|
|
|
680
731
|
*/
|
|
681
732
|
|
|
682
|
-
|
|
733
|
+
bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
|
|
683
734
|
}
|
|
684
735
|
export interface UpdateCardResponse {
|
|
685
736
|
customer:Customer;
|
|
@@ -707,105 +758,163 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
707
758
|
|
|
708
759
|
*/
|
|
709
760
|
|
|
710
|
-
card?:{billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
761
|
+
card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
|
|
711
762
|
}
|
|
712
|
-
export interface
|
|
763
|
+
export interface UpdateBankAccountResponse {
|
|
713
764
|
customer:Customer;
|
|
714
765
|
|
|
715
766
|
payment_source:PaymentSource;
|
|
716
767
|
}
|
|
717
|
-
export interface
|
|
768
|
+
export interface UpdateBankAccountInputParam {
|
|
718
769
|
|
|
719
770
|
/**
|
|
720
|
-
* @description
|
|
771
|
+
* @description Parameters for bank_account
|
|
721
772
|
|
|
722
773
|
*/
|
|
723
774
|
|
|
724
|
-
|
|
775
|
+
bank_account?:{email?:string,first_name?:string,last_name?:string};
|
|
725
776
|
}
|
|
726
|
-
export interface
|
|
727
|
-
customer:Customer;
|
|
728
|
-
|
|
777
|
+
export interface VerifyBankAccountResponse {
|
|
729
778
|
payment_source:PaymentSource;
|
|
730
779
|
}
|
|
731
|
-
export interface
|
|
780
|
+
export interface VerifyBankAccountInputParam {
|
|
732
781
|
|
|
733
782
|
/**
|
|
734
|
-
* @description
|
|
783
|
+
* @description Value of the micro-deposits sent to the bank account.
|
|
735
784
|
|
|
736
785
|
*/
|
|
737
786
|
|
|
738
|
-
|
|
787
|
+
amount1:number;
|
|
739
788
|
|
|
740
789
|
/**
|
|
741
|
-
* @description
|
|
790
|
+
* @description Value of the micro-deposits sent to the bank account.
|
|
742
791
|
|
|
743
792
|
*/
|
|
744
793
|
|
|
745
|
-
|
|
746
|
-
|
|
794
|
+
amount2:number;
|
|
795
|
+
}
|
|
796
|
+
export interface RetrieveResponse {
|
|
797
|
+
payment_source:PaymentSource;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export interface ListResponse {
|
|
747
801
|
/**
|
|
748
|
-
* @description
|
|
802
|
+
* @description Lists all the payment sources
|
|
749
803
|
|
|
750
804
|
*/
|
|
751
805
|
|
|
752
|
-
|
|
753
|
-
}
|
|
754
|
-
export interface DeleteLocalResponse {
|
|
755
|
-
customer:Customer;
|
|
806
|
+
list:{payment_source:PaymentSource}[];
|
|
756
807
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
customer:Customer;
|
|
808
|
+
/**
|
|
809
|
+
* @description Lists all the payment sources
|
|
810
|
+
|
|
811
|
+
*/
|
|
762
812
|
|
|
763
|
-
|
|
813
|
+
next_offset?:string;
|
|
764
814
|
}
|
|
765
|
-
export interface
|
|
815
|
+
export interface ListInputParam {
|
|
816
|
+
[key : string]: any;
|
|
817
|
+
/**
|
|
818
|
+
* @description Lists all the payment sources
|
|
819
|
+
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
limit?:number;
|
|
766
823
|
|
|
767
824
|
/**
|
|
768
|
-
* @description
|
|
825
|
+
* @description Lists all the payment sources
|
|
769
826
|
|
|
770
827
|
*/
|
|
828
|
+
|
|
829
|
+
offset?:string;
|
|
771
830
|
|
|
772
|
-
|
|
831
|
+
/**
|
|
832
|
+
* @description Lists all the payment sources
|
|
833
|
+
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
subscription_id?:string;
|
|
773
837
|
|
|
774
838
|
/**
|
|
775
|
-
* @description
|
|
839
|
+
* @description Lists all the payment sources
|
|
776
840
|
|
|
777
841
|
*/
|
|
842
|
+
|
|
843
|
+
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
778
844
|
|
|
779
|
-
|
|
845
|
+
/**
|
|
846
|
+
* @description Lists all the payment sources
|
|
847
|
+
|
|
848
|
+
*/
|
|
849
|
+
|
|
850
|
+
type?:{in?:string,is?:'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'automated_bank_transfer' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card',is_not?:'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'automated_bank_transfer' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card',not_in?:string};
|
|
780
851
|
|
|
781
852
|
/**
|
|
782
|
-
* @description
|
|
853
|
+
* @description Lists all the payment sources
|
|
783
854
|
|
|
784
855
|
*/
|
|
856
|
+
|
|
857
|
+
status?:{in?:string,is?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',is_not?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',not_in?:string};
|
|
785
858
|
|
|
786
|
-
|
|
859
|
+
/**
|
|
860
|
+
* @description Lists all the payment sources
|
|
861
|
+
|
|
862
|
+
*/
|
|
863
|
+
|
|
864
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
787
865
|
|
|
788
866
|
/**
|
|
789
|
-
* @description
|
|
867
|
+
* @description Lists all the payment sources
|
|
790
868
|
|
|
791
869
|
*/
|
|
870
|
+
|
|
871
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
792
872
|
|
|
793
|
-
|
|
873
|
+
/**
|
|
874
|
+
* @description Lists all the payment sources
|
|
875
|
+
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
794
879
|
}
|
|
795
|
-
export interface
|
|
880
|
+
export interface SwitchGatewayAccountResponse {
|
|
796
881
|
customer:Customer;
|
|
797
882
|
|
|
798
883
|
payment_source:PaymentSource;
|
|
799
884
|
}
|
|
800
|
-
export interface
|
|
885
|
+
export interface SwitchGatewayAccountInputParam {
|
|
801
886
|
|
|
802
887
|
/**
|
|
803
|
-
* @description
|
|
888
|
+
* @description The gateway account you want to switch to.
|
|
804
889
|
|
|
805
890
|
*/
|
|
806
891
|
|
|
807
|
-
|
|
892
|
+
gateway_account_id:string;
|
|
893
|
+
}
|
|
894
|
+
export interface ExportPaymentSourceResponse {
|
|
895
|
+
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
896
|
+
}
|
|
897
|
+
export interface ExportPaymentSourceInputParam {
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @description The gateway account you want to copy the card.
|
|
901
|
+
|
|
902
|
+
*/
|
|
903
|
+
|
|
904
|
+
gateway_account_id:string;
|
|
905
|
+
}
|
|
906
|
+
export interface DeleteResponse {
|
|
907
|
+
customer:Customer;
|
|
908
|
+
|
|
909
|
+
payment_source:PaymentSource;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export interface DeleteLocalResponse {
|
|
913
|
+
customer:Customer;
|
|
914
|
+
|
|
915
|
+
payment_source:PaymentSource;
|
|
808
916
|
}
|
|
917
|
+
|
|
809
918
|
export interface Card {
|
|
810
919
|
/**
|
|
811
920
|
* @description Cardholder's first name
|
|
@@ -826,42 +935,42 @@ If the customer has already reached the payment source limit allowed for the sit
|
|
|
826
935
|
|
|
827
936
|
*/
|
|
828
937
|
|
|
829
|
-
iin
|
|
938
|
+
iin:string;
|
|
830
939
|
|
|
831
940
|
/**
|
|
832
941
|
* @description Last four digits of the card number
|
|
833
942
|
|
|
834
943
|
*/
|
|
835
944
|
|
|
836
|
-
last4
|
|
945
|
+
last4:string;
|
|
837
946
|
|
|
838
947
|
/**
|
|
839
948
|
* @description Card brand \* american_express - An American Express card. \* visa - A Visa card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* mastercard - A MasterCard. \* jcb - A JCB card. \* other - Card belonging to types other than those listed above. \* bancontact - A Bancontact card. \* discover - A Discover card. \* diners_club - A Diner's Club card.
|
|
840
949
|
|
|
841
950
|
*/
|
|
842
951
|
|
|
843
|
-
brand
|
|
952
|
+
brand:'discover' | 'other' | 'argencard' | 'jcb' | 'mastercard' | 'elo' | 'cencosud' | 'cmr_falabella' | 'american_express' | 'cabal' | 'nativa' | 'bancontact' | 'tarjeta_naranja' | 'carnet' | 'visa' | 'diners_club' | 'rupay' | 'not_applicable' | 'hipercard' | 'maestro';
|
|
844
953
|
|
|
845
954
|
/**
|
|
846
955
|
* @description Card Funding type \* not_known - An unknown card. \* debit - A debit card. \* credit - A credit card. \* prepaid - A prepaid card. \* not_applicable - Used for ACH. Not applicable for cards
|
|
847
956
|
|
|
848
957
|
*/
|
|
849
958
|
|
|
850
|
-
funding_type
|
|
959
|
+
funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
851
960
|
|
|
852
961
|
/**
|
|
853
962
|
* @description Card expiry month.
|
|
854
963
|
|
|
855
964
|
*/
|
|
856
965
|
|
|
857
|
-
expiry_month
|
|
966
|
+
expiry_month:number;
|
|
858
967
|
|
|
859
968
|
/**
|
|
860
969
|
* @description Card expiry year.
|
|
861
970
|
|
|
862
971
|
*/
|
|
863
972
|
|
|
864
|
-
expiry_year
|
|
973
|
+
expiry_year:number;
|
|
865
974
|
|
|
866
975
|
/**
|
|
867
976
|
* @description Address line 1, as available in card billing address.
|
|
@@ -932,7 +1041,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
932
1041
|
|
|
933
1042
|
*/
|
|
934
1043
|
|
|
935
|
-
last4
|
|
1044
|
+
last4:string;
|
|
936
1045
|
|
|
937
1046
|
/**
|
|
938
1047
|
* @description Account holder's name as per bank account.
|
|
@@ -955,6 +1064,13 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
955
1064
|
|
|
956
1065
|
last_name?:string;
|
|
957
1066
|
|
|
1067
|
+
/**
|
|
1068
|
+
* @description Bank account's scheme to which the mandate and associated payments are submitted. \* becs_nz - The Bulk Electronic Clearing System (BECS) is a Direct Debit scheme and followed in New-Zealand for Direct Debit system. \* bacs - Automated payments are at the very centre of the UK's financial system, providing an essential service for both consumers and organisations. Bacs is the company which runs Direct Debit in the UK. \* becs - The Bulk Electronic Clearing System (BECS) is a Direct Debit scheme and followed in Australia for Direct Debit system. \* pad - Pre-Authorized Debit (PAD) is the scheme used for collecting Direct Debit payments from customers in Canada. \* ach - US Bank Account \* not_applicable - not_applicable \* sepa_core - SEPA Direct Debit is a Europe-wide Direct Debit system that allows merchants to collect Euro-denominated payments. \* autogiro - Bg Autogiro is a Direct Debit scheme for collecting Krona-denominated payments from a bank account in Sweden.
|
|
1069
|
+
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
1072
|
+
direct_debit_scheme?:DirectDebitScheme;
|
|
1073
|
+
|
|
958
1074
|
/**
|
|
959
1075
|
* @description Name of account holder's bank.
|
|
960
1076
|
|
|
@@ -1003,7 +1119,7 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
1003
1119
|
|
|
1004
1120
|
*/
|
|
1005
1121
|
|
|
1006
|
-
last4
|
|
1122
|
+
last4:string;
|
|
1007
1123
|
|
|
1008
1124
|
/**
|
|
1009
1125
|
* @description Customer first name as per voucher payment source.
|
|
@@ -1170,12 +1286,30 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
1170
1286
|
|
|
1171
1287
|
agreement_id?:string;
|
|
1172
1288
|
}
|
|
1289
|
+
export interface Venmo {
|
|
1290
|
+
user_name?:string;
|
|
1291
|
+
}
|
|
1173
1292
|
export interface Mandate {
|
|
1174
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* @description A unique mandate identifier used for recurring payments.
|
|
1295
|
+
|
|
1296
|
+
*/
|
|
1175
1297
|
|
|
1176
|
-
|
|
1298
|
+
id:string;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @description Chargebee's subscription id used to find the mapping between the payment source and the Subscription.
|
|
1302
|
+
|
|
1303
|
+
*/
|
|
1304
|
+
|
|
1305
|
+
subscription_id:string;
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* @description Timestamp indicating when the mandate is created
|
|
1309
|
+
|
|
1310
|
+
*/
|
|
1177
1311
|
|
|
1178
|
-
created_at
|
|
1312
|
+
created_at:number;
|
|
1179
1313
|
}
|
|
1180
1314
|
}
|
|
1181
1315
|
}
|