# Use Plaid processor tokens with ACH Direct Debit

Verify US bank accounts with Plaid and use processor tokens to accept ACH payments.

Stripe supports Plaid processor tokens for verifying US bank accounts and accepting ACH Direct Debit payments. Verify bank accounts through Plaid and then use processor tokens to create PaymentMethods and confirm PaymentIntents.

## Set up your Plaid account

If you don’t have a Plaid account, [sign up in the Plaid dashboard](https://dashboard.plaid.com/signup). Your Plaid account is automatically enabled for use with Stripe.

The following Plaid examples use the production environment and require production Plaid credentials, which you can request in the Plaid dashboard. To test your integration, use Plaid Sandbox and Stripe Sandboxes. See [Test your integration](https://docs.stripe.com/payments/ach-direct-debit/plaid-processor-token-integration.md#test-integration).

## Collect bank account details with Plaid Link

Plaid Link is Plaid’s client-side component for collecting bank account details. The exact implementation details for Plaid Link depend on your platform, but they typically follow a similar flow. See [Plaid Link documentation](https://plaid.com/docs/link/) for platform-specific instructions.

> #### Protect credentials and tokens
> 
> Keep your Plaid `secret`, `access_token`, and `processor_token` on your server, and don’t log them. Load credentials from environment variables or a secrets manager. For Stripe API keys, follow [key-management best practices](https://docs.stripe.com/keys-best-practices.md).

First, create a `link_token` on your server by calling Plaid’s [Link token creation endpoint](https://plaid.com/docs/api/link/#linktokencreate). Configure it for the Auth product and US accounts:

#### curl

```bash
curl https://production.plaid.com/link/token/create \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "{{PLAID_CLIENT_ID}}",
    "secret": "{{PLAID_SECRET}}",
    "client_name": "My App",
    "user": {
      "client_user_id": "{{CUSTOMER_ID}}"
    },
    "products": ["auth"],
    "country_codes": ["US"],
    "language": "en",
    "webhook": "https://example.com/plaid-webhook"
  }'
```

The `webhook` field is optional. If you set it, Plaid sends Item webhooks to this URL, including verification updates for accounts that use microdeposits, see [Check verification status](https://docs.stripe.com/payments/ach-direct-debit/plaid-processor-token-integration.md#check-verification-status).

Then, pass the `link_token` to your client-side app to initialize Plaid Link. Set [Account Select](https://plaid.com/docs/link/customization/#account-select) to **Enabled for one account** in the customization settings in the Plaid Dashboard. This ensures `metadata.accounts[0]` is the account the customer selected. When the customer completes the flow, send the returned `public_token`, selected `account_id`,  and the account’s `verification_status` to your server.

```javascript
const linkHandler = Plaid.create({
  token: "{{LINK_TOKEN}}",
  onSuccess: (publicToken, metadata) => {
    const account = metadata.accounts[0];
    const accountId = account.id;
    const verificationStatus = account.verification_status;
    // Send publicToken, accountId, and verificationStatus to your server.
  },
  onExit: (error, metadata) => {
    if (error) {
      // Log error.error_code and let the customer retry.
    }
  },
});

linkHandler.open();
```

Exchange the `public_token` for a Plaid `access_token` by calling Plaid’s [token exchange endpoint](https://plaid.com/docs/api/items/#itempublic_tokenexchange) from your server:

#### curl

```bash
curl https://production.plaid.com/item/public_token/exchange \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "{{PLAID_CLIENT_ID}}",
    "secret": "{{PLAID_SECRET}}",
    "public_token": "{{PLAID_PUBLIC_TOKEN}}"
  }'
```

## Check the bank account's verification status

If you’ve enabled microdeposit or Database Auth flows in Plaid, the selected account might not be verified when the Plaid flow completes. In that case, `verification_status` is set to a value such as `pending_automatic_verification` or `pending_manual_verification`.

Stripe can’t retrieve account details for an unverified account. Wait until the account is verified before using its processor token with Stripe. Listen for Plaid’s [verification webhooks](https://plaid.com/docs/auth/coverage/micro-deposit-events/) to know when that happens.

If you only use Instant Auth, `verification_status` is `null` and you can proceed immediately.

## Create a Plaid processor token

Use the `access_token` and selected `account_id` to create a processor token with Plaid’s [processor token creation endpoint](https://plaid.com/docs/api/processors/#processortokencreate). Set `processor` to `stripe`:

#### curl

```bash
curl https://production.plaid.com/processor/token/create \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "{{PLAID_CLIENT_ID}}",
    "secret": "{{PLAID_SECRET}}",
    "access_token": "{{PLAID_ACCESS_TOKEN}}",
    "account_id": "{{PLAID_ACCOUNT_ID}}",
    "processor": "stripe"
  }'
```

A `processor_token` lets a payment processor, such as Stripe, make Plaid API calls on your behalf. Each token is scoped to a bank account and processor, so a token created through this flow only allows Stripe to access the bank account it was created for. Stripe only uses these tokens to fetch the bank account details needed to create payments.

Processor tokens don’t expire and can’t be shared across multiple Stripe accounts. After Stripe creates a PaymentMethod from the token, use that PaymentMethod for future payments instead of creating a new processor token.

## Use the processor token with Stripe

Use the `processor_token` to collect ACH payments or save ACH payment methods with Stripe’s APIs.

These examples assume you’ve configured [Stripe API authentication](https://docs.stripe.com/keys.md) and created a [customer-configured Account](https://docs.stripe.com/accounts-v2/use-accounts-as-customers.md) or a [Customer](https://docs.stripe.com/api/customers/create.md). They use API version `2026-10-28.preview`.

> #### Collect customer mandates
> 
> If you use Plaid, you’re responsible for collecting, storing, and managing customer mandates, and you must provide Stripe with accurate and complete mandate information. Alternatively, use [Financial Connections](https://docs.stripe.com/financial-connections.md), which handles mandates for you. See [ACH Direct Debit mandates](https://docs.stripe.com/payments/ach-direct-debit.md#mandates) for details.

### Accept a payment with a PaymentIntent 

Use the processor token in `payment_method_data.us_bank_account.external_token` when you [create and confirm a PaymentIntent](https://docs.stripe.com/api/payment_intents/create.md?api-version=2026-10-28.preview). Include the customer’s mandate acceptance information.

These examples also save the payment method for future payments by setting `setup_future_usage` to `off_session`. Omit this parameter if you don’t need to save the payment method.

#### Accounts v2

```curl
curl https://api.stripe.com/v1/payment_intents \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-10-28.preview" \
  -d amount=1099 \
  -d currency=usd \
  -d "customer_account={{CUSTOMER_ACCOUNT_ID}}" \
  -d "automatic_payment_methods[enabled]=true" \
  -d "automatic_payment_methods[allow_redirects]=never" \
  -d setup_future_usage=off_session \
  -d "payment_method_data[type]=us_bank_account" \
  -d "payment_method_data[us_bank_account][external_token][type]=plaid_processor_token" \
  -d "payment_method_data[us_bank_account][external_token][plaid_processor_token]={{PROCESSOR_TOKEN}}" \
  -d "payment_method_data[billing_details][name]={{CUSTOMER_NAME}}" \
  -d "mandate_data[customer_acceptance][type]=online" \
  -d "mandate_data[customer_acceptance][online][ip_address]={{CUSTOMER_IP_ADDRESS}}" \
  -d "mandate_data[customer_acceptance][online][user_agent]={{USER_AGENT}}" \
  -d confirm=true
```

#### Customers v1

```curl
curl https://api.stripe.com/v1/payment_intents \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-10-28.preview" \
  -d amount=1099 \
  -d currency=usd \
  -d "customer={{CUSTOMER_ID}}" \
  -d "automatic_payment_methods[enabled]=true" \
  -d "automatic_payment_methods[allow_redirects]=never" \
  -d setup_future_usage=off_session \
  -d "payment_method_data[type]=us_bank_account" \
  -d "payment_method_data[us_bank_account][external_token][type]=plaid_processor_token" \
  -d "payment_method_data[us_bank_account][external_token][plaid_processor_token]={{PROCESSOR_TOKEN}}" \
  -d "payment_method_data[billing_details][name]={{CUSTOMER_NAME}}" \
  -d "mandate_data[customer_acceptance][type]=online" \
  -d "mandate_data[customer_acceptance][online][ip_address]={{CUSTOMER_IP_ADDRESS}}" \
  -d "mandate_data[customer_acceptance][online][user_agent]={{USER_AGENT}}" \
  -d confirm=true
```

The `mandate_data.customer_acceptance` object is required. See the [required fields](https://docs.stripe.com/api/payment_intents/create.md?api-version=2026-10-28.preview#create_payment_intent-mandate_data-customer_acceptance).

When the `PaymentIntent` succeeds, it creates a `PaymentMethod` attached to the object that represents your customer, either a customer-configured [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) or a [Customer](https://docs.stripe.com/api/customers/object.md).

ACH Direct Debit payments complete asynchronously. [Monitor payment status with webhooks](https://docs.stripe.com/payments/payment-intents/verifying-status.md#webhooks), and [verify webhook signatures](https://docs.stripe.com/webhooks.md#verify-events).

### Save payment details with a SetupIntent 

Use the processor token in `payment_method_data.us_bank_account.external_token` when you [create and confirm a SetupIntent](https://docs.stripe.com/api/setup_intents/create.md?api-version=2026-10-28.preview).

#### Accounts v2

```curl
curl https://api.stripe.com/v1/setup_intents \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-10-28.preview" \
  -d "automatic_payment_methods[enabled]=true" \
  -d "automatic_payment_methods[allow_redirects]=never" \
  -d "customer_account={{CUSTOMER_ACCOUNT_ID}}" \
  -d "mandate_data[customer_acceptance][type]=online" \
  -d "mandate_data[customer_acceptance][online][ip_address]={{CUSTOMER_IP_ADDRESS}}" \
  -d "mandate_data[customer_acceptance][online][user_agent]={{USER_AGENT}}" \
  -d confirm=true \
  -d "payment_method_data[type]=us_bank_account" \
  -d "payment_method_data[us_bank_account][external_token][type]=plaid_processor_token" \
  -d "payment_method_data[us_bank_account][external_token][plaid_processor_token]={{PROCESSOR_TOKEN}}" \
  -d "payment_method_data[billing_details][name]={{CUSTOMER_NAME}}"
```

#### Customers v1

```curl
curl https://api.stripe.com/v1/setup_intents \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-10-28.preview" \
  -d "automatic_payment_methods[enabled]=true" \
  -d "automatic_payment_methods[allow_redirects]=never" \
  -d "customer={{CUSTOMER_ID}}" \
  -d "mandate_data[customer_acceptance][type]=online" \
  -d "mandate_data[customer_acceptance][online][ip_address]={{CUSTOMER_IP_ADDRESS}}" \
  -d "mandate_data[customer_acceptance][online][user_agent]={{USER_AGENT}}" \
  -d confirm=true \
  -d "payment_method_data[type]=us_bank_account" \
  -d "payment_method_data[us_bank_account][external_token][type]=plaid_processor_token" \
  -d "payment_method_data[us_bank_account][external_token][plaid_processor_token]={{PROCESSOR_TOKEN}}" \
  -d "payment_method_data[billing_details][name]={{CUSTOMER_NAME}}"
```

When the `SetupIntent` succeeds, it creates a `PaymentMethod` attached to the object that represents your customer, either a customer-configured [Account](https://docs.stripe.com/api/v2/core/accounts/object.md) or a [Customer](https://docs.stripe.com/api/customers/object.md). Use it to initiate future payments without asking your customer to enter their bank account details again.

Learn more about [SetupIntents](https://docs.stripe.com/payments/setup-intents.md).

## Test your integration

Use Plaid Sandbox and Stripe Sandboxes to test your integration. [Configure a custom Plaid Sandbox user](https://plaid.com/docs/sandbox/user-custom/#configuring-the-custom-user-account) with account and routing numbers that match the Stripe [test account numbers for successful and failed payments](https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment.md#test-account-numbers). The Plaid Sandbox endpoint doesn’t let you choose which of the Sandbox user’s bank accounts the processor token is created for. Give each Sandbox user a single checking or savings account.

Create a test processor token with Plaid’s [sandbox processor token endpoint](https://plaid.com/docs/api/sandbox/#sandboxprocessor_tokencreate). Set `override_username` to your custom Sandbox user, `override_password` to a Plaid [Sandbox test credential](https://plaid.com/docs/sandbox/test-credentials/), and `institution_id` to a non-OAuth Sandbox institution, because custom users don’t work with OAuth institutions:

#### curl

```bash
curl https://sandbox.plaid.com/sandbox/processor_token/create \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "{{PLAID_CLIENT_ID}}",
    "secret": "{{PLAID_SANDBOX_SECRET}}",
    "institution_id": "ins_109508",
    "options": {
      "override_username": "{{CUSTOM_USER}}",
      "override_password": "pass_good"
    }
  }'
```

Use the resulting `processor_token` in a Stripe Sandbox API request to test your integration.

## Handle errors 

Stripe retrieves bank account details from Plaid synchronously when you use a processor token. Handle errors from these requests in your integration. Stripe maps Plaid failures to Stripe error codes and can include the underlying Plaid error code in the error message. For example, an invalid processor token returns `plaid_invalid_token`:

```json
{
  "error": {
    "type": "invalid_request_error",
    "code": "plaid_invalid_token",
    "message": "The provided Plaid processor token is invalid. Verify the token and try again. Plaid error: INVALID_PROCESSOR_TOKEN"
  }
}
```

See [Plaid error documentation](https://plaid.com/docs/errors/) to troubleshoot Plaid errors.

## Optional: Add a payout bank account

For Accounts v1 connected accounts, you can also use a processor token to add a bank account for payouts. Your platform must be allowed to create external accounts for the connected account. See the [requirements for managing external accounts](https://docs.stripe.com/connect/payouts-bank-accounts.md?bank-account-collection-integration=direct-api&bank-account-collection-method=manual-entry#manage-bank-accounts-and-debit-cards).

Include the connected account ID, external account type, and Plaid processor token in the request:

```curl
curl https://api.stripe.com/v1/accounts/{{CONNECTED_ACCOUNT_ID}}/external_accounts \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-10-28.preview" \
  -d "external_account[object]=bank_account" \
  -d "external_account[external_token][type]=plaid_processor_token" \
  -d "external_account[external_token][plaid_processor_token]={{PROCESSOR_TOKEN}}"
```
