For new and existing customer on Stripe, you can use the API to send bank account details across to Chargebee. There are two ways to do so: with a reference ID or with Stripe’s temporary token.
Adding a bank account using reference_id
If you have customers’ bank information already stored on Stripe, you can pass it along to Chargebee with the following API calls:
-Update payment method for a customer
Note:
1) Both API calls require you to set the direct debit field to 'true': allow_direct_debit=true. Failing to do so will throw a 'Direct Debit is not
supported for this operation' error.
2) Both API calls make use of the customer’s reference_id. A reference_id in Stripe consists of a combination of Stripe Customer ID and Stripe Bank Account ID separated by forward slash (e.g.cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW).
The workflow is simple: sending the reference_id to Chargebee via the API call will allow Chargebee to retrieve bank account information associated with the id from Stripe and create a customer/update the customer’s payment method.
The account can be verified on either the Stripe or the Chargebee web interface after it is added on Chargebee, in case it hasn’t been verified yet. If the reference_id you are passing is associated with an invalid bank account (a bank account that is accompanied by a verification_failed or errored status on Stripe), it will not be added on Chargebee.
Adding a bank account using tmp_token
If you are using stripe.js or plaid.js on your end, you can pass Stripe’s temporary token to Chargebee with the following API calls:
-Update payment method for a customer
Note: Both API calls require you to set the direct debit field to 'true': allow_direct_debit=true. Failing to do so will throw a 'Direct Debit is not
supported for this operation' error.
Chargebee will use the token to create a new customer. It will retrieve the corresponding bank account information from Stripe using the token. If the account has not been verified yet, you can make use of the micro-deposits option on Stripe or Chargebee to verify the account.