POST /payment_sources/create_bank_account
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.
Automated Clearing House (ACH) Network
ACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via Stripe , Authorize.Net, and GoCardless.
Note:
- For ACH via Stripe, it is mandatory to pass user details such as IP address(
chargebee-request-origin-ip
) and the device information(chargebee-request-origin-device
).
Bank account verification
Once the bank account has been added, it needs to be verified.
- For Stripe, perform this verification using the Verify bank account payment source API.
- For 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.
Single Euro Payment Area (SEPA)
SEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via GoCardless, Stripe and Adyen.
Note:
- For SEPA via Stripe, it is mandatory to pass user details such as IP address and device information.
- For GoCardless, local bank details can be passed instead of IBAN.
Bacs Payment Schemes Limited (BACS) and Bg Autogiro
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.
Note:
- For BACS via Stripe, it is mandatory to pass user details such as IP address(
chargebee-request-origin-ip
) and the device information(chargebee-request-origin-device
).
Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)
BECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. GoCardless supports both.
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.
If the customer has already reached the payment source limit allowed for the site, pass replace_primary_payment_source
as true
. Alternatively, delete one of the payment sources first and then add the bank account payment source for the customer.
Note:
- For BECS via Stripe, it is mandatory to pass user details such as IP address(
chargebee-request-origin-ip
) and the device information(chargebee-request-origin-device
).
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Request headers
Name | Type | Required | Description |
---|---|---|---|
chargebee-request-origin-device |
String | No |
The device from which the customer has made the request |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
chargebee-event-webhook |
String | No |
skip only webhooks Possible values:
|
chargebee-business-entity-id |
String | No |
If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. |
chargebee-event-actions |
String | No |
skip all actions to be done on the events Possible values:
|
chargebee-request-origin-user |
String | No |
The email address of your customer/user. Use this when the email address has only ASCII characters. |
chargebee-request-origin-ip |
String | No |
The IP address of the customer where the request originated |
chargebee-request-origin-user-encoded |
String | No |
The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header |
chargebee-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
customer_id |
String | Yes |
Identifier of the customer with whom this payment source is associated. |
issuing_country |
String | No |
2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN. |
bank_account |
Object | No |
Parameters for bank_account |
bank_account.first_name |
String | No |
Account holder's first name as per bank account. If not passed, details from customer details will be considered. |
bank_account.swedish_identity_number |
String | No |
For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set. |
bank_account.iban |
String | No |
Account holder's International Bank Account Number. For the GoCardless platform, this can be the local bank details |
bank_account.account_number |
String | No |
Account holder's bank account number. |
bank_account.account_type |
String | No |
Represents the account type used to create a payment source. Available for Authorize.net ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. * current - Current Account * savings - Savings Account * checking - Checking Account * business_checking - Business Checking Account Possible values:
|
bank_account.email |
String | No |
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. |
bank_account.last_name |
String | No |
Account holder's last name as per bank account. If not passed, details from customer details will be considered. |
bank_account.bank_code |
String | No |
Indicates the bank code. |
bank_account.company |
String | No |
Account holder's company name as per bank account. If not passed, details from customer details will be considered. |
bank_account.bank_name |
String | No |
Name of account holder's bank. |
bank_account.gateway_account_id |
String | No |
The gateway account in which this payment source is stored. |
bank_account.phone |
String | No |
Phone number of the account holder that is linked to the bank account. |
bank_account.routing_number |
String | No |
Bank account routing number. |
bank_account.account_holder_type |
String | No |
For Stripe ACH users only. Indicates the account holder type. * company - Company Account. * individual - Individual Account. Possible values:
|
bank_account.echeck_type |
String | No |
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. Possible values:
|
bank_account.billing_address |
Object | No |
The billing address associated with the bank account. The value is a JSON object with the following keys and their values: * `first_name`:(string, max chars=150) The first name of the contact. * `last_name`:(string, max chars=150) The last name of the contact. * `company_name`:(string, max chars=250) The company name for the address. * `line1`:(string, max chars=180) The first line of the address. * `line2`:(string, max chars=180) The second line of the address. * `country`:(string) The name of the country for the address. * `country_code`:(string, max chars=50) The two-letter, [ISO 3166 alpha-2](https://www.iso.org/iso-3166-country-codes.html) country code for the address. * `state`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, and India. * `state_code`:(string, max chars=50) The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is 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)`. * `city`:(string, max chars=50) The city name for the address. * `postal_code`:(string, max chars=20) The postal or ZIP code for the address. * `phone`:(string, max chars=50) The contact phone number for the address. * `email`:(string, max chars=70) The contact email address for the address. |
replace_primary_payment_source |
Boolean | No |
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. Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.