Plaid Link Auth Flow

Plaid and Stripe have partnered to offer frictionless money transfers without the need to ever handle an account or routing number. Use Plaid Link to instantly authenticate your customer's account and automatically generate a Stripe bank account token so that you can accept ACH payments via their ACH API.

This guide is designed for those who already have a ACH-enabled account at both Stripe and Plaid. If that's not you, head over to the Stripe ACH docs to get started. You'll be able to sign up for a Plaid account from there.

Try out the demo

Getting Started

You'll first want to familiarize yourself with Plaid Link, a drop-in integration for the Plaid API that handles input validation, error handling, and multi-factor authentication.

Your customers will use Link to authenticate with their financial institution and select the depository account they wish to use for ACH transactions. From there, you'll receive a Plaid access_token, allowing you to leverage real-time balance checks and transaction data, and a Stripe bank_account_token, which allows you to move money via Stripe's ACH API without ever handling an account or routing number.


Step 1: Set up your Plaid and Stripe accounts

You'll need accounts at both Plaid and Stripe in order to use the Plaid Link + Stripe integration. You'll also need to connect your Plaid and Stripe accounts so that Plaid can facilitate the creation of bank account tokens on your behalf.

First, sign up for a Stripe account if you do not already have one and then verify that it is enabled for ACH access. To verify that your Stripe account is ACH enabled, head to the ACH Guide when you are logged in to your Stripe account. If you see:

Stripe ACH Guide

your account is not enabled. Click 'Accept Terms of Service' to enable your Stripe account for ACH. If you do not see the 'Accept Terms of Service' button, your Stripe account is already enabled for ACH access and you do not need to take any action.

Next, verify that your Plaid account is enabled for the integration. If you do not have a Plaid account, create one. Your account will be automatically enabled for integration access.

To verify that your Plaid account is enabled for the integration, go to the Integrations section of the account dashboard. If you see:

Connect with Stripe

your Plaid account is enabled for the integration but you have not connected your Stripe account.

Click the 'Connect With Stripe' button to connect your Plaid and Stripe accounts. This step is required so that Plaid can facilitate the creation of Stripe bank account tokens on your behalf.

Once your Stripe account is connected, you'll see:

Connected with Stripe

Your Plaid account is now set up for the integration!

Step 2: Fetch a Link token

A link_token is a one-time use token that is used to initialize Plaid Link. You can create a link_token and configure it for your specific Link flow by calling the /link/token/create endpoint from your server.

Fetch a Link token

Step 3: Integrate with Plaid Link

Integrating with Link is easy. All it takes is a few lines of client-side JavaScript and a small server-side handler to exchange the Link public_token for a Plaid access_token and a Stripe bank account token.

Integrate with Link

See the parameter reference for complete documentation on possible configurations.

Plaid.create accepts one argument, a configuration Object, and returns an Object with one function, open, and one property, institutions.

The exposed institutions property is an Array of Objects in the form:

    name: 'Bank of America',
    institution_id: 'ins_1',
    auth: true,
    transactions: true,

The institutions property will be populated with all supported institutions for a given product. That is, the list of institutions will be different for auth and transactions.

Step 4: Write server-side handler

The Link module handles the entire onboarding flow securely and quickly, but does not actually retrieve account data for a user. Instead, the Link module returns a public_token and an account_id—a property on the metadata object—via the onSuccess callback.

Exchange this public_token for a Plaid access_token using the /item/public_token/exchange API endpoint. You will also send the account_id selected by the user to Plaid. Plaid will automatically create and return a Stripe bank account token for this account, which can then be used to move money via Stripe's ACH API. The bank account token will be linked to the Stripe account you linked in your Plaid Dashboard.

You can create Stripe bank account tokens in all three API environments:

// Change sandbox to development to test with live users and change
// to production when you're ready to go live!
var plaid = require('plaid');
var plaidClient = new plaid.Client({
    clientID: 'PLAID_CLIENT_ID',
    secret: 'PLAID_SECRET',
    env: plaid.environments.sandbox
plaidClient.exchangePublicToken('PUBLIC_TOKEN', function(err, res) {
    var accessToken = res.access_token;
    // Generate a bank account token
    plaidClient.createStripeToken(accessToken, 'ACCOUNT_ID', function(err, res) {
        var bankAccountToken = res.stripe_bank_account_token;

# Exchange token
curl -X POST \
-H 'Content-Type: application/json'
-d '{
  "client_id": "[Plaid Client ID]",
  "secret": "[Plaid secret]",
  "public_token": "[Public token]"

# Create bank account token
curl -X POST \
-H 'Content-Type: application/json'
-d '{
  "client_id": "[Plaid Client ID]",
  "secret": "[Plaid secret]",
  "access_token": "[Access token]",
  "account_id": "[Account ID]"

# Change sandbox to development to test with live users and change
# to production when you're ready to go live!
client = :sandbox,
                           client_id: PLAID_CLIENT_ID,
                           secret: PLAID_SECRET)

exchange_token_response ='[Plaid Link public_token]')
access_token = exchange_response['access_token']

stripe_response = client.processor.stripeBankAccountTokenCreate(access_token, '[Account ID'])
bank_account_token = stripe_response['stripe_bank_account_token']

// Use builder to create a client
PlaidClient plaidClient = PlaidClient.newBuilder()
  // Use the Sandbox. Can also be
  // developmentBaseUrl() or productionBaseUrl()

// Required request parameters are always Request object constructor arguments
Response<ItemPublicTokenExchangeResponse> exchangeResponse = plaidClient.service()
    .itemPublicTokenExchange(new ItemPublicTokenExchangeRequest("[Plaid Link public_token]")).execute();

if (exchangeResponse.isSuccessful()) {
  String accessToken = exchangeResponse.body().getAccessToken();
  Response<ItemStripeTokenCreateResponse> stripeResponse =
      client().service().itemStripeTokenCreate(new ItemStripeTokenCreateRequest(accessToken, "[Account ID]")).execute();

  if (stripeResponse.isSuccessful()) {
    String bankAccountToken = stripeResponse.body().getStripeBankAccountToken();

# Change sandbox to development to test with live users and change
# to production when you're ready to go live!
client = Client(
    api_version='2019-05-29'  # Specify API version
exchange_token_response ='[Plaid Link public_token]')
access_token = exchange_token_response['access_token']

stripe_response = client.Processor.stripeBankAccountTokenCreate(access_token, '[Account ID]'])
bank_account_token = stripe_response['stripe_bank_account_token']

For a valid request, the API will return a JSON response similar to:

  "stripe_bank_account_token": "btok_5oEetfLzPklE1fwJZ7SG",
  "request_id": "[Unique request ID]"

For possible error codes, see the full listing of Plaid error codes.

Note: The account_id parameter is required if you wish to receive a Stripe bank account token.

Step 5: Test with sandbox credentials

Link's sandbox mode is compatible with Plaid's Sandbox API environment and Stripe's "test mode" API. To test the integration in sandbox mode, simply use the Plaid sandbox credentials.

Use Stripe's ACH API in test mode to create test transfers using the bank account tokens you retrieve from Plaid's Sandbox API environment.

Step 6: Get ready for production

Your account is immediately enabled for our Sandbox and Development environments ( and, which allows you to test with Sandbox API credentials and up to 100 live users. To move to Production, please request access from the Dashboard.

Support and questions

Find answers to many common integration questions and concerns—such as pricing, sandbox and test mode usage, and more—at our Help Center and docs.

If you're still stuck, open a support ticket with information describing the issue that you're experiencing and we'll get back to you as soon as we can.