chargebee 2.25.3 → 2.26.1
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 +35 -0
- package/README.md +55 -49
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,251 +1,1455 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface PaymentSource {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Identifier of the payment source
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
resource_version?:number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Timestamp indicating when this payment source resource was last updated.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
updated_at?:number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description Timestamp indicating when this payment source resource is created.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
created_at:number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
customer_id:string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description Type of payment source \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* google_pay - Payments made via Google Pay. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* alipay - Payments made via Alipay. \* sofort - Payments made via Sofort. \* wechat_pay - Payments made via WeChat Pay. \* netbanking_emandates - Netbanking (eMandates) 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. \* generic - Payments made via Generic Payment Method. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* upi - UPI Payments. \* apple_pay - Payments made via Apple Pay.
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
type:Type;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @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 card payments this will be the identifier provided by the gateway/card vault for the specific payment method resource.
|
|
49
|
+
**Note:** This is not the one time temporary token provided by gateways like Stripe.
|
|
50
|
+
|
|
51
|
+
*/
|
|
52
|
+
|
|
10
53
|
reference_id:string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @description Current status of the payment source. \* valid - A payment source that is valid and active. \* expiring - A payment source that is expiring (like card's status based on its expiry date). \* invalid - The billing agreement cannot be used. It might become valid again either automatically or due to customer action. \* pending_verification - The payment source needs to be verified \* expired - A payment source that has expired
|
|
57
|
+
|
|
58
|
+
*/
|
|
59
|
+
|
|
11
60
|
status:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
|
|
61
|
+
|
|
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
|
|
64
|
+
|
|
65
|
+
*/
|
|
66
|
+
|
|
12
67
|
gateway:Gateway;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @description The gateway account to which this payment source is stored with.
|
|
71
|
+
|
|
72
|
+
*/
|
|
73
|
+
|
|
13
74
|
gateway_account_id?:string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @description The IP address of the customer. Used primarily for referral integration and EU VAT validation.
|
|
78
|
+
|
|
79
|
+
*/
|
|
80
|
+
|
|
14
81
|
ip_address?:string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @description [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
|
|
85
|
+
|
|
86
|
+
*/
|
|
87
|
+
|
|
15
88
|
issuing_country?:string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @description Indicates that this resource has been deleted.
|
|
92
|
+
|
|
93
|
+
*/
|
|
94
|
+
|
|
16
95
|
deleted:boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) of this `payment_source`. This is always the same as the business entity of the [customer](/docs/api/payment_sources?prod_cat_ver=2#payment_source_customer_id).
|
|
99
|
+
|
|
100
|
+
*/
|
|
101
|
+
|
|
17
102
|
business_entity_id?:string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description Card details associated with this payment source.
|
|
106
|
+
|
|
107
|
+
*/
|
|
108
|
+
|
|
18
109
|
card?:PaymentSource.Card;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @description Bank account details the direct debit or ACH or NetBanking agreement/mandate created with this payment source.
|
|
113
|
+
|
|
114
|
+
*/
|
|
115
|
+
|
|
19
116
|
bank_account?:PaymentSource.BankAccount;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @description Boleto payment source details of the customer
|
|
120
|
+
|
|
121
|
+
*/
|
|
122
|
+
|
|
20
123
|
boleto?:PaymentSource.CustVoucherSource;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @description Billing address for the payment source.
|
|
127
|
+
|
|
128
|
+
*/
|
|
129
|
+
|
|
21
130
|
billing_address?:PaymentSource.BillingAddress;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @description Amazon payments details associated with this payment source.
|
|
134
|
+
|
|
135
|
+
*/
|
|
136
|
+
|
|
22
137
|
amazon_payment?:PaymentSource.AmazonPayment;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @description Represents the payment method that allows you to make payments directly using a bank account.
|
|
141
|
+
|
|
142
|
+
*/
|
|
143
|
+
|
|
23
144
|
upi?:PaymentSource.Upi;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @description PayPal Express Checkout details associated with this payment source.
|
|
148
|
+
|
|
149
|
+
*/
|
|
150
|
+
|
|
24
151
|
paypal?:PaymentSource.Paypal;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @description Mandate details associated with the payment source.
|
|
155
|
+
|
|
156
|
+
*/
|
|
157
|
+
|
|
25
158
|
mandates?:PaymentSource.Mandate[];
|
|
26
159
|
}
|
|
27
160
|
export namespace PaymentSource {
|
|
28
|
-
export class PaymentSourceResource {
|
|
161
|
+
export class PaymentSourceResource {
|
|
162
|
+
/**
|
|
163
|
+
* @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.
|
|
164
|
+
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
|
+
|
|
166
|
+
*/
|
|
167
|
+
|
|
29
168
|
create_using_permanent_token(input:CreateUsingPermanentTokenInputParam):ChargebeeRequest<CreateUsingPermanentTokenResponse>;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
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).
|
|
187
|
+
|
|
188
|
+
*/
|
|
189
|
+
|
|
30
190
|
delete(cust_payment_source_id:string):ChargebeeRequest<DeleteResponse>;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @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
|
+
|
|
195
|
+
*/
|
|
196
|
+
|
|
31
197
|
create_card(input:CreateCardInputParam):ChargebeeRequest<CreateCardResponse>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @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.
|
|
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".
|
|
203
|
+
|
|
204
|
+
*/
|
|
205
|
+
|
|
32
206
|
verify_bank_account(cust_payment_source_id:string, input:VerifyBankAccountInputParam):ChargebeeRequest<VerifyBankAccountResponse>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @description Lists all the payment sources
|
|
210
|
+
|
|
211
|
+
*/
|
|
212
|
+
|
|
33
213
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @description Copies this payment source information to the gateway specified in the API.
|
|
217
|
+
|
|
218
|
+
This is useful if you want to port your customer's card details into another gateway.
|
|
219
|
+
|
|
220
|
+
*/
|
|
221
|
+
|
|
34
222
|
export_payment_source(cust_payment_source_id:string, input:ExportPaymentSourceInputParam):ChargebeeRequest<ExportPaymentSourceResponse>;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @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.
|
|
226
|
+
|
|
227
|
+
*/
|
|
228
|
+
|
|
35
229
|
create_using_payment_intent(input:CreateUsingPaymentIntentInputParam):ChargebeeRequest<CreateUsingPaymentIntentResponse>;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @description Retrieves the payment source identified by the unique identifier.
|
|
233
|
+
|
|
234
|
+
*/
|
|
235
|
+
|
|
36
236
|
retrieve(cust_payment_source_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @description Create a voucher payment method for the payment source.
|
|
240
|
+
|
|
241
|
+
*/
|
|
242
|
+
|
|
37
243
|
create_voucher_payment_source(input:CreateVoucherPaymentSourceInputParam):ChargebeeRequest<CreateVoucherPaymentSourceResponse>;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @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).
|
|
247
|
+
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.
|
|
248
|
+
|
|
249
|
+
*/
|
|
250
|
+
|
|
38
251
|
create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @description Merchants look to update card details when:
|
|
255
|
+
|
|
256
|
+
* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.
|
|
257
|
+
* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).
|
|
258
|
+
|
|
259
|
+
Multiple parameters such as address, expiry date, month, and so on, can be updated through this API.
|
|
260
|
+
|
|
261
|
+
Meta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.
|
|
262
|
+
|
|
263
|
+
In **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee.
|
|
264
|
+
**Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html), [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html), [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html), and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html). For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) to update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\[billing_addr1\]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1) parameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) object.
|
|
265
|
+
|
|
266
|
+
*/
|
|
267
|
+
|
|
39
268
|
update_card(cust_payment_source_id:string, input?:UpdateCardInputParam):ChargebeeRequest<UpdateCardResponse>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @description Switches the gateway in which this payment source information is stored.
|
|
272
|
+
|
|
273
|
+
This is applicable only if the payment source is present in Spreedly vault.
|
|
274
|
+
|
|
275
|
+
*/
|
|
276
|
+
|
|
40
277
|
switch_gateway_account(cust_payment_source_id:string, input:SwitchGatewayAccountInputParam):ChargebeeRequest<SwitchGatewayAccountResponse>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @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.
|
|
281
|
+
|
|
282
|
+
*/
|
|
283
|
+
|
|
41
284
|
create_using_token(input:CreateUsingTokenInputParam):ChargebeeRequest<CreateUsingTokenResponse>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
288
|
+
|
|
289
|
+
*/
|
|
290
|
+
|
|
42
291
|
delete_local(cust_payment_source_id:string):ChargebeeRequest<DeleteLocalResponse>;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @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.
|
|
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
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
#### Single Euro Payment Area (SEPA)
|
|
310
|
+
|
|
311
|
+
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).
|
|
312
|
+
**Note:**
|
|
313
|
+
|
|
314
|
+
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api#user_details) such as IP address and device information.
|
|
315
|
+
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
316
|
+
|
|
317
|
+
#### Bacs Payment Schemes Limited (Bacs) and Bg Autogiro
|
|
318
|
+
|
|
319
|
+
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).
|
|
320
|
+
|
|
321
|
+
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
322
|
+
|
|
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
|
+
|
|
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
|
+
|
|
327
|
+
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.
|
|
328
|
+
|
|
329
|
+
*/
|
|
330
|
+
|
|
43
331
|
create_bank_account(input:CreateBankAccountInputParam):ChargebeeRequest<CreateBankAccountResponse>;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @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.
|
|
335
|
+
|
|
336
|
+
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
337
|
+
* For Stripe, Chargebee only supports SEPA.
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
*/
|
|
343
|
+
|
|
44
344
|
update_bank_account(cust_payment_source_id:string, input?:UpdateBankAccountInputParam):ChargebeeRequest<UpdateBankAccountResponse>;
|
|
45
345
|
}
|
|
46
|
-
export interface CreateUsingPermanentTokenResponse {
|
|
47
|
-
|
|
48
|
-
|
|
346
|
+
export interface CreateUsingPermanentTokenResponse {
|
|
347
|
+
/**
|
|
348
|
+
* @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.
|
|
349
|
+
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.
|
|
350
|
+
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
customer:Customer;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @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.
|
|
357
|
+
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.
|
|
358
|
+
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
payment_source:PaymentSource;
|
|
49
362
|
}
|
|
50
363
|
export interface CreateUsingPermanentTokenInputParam {
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
367
|
+
|
|
368
|
+
*/
|
|
369
|
+
|
|
51
370
|
customer_id:string;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @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. \* 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.
|
|
374
|
+
|
|
375
|
+
*/
|
|
376
|
+
|
|
52
377
|
type:Type;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* @description The gateway account to which the payment source is associated.
|
|
381
|
+
|
|
382
|
+
*/
|
|
383
|
+
|
|
53
384
|
gateway_account_id?:string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @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 card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:** This is not the one-time temporary token provided by gateways like Stripe.
|
|
388
|
+
|
|
389
|
+
*/
|
|
390
|
+
|
|
54
391
|
reference_id:string;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @description 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.
|
|
395
|
+
|
|
396
|
+
*/
|
|
397
|
+
|
|
55
398
|
issuing_country?:string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @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.
|
|
402
|
+
|
|
403
|
+
*/
|
|
404
|
+
|
|
56
405
|
replace_primary_payment_source?:boolean;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* @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://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
|
|
409
|
+
* `payer`: User related information.
|
|
410
|
+
* `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).
|
|
411
|
+
* `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.
|
|
412
|
+
* `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.
|
|
413
|
+
* `fraud`: Fraud identification related information.
|
|
414
|
+
* `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.
|
|
415
|
+
* `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.
|
|
416
|
+
* `fraud`: Fraud identification related information.
|
|
417
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
418
|
+
* `fraud_merchant_id`: Your merchant ID for fraud detection.
|
|
419
|
+
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
420
|
+
* `fraud`: Fraud identification related information.
|
|
421
|
+
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
422
|
+
.
|
|
423
|
+
|
|
424
|
+
*/
|
|
425
|
+
|
|
57
426
|
additional_information?:object;
|
|
58
427
|
}
|
|
59
|
-
export interface DeleteResponse {
|
|
60
|
-
|
|
61
|
-
|
|
428
|
+
export interface DeleteResponse {
|
|
429
|
+
/**
|
|
430
|
+
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
431
|
+
|
|
432
|
+
* **Deleted payment source is Primary, and Backup is available**
|
|
433
|
+
* The Backup payment source will become the Primary payment source.
|
|
434
|
+
* **Deleted payment source is Primary, and no Backup is available**
|
|
435
|
+
* 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*.
|
|
436
|
+
|
|
437
|
+
* 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.
|
|
438
|
+
* **Deleted payment source is attached to subscriptions**
|
|
439
|
+
* 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.
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
444
|
+
**Note** :
|
|
445
|
+
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).
|
|
446
|
+
|
|
447
|
+
*/
|
|
448
|
+
|
|
449
|
+
customer:Customer;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* @description Deletes a payment source. Once the payment source is deleted, if
|
|
453
|
+
|
|
454
|
+
* **Deleted payment source is Primary, and Backup is available**
|
|
455
|
+
* The Backup payment source will become the Primary payment source.
|
|
456
|
+
* **Deleted payment source is Primary, and no Backup is available**
|
|
457
|
+
* 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*.
|
|
458
|
+
|
|
459
|
+
* 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.
|
|
460
|
+
* **Deleted payment source is attached to subscriptions**
|
|
461
|
+
* 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.
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
If there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error.
|
|
466
|
+
**Note** :
|
|
467
|
+
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).
|
|
468
|
+
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
payment_source:PaymentSource;
|
|
62
472
|
}
|
|
63
473
|
|
|
64
|
-
export interface CreateCardResponse {
|
|
65
|
-
|
|
66
|
-
|
|
474
|
+
export interface CreateCardResponse {
|
|
475
|
+
/**
|
|
476
|
+
* @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.
|
|
477
|
+
|
|
478
|
+
*/
|
|
479
|
+
|
|
480
|
+
customer:Customer;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* @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.
|
|
484
|
+
|
|
485
|
+
*/
|
|
486
|
+
|
|
487
|
+
payment_source:PaymentSource;
|
|
67
488
|
}
|
|
68
489
|
export interface CreateCardInputParam {
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
493
|
+
|
|
494
|
+
*/
|
|
495
|
+
|
|
69
496
|
customer_id:string;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* @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.
|
|
500
|
+
|
|
501
|
+
*/
|
|
502
|
+
|
|
70
503
|
replace_primary_payment_source?:boolean;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* @description Parameters for card
|
|
507
|
+
|
|
508
|
+
*/
|
|
509
|
+
|
|
71
510
|
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};
|
|
72
511
|
}
|
|
73
|
-
export interface VerifyBankAccountResponse {
|
|
74
|
-
|
|
512
|
+
export interface VerifyBankAccountResponse {
|
|
513
|
+
/**
|
|
514
|
+
* @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.
|
|
515
|
+
|
|
516
|
+
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".
|
|
517
|
+
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
payment_source:PaymentSource;
|
|
75
521
|
}
|
|
76
522
|
export interface VerifyBankAccountInputParam {
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @description Value of the micro-deposits sent to the bank account.
|
|
526
|
+
|
|
527
|
+
*/
|
|
528
|
+
|
|
77
529
|
amount1:number;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @description Value of the micro-deposits sent to the bank account.
|
|
533
|
+
|
|
534
|
+
*/
|
|
535
|
+
|
|
78
536
|
amount2:number;
|
|
79
537
|
}
|
|
80
|
-
export interface ListResponse {
|
|
81
|
-
|
|
82
|
-
|
|
538
|
+
export interface ListResponse {
|
|
539
|
+
/**
|
|
540
|
+
* @description Lists all the payment sources
|
|
541
|
+
|
|
542
|
+
*/
|
|
543
|
+
|
|
544
|
+
list:{payment_source:PaymentSource}[];
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @description Lists all the payment sources
|
|
548
|
+
|
|
549
|
+
*/
|
|
550
|
+
|
|
551
|
+
next_offset?:string;
|
|
83
552
|
}
|
|
84
553
|
export interface ListInputParam {
|
|
85
|
-
[key : string]: any;
|
|
554
|
+
[key : string]: any;
|
|
555
|
+
/**
|
|
556
|
+
* @description The number of resources to be returned.
|
|
557
|
+
|
|
558
|
+
*/
|
|
559
|
+
|
|
86
560
|
limit?:number;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
564
|
+
|
|
565
|
+
*/
|
|
566
|
+
|
|
87
567
|
offset?:string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* @description Lists all the payment sources
|
|
571
|
+
|
|
572
|
+
*/
|
|
573
|
+
|
|
88
574
|
subscription_id?:string;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* @description Lists all the payment sources
|
|
578
|
+
|
|
579
|
+
*/
|
|
580
|
+
|
|
89
581
|
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* @description Type of payment source
|
|
585
|
+
|
|
586
|
+
*/
|
|
587
|
+
|
|
90
588
|
type?:{in?:string,is?:'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card',is_not?:'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card',not_in?:string};
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* @description Current status of the payment source.
|
|
592
|
+
|
|
593
|
+
*/
|
|
594
|
+
|
|
91
595
|
status?:{in?:string,is?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',is_not?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification',not_in?:string};
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @description Timestamp indicating when this payment source resource was last updated.
|
|
599
|
+
|
|
600
|
+
*/
|
|
601
|
+
|
|
92
602
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* @description Timestamp indicating when this payment source resource is created.
|
|
606
|
+
|
|
607
|
+
*/
|
|
608
|
+
|
|
93
609
|
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @description Lists all the payment sources
|
|
613
|
+
|
|
614
|
+
*/
|
|
615
|
+
|
|
94
616
|
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
95
617
|
}
|
|
96
|
-
export interface ExportPaymentSourceResponse {
|
|
97
|
-
|
|
618
|
+
export interface ExportPaymentSourceResponse {
|
|
619
|
+
/**
|
|
620
|
+
* @description Copies this payment source information to the gateway specified in the API.
|
|
621
|
+
|
|
622
|
+
This is useful if you want to port your customer's card details into another gateway.
|
|
623
|
+
|
|
624
|
+
*/
|
|
625
|
+
|
|
626
|
+
third_party_payment_method:ThirdPartyPaymentMethod;
|
|
98
627
|
}
|
|
99
628
|
export interface ExportPaymentSourceInputParam {
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @description The gateway account you want to copy the card.
|
|
632
|
+
|
|
633
|
+
*/
|
|
634
|
+
|
|
100
635
|
gateway_account_id:string;
|
|
101
636
|
}
|
|
102
|
-
export interface CreateUsingPaymentIntentResponse {
|
|
103
|
-
|
|
104
|
-
|
|
637
|
+
export interface CreateUsingPaymentIntentResponse {
|
|
638
|
+
/**
|
|
639
|
+
* @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.
|
|
640
|
+
|
|
641
|
+
*/
|
|
642
|
+
|
|
643
|
+
customer:Customer;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* @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.
|
|
647
|
+
|
|
648
|
+
*/
|
|
649
|
+
|
|
650
|
+
payment_source:PaymentSource;
|
|
105
651
|
}
|
|
106
652
|
export interface CreateUsingPaymentIntentInputParam {
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
656
|
+
|
|
657
|
+
*/
|
|
658
|
+
|
|
107
659
|
customer_id:string;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* @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.
|
|
663
|
+
|
|
664
|
+
*/
|
|
665
|
+
|
|
108
666
|
replace_primary_payment_source?:boolean;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* @description Parameters for payment_intent
|
|
670
|
+
|
|
671
|
+
*/
|
|
672
|
+
|
|
109
673
|
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};
|
|
110
674
|
}
|
|
111
|
-
export interface RetrieveResponse {
|
|
112
|
-
|
|
675
|
+
export interface RetrieveResponse {
|
|
676
|
+
/**
|
|
677
|
+
* @description Retrieves the payment source identified by the unique identifier.
|
|
678
|
+
|
|
679
|
+
*/
|
|
680
|
+
|
|
681
|
+
payment_source:PaymentSource;
|
|
113
682
|
}
|
|
114
683
|
|
|
115
|
-
export interface CreateVoucherPaymentSourceResponse {
|
|
116
|
-
|
|
117
|
-
|
|
684
|
+
export interface CreateVoucherPaymentSourceResponse {
|
|
685
|
+
/**
|
|
686
|
+
* @description Create a voucher payment method for the payment source.
|
|
687
|
+
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
customer:Customer;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @description Create a voucher payment method for the payment source.
|
|
694
|
+
|
|
695
|
+
*/
|
|
696
|
+
|
|
697
|
+
payment_source:PaymentSource;
|
|
118
698
|
}
|
|
119
699
|
export interface CreateVoucherPaymentSourceInputParam {
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
703
|
+
|
|
704
|
+
*/
|
|
705
|
+
|
|
120
706
|
customer_id:string;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* @description Parameters for voucher_payment_source
|
|
710
|
+
|
|
711
|
+
*/
|
|
712
|
+
|
|
121
713
|
voucher_payment_source?:{billing_address?:object,gateway_account_id?:string,tax_id?:string,voucher_type:VoucherType};
|
|
122
714
|
}
|
|
123
|
-
export interface CreateUsingTempTokenResponse {
|
|
124
|
-
|
|
125
|
-
|
|
715
|
+
export interface CreateUsingTempTokenResponse {
|
|
716
|
+
/**
|
|
717
|
+
* @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).
|
|
718
|
+
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.
|
|
719
|
+
|
|
720
|
+
*/
|
|
721
|
+
|
|
722
|
+
customer:Customer;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* @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).
|
|
726
|
+
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.
|
|
727
|
+
|
|
728
|
+
*/
|
|
729
|
+
|
|
730
|
+
payment_source:PaymentSource;
|
|
126
731
|
}
|
|
127
732
|
export interface CreateUsingTempTokenInputParam {
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
736
|
+
|
|
737
|
+
*/
|
|
738
|
+
|
|
128
739
|
customer_id:string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* @description The gateway account to which the payment source is associated.
|
|
743
|
+
|
|
744
|
+
*/
|
|
745
|
+
|
|
129
746
|
gateway_account_id?:string;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @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.
|
|
750
|
+
|
|
751
|
+
*/
|
|
752
|
+
|
|
130
753
|
type:Type;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* @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.
|
|
757
|
+
|
|
758
|
+
*/
|
|
759
|
+
|
|
131
760
|
tmp_token:string;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* @description 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.
|
|
764
|
+
|
|
765
|
+
*/
|
|
766
|
+
|
|
132
767
|
issuing_country?:string;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* @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.
|
|
771
|
+
|
|
772
|
+
*/
|
|
773
|
+
|
|
133
774
|
replace_primary_payment_source?:boolean;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @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://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
|
|
778
|
+
* `payer`: User related information.
|
|
779
|
+
* `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).
|
|
780
|
+
* `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.
|
|
781
|
+
* `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.
|
|
782
|
+
* `fraud`: Fraud identification related information.
|
|
783
|
+
* `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.
|
|
784
|
+
* `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.
|
|
785
|
+
* `fraud`: Fraud identification related information.
|
|
786
|
+
* `device_session_id`: Session ID associated with the user's device.
|
|
787
|
+
* `fraud_merchant_id`: Your merchant ID for fraud detection.
|
|
788
|
+
* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
|
|
789
|
+
* `fraud`: Fraud identification related information.
|
|
790
|
+
* `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
|
|
791
|
+
.
|
|
792
|
+
|
|
793
|
+
*/
|
|
794
|
+
|
|
134
795
|
additional_information?:object;
|
|
135
796
|
}
|
|
136
|
-
export interface UpdateCardResponse {
|
|
137
|
-
|
|
138
|
-
|
|
797
|
+
export interface UpdateCardResponse {
|
|
798
|
+
/**
|
|
799
|
+
* @description Merchants look to update card details when:
|
|
800
|
+
|
|
801
|
+
* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.
|
|
802
|
+
* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).
|
|
803
|
+
|
|
804
|
+
Multiple parameters such as address, expiry date, month, and so on, can be updated through this API.
|
|
805
|
+
|
|
806
|
+
Meta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.
|
|
807
|
+
|
|
808
|
+
In **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee.
|
|
809
|
+
**Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html), [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html), [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html), and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html). For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) to update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\[billing_addr1\]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1) parameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) object.
|
|
810
|
+
|
|
811
|
+
*/
|
|
812
|
+
|
|
813
|
+
customer:Customer;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* @description Merchants look to update card details when:
|
|
817
|
+
|
|
818
|
+
* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.
|
|
819
|
+
* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).
|
|
820
|
+
|
|
821
|
+
Multiple parameters such as address, expiry date, month, and so on, can be updated through this API.
|
|
822
|
+
|
|
823
|
+
Meta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.
|
|
824
|
+
|
|
825
|
+
In **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee.
|
|
826
|
+
**Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html), [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html), [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html), and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html). For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) to update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\[billing_addr1\]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1) parameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name) object.
|
|
827
|
+
|
|
828
|
+
*/
|
|
829
|
+
|
|
830
|
+
payment_source:PaymentSource;
|
|
139
831
|
}
|
|
140
832
|
export interface UpdateCardInputParam {
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* @description Additional data about this resource can be passed to **Stripe** gateway here in the JSON Format. This will be stored along with payment source at the gateway account.
|
|
836
|
+
|
|
837
|
+
*/
|
|
838
|
+
|
|
141
839
|
gateway_meta_data?:object;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* @description Reference transaction is used for future purchases. This is only applicable for Vantiv.
|
|
843
|
+
|
|
844
|
+
*/
|
|
845
|
+
|
|
142
846
|
reference_transaction?:string;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @description Parameters for card
|
|
850
|
+
|
|
851
|
+
*/
|
|
852
|
+
|
|
143
853
|
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};
|
|
144
854
|
}
|
|
145
|
-
export interface SwitchGatewayAccountResponse {
|
|
146
|
-
|
|
147
|
-
|
|
855
|
+
export interface SwitchGatewayAccountResponse {
|
|
856
|
+
/**
|
|
857
|
+
* @description Switches the gateway in which this payment source information is stored.
|
|
858
|
+
|
|
859
|
+
This is applicable only if the payment source is present in Spreedly vault.
|
|
860
|
+
|
|
861
|
+
*/
|
|
862
|
+
|
|
863
|
+
customer:Customer;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* @description Switches the gateway in which this payment source information is stored.
|
|
867
|
+
|
|
868
|
+
This is applicable only if the payment source is present in Spreedly vault.
|
|
869
|
+
|
|
870
|
+
*/
|
|
871
|
+
|
|
872
|
+
payment_source:PaymentSource;
|
|
148
873
|
}
|
|
149
874
|
export interface SwitchGatewayAccountInputParam {
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* @description The gateway account you want to switch to.
|
|
878
|
+
|
|
879
|
+
*/
|
|
880
|
+
|
|
150
881
|
gateway_account_id:string;
|
|
151
882
|
}
|
|
152
|
-
export interface CreateUsingTokenResponse {
|
|
153
|
-
|
|
154
|
-
|
|
883
|
+
export interface CreateUsingTokenResponse {
|
|
884
|
+
/**
|
|
885
|
+
* @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.
|
|
886
|
+
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
customer:Customer;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* @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.
|
|
893
|
+
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
payment_source:PaymentSource;
|
|
155
897
|
}
|
|
156
898
|
export interface CreateUsingTokenInputParam {
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
902
|
+
|
|
903
|
+
*/
|
|
904
|
+
|
|
157
905
|
customer_id:string;
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* @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.
|
|
909
|
+
|
|
910
|
+
*/
|
|
911
|
+
|
|
158
912
|
replace_primary_payment_source?:boolean;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @description Token generated by Chargebee JS representing payment method details.
|
|
916
|
+
|
|
917
|
+
*/
|
|
918
|
+
|
|
159
919
|
token_id:string;
|
|
160
920
|
}
|
|
161
|
-
export interface DeleteLocalResponse {
|
|
162
|
-
|
|
163
|
-
|
|
921
|
+
export interface DeleteLocalResponse {
|
|
922
|
+
/**
|
|
923
|
+
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
924
|
+
|
|
925
|
+
*/
|
|
926
|
+
|
|
927
|
+
customer:Customer;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* @description Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.
|
|
931
|
+
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
payment_source:PaymentSource;
|
|
164
935
|
}
|
|
165
936
|
|
|
166
|
-
export interface CreateBankAccountResponse {
|
|
167
|
-
|
|
168
|
-
|
|
937
|
+
export interface CreateBankAccountResponse {
|
|
938
|
+
/**
|
|
939
|
+
* @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.
|
|
940
|
+
|
|
941
|
+
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
942
|
+
|
|
943
|
+
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).
|
|
944
|
+
|
|
945
|
+
##### Bank account verification
|
|
946
|
+
|
|
947
|
+
Once the bank account has been added, it needs to be verified.
|
|
948
|
+
|
|
949
|
+
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
950
|
+
* 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.
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
#### Single Euro Payment Area (SEPA)
|
|
955
|
+
|
|
956
|
+
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).
|
|
957
|
+
**Note:**
|
|
958
|
+
|
|
959
|
+
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api#user_details) such as IP address and device information.
|
|
960
|
+
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
961
|
+
|
|
962
|
+
#### Bacs Payment Schemes Limited (Bacs) and Bg Autogiro
|
|
963
|
+
|
|
964
|
+
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).
|
|
965
|
+
|
|
966
|
+
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
967
|
+
|
|
968
|
+
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.
|
|
969
|
+
|
|
970
|
+
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).
|
|
971
|
+
|
|
972
|
+
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.
|
|
973
|
+
|
|
974
|
+
*/
|
|
975
|
+
|
|
976
|
+
customer:Customer;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* @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.
|
|
980
|
+
|
|
981
|
+
#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)
|
|
982
|
+
|
|
983
|
+
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).
|
|
984
|
+
|
|
985
|
+
##### Bank account verification
|
|
986
|
+
|
|
987
|
+
Once the bank account has been added, it needs to be verified.
|
|
988
|
+
|
|
989
|
+
* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).
|
|
990
|
+
* 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.
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
#### Single Euro Payment Area (SEPA)
|
|
995
|
+
|
|
996
|
+
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).
|
|
997
|
+
**Note:**
|
|
998
|
+
|
|
999
|
+
* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api#user_details) such as IP address and device information.
|
|
1000
|
+
* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.
|
|
1001
|
+
|
|
1002
|
+
#### Bacs Payment Schemes Limited (Bacs) and Bg Autogiro
|
|
1003
|
+
|
|
1004
|
+
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).
|
|
1005
|
+
|
|
1006
|
+
#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
|
|
1007
|
+
|
|
1008
|
+
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.
|
|
1009
|
+
|
|
1010
|
+
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).
|
|
1011
|
+
|
|
1012
|
+
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.
|
|
1013
|
+
|
|
1014
|
+
*/
|
|
1015
|
+
|
|
1016
|
+
payment_source:PaymentSource;
|
|
169
1017
|
}
|
|
170
1018
|
export interface CreateBankAccountInputParam {
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* @description Identifier of the customer with whom this payment source is associated.
|
|
1022
|
+
|
|
1023
|
+
*/
|
|
1024
|
+
|
|
171
1025
|
customer_id:string;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* @description 2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN.
|
|
1029
|
+
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
172
1032
|
issuing_country?:string;
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* @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.
|
|
1036
|
+
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
173
1039
|
replace_primary_payment_source?:boolean;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* @description Parameters for bank_account
|
|
1043
|
+
|
|
1044
|
+
*/
|
|
1045
|
+
|
|
174
1046
|
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};
|
|
175
1047
|
}
|
|
176
|
-
export interface UpdateBankAccountResponse {
|
|
177
|
-
|
|
178
|
-
|
|
1048
|
+
export interface UpdateBankAccountResponse {
|
|
1049
|
+
/**
|
|
1050
|
+
* @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.
|
|
1051
|
+
|
|
1052
|
+
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
1053
|
+
* For Stripe, Chargebee only supports SEPA.
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
*/
|
|
1059
|
+
|
|
1060
|
+
customer:Customer;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @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.
|
|
1064
|
+
|
|
1065
|
+
* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).
|
|
1066
|
+
* For Stripe, Chargebee only supports SEPA.
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
*/
|
|
1072
|
+
|
|
1073
|
+
payment_source:PaymentSource;
|
|
179
1074
|
}
|
|
180
1075
|
export interface UpdateBankAccountInputParam {
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* @description Parameters for bank_account
|
|
1079
|
+
|
|
1080
|
+
*/
|
|
1081
|
+
|
|
181
1082
|
bank_account?:{email?:string,first_name?:string,last_name?:string};
|
|
182
1083
|
}
|
|
183
|
-
export interface Card {
|
|
1084
|
+
export interface Card {
|
|
1085
|
+
/**
|
|
1086
|
+
* @description Cardholder's first name
|
|
1087
|
+
|
|
1088
|
+
*/
|
|
1089
|
+
|
|
184
1090
|
first_name?:string;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* @description Cardholder's last name
|
|
1094
|
+
|
|
1095
|
+
*/
|
|
1096
|
+
|
|
185
1097
|
last_name?:string;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* @description The Issuer Identification Number, i.e. the first six digits of the card number
|
|
1101
|
+
|
|
1102
|
+
*/
|
|
1103
|
+
|
|
186
1104
|
iin?:string;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @description Last four digits of the card number
|
|
1108
|
+
|
|
1109
|
+
*/
|
|
1110
|
+
|
|
187
1111
|
last4?:string;
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* @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.
|
|
1115
|
+
|
|
1116
|
+
*/
|
|
1117
|
+
|
|
188
1118
|
brand?:'discover' | 'other' | 'bancontact' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* @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
|
|
1122
|
+
|
|
1123
|
+
*/
|
|
1124
|
+
|
|
189
1125
|
funding_type?:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* @description Card expiry month.
|
|
1129
|
+
|
|
1130
|
+
*/
|
|
1131
|
+
|
|
190
1132
|
expiry_month?:number;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* @description Card expiry year.
|
|
1136
|
+
|
|
1137
|
+
*/
|
|
1138
|
+
|
|
191
1139
|
expiry_year?:number;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* @description Address line 1, as available in card billing address.
|
|
1143
|
+
|
|
1144
|
+
*/
|
|
1145
|
+
|
|
192
1146
|
billing_addr1?:string;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* @description Address line 2, as available in card billing address.
|
|
1150
|
+
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
193
1153
|
billing_addr2?:string;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* @description City, as available in card billing address.
|
|
1157
|
+
|
|
1158
|
+
*/
|
|
1159
|
+
|
|
194
1160
|
billing_city?:string;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
1164
|
+
|
|
1165
|
+
*/
|
|
1166
|
+
|
|
195
1167
|
billing_state_code?:string;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* @description The state/province name.
|
|
1171
|
+
|
|
1172
|
+
*/
|
|
1173
|
+
|
|
196
1174
|
billing_state?:string;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
1178
|
+
|
|
1179
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1180
|
+
|
|
1181
|
+
**Brexit**
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
1185
|
+
|
|
1186
|
+
*/
|
|
1187
|
+
|
|
197
1188
|
billing_country?:string;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* @description Postal or Zip code, as available in card billing address.
|
|
1192
|
+
|
|
1193
|
+
*/
|
|
1194
|
+
|
|
198
1195
|
billing_zip?:string;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* @description Masked credit card number that is safe to show.
|
|
1199
|
+
|
|
1200
|
+
*/
|
|
1201
|
+
|
|
199
1202
|
masked_number?:string;
|
|
200
1203
|
}
|
|
201
|
-
export interface BankAccount {
|
|
1204
|
+
export interface BankAccount {
|
|
1205
|
+
/**
|
|
1206
|
+
* @description Last four digits of the bank account number
|
|
1207
|
+
|
|
1208
|
+
*/
|
|
1209
|
+
|
|
202
1210
|
last4?:string;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* @description Account holder's name as per bank account.
|
|
1214
|
+
|
|
1215
|
+
*/
|
|
1216
|
+
|
|
203
1217
|
name_on_account?:string;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* @description Account holder's first name as per bank account.
|
|
1221
|
+
|
|
1222
|
+
*/
|
|
1223
|
+
|
|
204
1224
|
first_name?:string;
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* @description Account holder's last name as per bank account.
|
|
1228
|
+
|
|
1229
|
+
*/
|
|
1230
|
+
|
|
205
1231
|
last_name?:string;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* @description Name of account holder's bank.
|
|
1235
|
+
|
|
1236
|
+
*/
|
|
1237
|
+
|
|
206
1238
|
bank_name?:string;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* @description Mandate Id. Applicable for SEPA, BACS, Autogiro, and BECS.
|
|
1242
|
+
|
|
1243
|
+
*/
|
|
1244
|
+
|
|
207
1245
|
mandate_id?:string;
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* @description Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. \* checking - Checking Account \* business_checking - Business Checking Account \* savings - Savings Account \* current - Current Account
|
|
1249
|
+
|
|
1250
|
+
*/
|
|
1251
|
+
|
|
208
1252
|
account_type?:AccountType;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* @description For Authorize.net ACH users only. Indicates the type of eCheck. \* ppd - Payment Authorization is prearranged between the customer and the merchant. \* web - Payment Authorization obtained from the customer via the internet. \* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.
|
|
1256
|
+
|
|
1257
|
+
*/
|
|
1258
|
+
|
|
209
1259
|
echeck_type?:EcheckType;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* @description For Stripe ACH users only. Indicates the account holder type. \* company - Company Account. \* individual - Individual Account.
|
|
1263
|
+
|
|
1264
|
+
*/
|
|
1265
|
+
|
|
210
1266
|
account_holder_type?:AccountHolderType;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* @description Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address.
|
|
1270
|
+
|
|
1271
|
+
*/
|
|
1272
|
+
|
|
211
1273
|
email?:string;
|
|
212
1274
|
}
|
|
213
|
-
export interface CustVoucherSource {
|
|
1275
|
+
export interface CustVoucherSource {
|
|
1276
|
+
/**
|
|
1277
|
+
* @description Last four digits of unique id for voucher payment source ex: tax_id
|
|
1278
|
+
|
|
1279
|
+
*/
|
|
1280
|
+
|
|
214
1281
|
last4?:string;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* @description Customer first name as per voucher payment source.
|
|
1285
|
+
|
|
1286
|
+
*/
|
|
1287
|
+
|
|
215
1288
|
first_name?:string;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* @description Customer last name as per voucher payment source.
|
|
1292
|
+
|
|
1293
|
+
*/
|
|
1294
|
+
|
|
216
1295
|
last_name?:string;
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* @description Email address associated Customer's voucher payment source.
|
|
1299
|
+
|
|
1300
|
+
*/
|
|
1301
|
+
|
|
217
1302
|
email?:string;
|
|
218
1303
|
}
|
|
219
|
-
export interface BillingAddress {
|
|
1304
|
+
export interface BillingAddress {
|
|
1305
|
+
/**
|
|
1306
|
+
* @description The first name of the billing contact.
|
|
1307
|
+
|
|
1308
|
+
*/
|
|
1309
|
+
|
|
220
1310
|
first_name?:string;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @description The last name of the billing contact.
|
|
1314
|
+
|
|
1315
|
+
*/
|
|
1316
|
+
|
|
221
1317
|
last_name?:string;
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* @description The email address.
|
|
1321
|
+
|
|
1322
|
+
*/
|
|
1323
|
+
|
|
222
1324
|
email?:string;
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* @description The company name.
|
|
1328
|
+
|
|
1329
|
+
*/
|
|
1330
|
+
|
|
223
1331
|
company?:string;
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* @description The phone number.
|
|
1335
|
+
|
|
1336
|
+
*/
|
|
1337
|
+
|
|
224
1338
|
phone?:string;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* @description Address line 1
|
|
1342
|
+
|
|
1343
|
+
*/
|
|
1344
|
+
|
|
225
1345
|
line1?:string;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* @description Address line 2
|
|
1349
|
+
|
|
1350
|
+
*/
|
|
1351
|
+
|
|
226
1352
|
line2?:string;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* @description Address line 3
|
|
1356
|
+
|
|
1357
|
+
*/
|
|
1358
|
+
|
|
227
1359
|
line3?:string;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* @description The name of the city.
|
|
1363
|
+
|
|
1364
|
+
*/
|
|
1365
|
+
|
|
228
1366
|
city?:string;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
1370
|
+
|
|
1371
|
+
*/
|
|
1372
|
+
|
|
229
1373
|
state_code?:string;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* @description State or Province
|
|
1377
|
+
|
|
1378
|
+
*/
|
|
1379
|
+
|
|
230
1380
|
state?:string;
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
1384
|
+
|
|
1385
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1386
|
+
|
|
1387
|
+
**Brexit**
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
1391
|
+
|
|
1392
|
+
*/
|
|
1393
|
+
|
|
231
1394
|
country?:string;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address).
|
|
1398
|
+
|
|
1399
|
+
*/
|
|
1400
|
+
|
|
232
1401
|
zip?:string;
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @description The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
|
|
1405
|
+
|
|
1406
|
+
*/
|
|
1407
|
+
|
|
233
1408
|
validation_status?:ValidationStatus;
|
|
234
1409
|
}
|
|
235
|
-
export interface AmazonPayment {
|
|
1410
|
+
export interface AmazonPayment {
|
|
1411
|
+
/**
|
|
1412
|
+
* @description Email address associated with Amazon payment account
|
|
1413
|
+
|
|
1414
|
+
*/
|
|
1415
|
+
|
|
236
1416
|
email?:string;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @description Billing agreement id
|
|
1420
|
+
|
|
1421
|
+
*/
|
|
1422
|
+
|
|
237
1423
|
agreement_id?:string;
|
|
238
1424
|
}
|
|
239
|
-
export interface Upi {
|
|
1425
|
+
export interface Upi {
|
|
1426
|
+
/**
|
|
1427
|
+
* @description A unique identifier mapped with an individuals bank account to help UPI track the account.
|
|
1428
|
+
|
|
1429
|
+
*/
|
|
1430
|
+
|
|
240
1431
|
vpa?:string;
|
|
241
1432
|
}
|
|
242
|
-
export interface Paypal {
|
|
1433
|
+
export interface Paypal {
|
|
1434
|
+
/**
|
|
1435
|
+
* @description Email address associated with PayPal Express Checkout
|
|
1436
|
+
|
|
1437
|
+
*/
|
|
1438
|
+
|
|
243
1439
|
email?:string;
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* @description Billing agreement id
|
|
1443
|
+
|
|
1444
|
+
*/
|
|
1445
|
+
|
|
244
1446
|
agreement_id?:string;
|
|
245
1447
|
}
|
|
246
|
-
export interface Mandate {
|
|
1448
|
+
export interface Mandate {
|
|
247
1449
|
id?:string;
|
|
1450
|
+
|
|
248
1451
|
subscription_id?:string;
|
|
1452
|
+
|
|
249
1453
|
created_at?:number;
|
|
250
1454
|
}
|
|
251
1455
|
}
|