stripe_bank_account_token not returned
Ensure your accounts are linked
When a stripe_bank_account_token
is not returned, a typical cause is that your Stripe and Plaid accounts have not yet been linked.
First, be sure that your Stripe account has been configured to accept ACH transfers. Then, link your Stripe account to your Plaid account.
Now that your accounts are linked, make the request again. If a stripe_bank_account_token
is still not returned, see below.
Ensure users are selecting an account in Plaid Link
A stripe_bank_account_token
will only be returned if Select Account has been enabled within Link. With Select Account enabled, the account_id
for the account that the user chose will be passed in the second parameter of the onSuccess callback.
After you've received the public_token
and account_id,
send them to your app server, and make an /item/public_token/exchange
API request. Plaid will return a Plaid API access_token
. Send the access_token
and the account_id
to /processor/stripe/bank_account_token/create
, and in response, you will receive a Stripe bank account token:
{
"stripe_bank_account_token": "btok_5oEetfLzPklE1fwJZ7SG",
"request_id": "[Unique request ID]"
}
Use the stripe_bank_account_token
to initialize ACH payments via Stripe and the access_token
to send requests to any of Plaid's other endpoints.
stripe_bank_account_token nil
Stripe::InvalidRequestError: No such token
This error is returned by Stripe's API when a test mode bank_account_token
is used in a live Stripe API call.
To generate test mode bank accounts tokens that are associated with one of Stripe's test bank accounts (the test US/CA bank account with account number 000123456789
and routing number 110000000
), initialize Link with your own public_key
(rather than test_key) and use Plaid Sandbox credentials to authenticate with a financial institution.
Send the public_token
and account_id
, received from Link's onSuccess
callback, to your app server. Then make a request to /item/public_token/exchange
with the public_token
and your client_id
and secret
(available from your Plaid Dashboard).
The /item/public_token/exchange
endpoint will return an access_token
. Send the access_token
and the account_id
to /processor/stripe/bank_account_token/create
. In response, you will receive a Stripe test mode bank account token:
{
"stripe_bank_account_token": "btok_5oEetfLzPklE1fwJZ7SG",
"request_id": "[Unique request ID]"
}
Regardless of which Plaid Sandbox account_id
is provided in the /processor/stripe/bank_account_token/create
request, the test mode stripe_bank_account_token
that is generated will always be associated with the Stripe test account and routing number. The test mode stripe_bank_account_token
will be associated with the Stripe account that you linked via the Plaid Dashboard.
Once you're successfully retrieving Stripe bank_account_token
s, you'll be ready to make the ACH transaction with Stripe! Head to Stripe's ACH guide to get started, and if you have any issues, please reach out to Stripe Support.