Alamgir Qazi
Alamgir Qazi

Reputation: 793

Stripe: StripeInvalidRequestError Error: No such token: btok_1CQUtNI6UceP4uARenSx4Cjo

I've created a bank account token from Plaid and now I want to use that bank token with Stripe but I get this error No such token: btok_1CQUtNI6UceP4uARenSx4Cjo

I'm using Plaid sandbox environment and Stripe test keys

I'm following this (https://plaid.com/docs/link/stripe) and I've done till step 4. Plaid creates a btok for me but Stripe doesn't accept it.

The detailed Stripe response is in the image Stripe response

Upvotes: 4

Views: 6420

Answers (4)

Həsən Musayev
Həsən Musayev

Reputation: 1

In the stripe.js file update code with own publishable key

// Set your publishable key: remember to change this to your live publishable key in production
// See your keys here: https://dashboard.stripe.com/apikeys

    var stripe = Stripe('StripeKey');
    var elements = stripe.elements();

Upvotes: 0

zeeshan
zeeshan

Reputation: 11

Posting as may be helpful to someone struggling with this error. Try following

  1. Make sure your secret(backend) and publishable(frontend) keys belongs to same account.
  2. Consider my case where I was passing connected account as stripe account more than once. (using source for payments and having same issue 'No such token: src_xxxxxx'.)

Thanks

Upvotes: 0

Alamgir Qazi
Alamgir Qazi

Reputation: 793

The issue was that I had multiple Stripe accounts and was using the Stripe account keys which weren't linked to Plaid.

Upvotes: 0

postmoderngres
postmoderngres

Reputation: 386

Stripe Tokens can only be used by the api keys of the account that created them (otherwise trying to use them will return a resource_missing error). Double check in your Stripe dashboard that the public key you are using to create the bank account token, and the secret key you are creating this request with belong to the same account.

If you want details about which accounts the bank account token or request were made from, please don't hesitate to write into [email protected].

Upvotes: 2

Related Questions