Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
In-person payments
Terminal
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
    Pay with Stripe balance
    Stablecoin payments
    Bank debits
      ACH Direct Debit
        Accept a payment
        Save bank details
        Migrating ACH Direct Debit from Charges to newer APIs
          Migrate existing bank accounts
        Migrating from another processor
        Blocked bank accounts
        SEC codes
      Bacs Direct Debit
      Pre-authorized debit in Canada
      Australia BECS Direct Debit
      New Zealand BECS Direct Debit
      SEPA Direct Debit
    Bank redirects
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United States)
HomePaymentsAdd payment methodsBank debitsACH Direct DebitMigrating ACH Direct Debit from Charges to newer APIs

Migrate existing bank accounts

Learn how to migrate existing bank accounts to the Payment Intents API or Checkout Sessions API.

Stripe will soon remove support for ACH Direct Debit on the Charges API. If you create ACH Direct Debit payments using the Charges API through the API, Invoices, or Subscriptions, you must migrate to the Payment Intents API or Checkout Sessions API. Before we formally remove support, we’ll email you with more details.

If you previously collected customer payment details with Stripe using the Tokens API, you can continue using the saved BankAccount as a PaymentMethod. You can only use customer bank accounts with the Payment Intents API or Checkout Sessions API after you meet the following requirements:

  • Checkout Sessions API: The customer’s bank account has been verified.

  • Payment Intents API: The customer’s bank account has been verified, and an active mandate exists for that bank account.

Use Checkout Sessions

To display previously saved and verified bank accounts in Checkout, you need to:

  • Create a Checkout Session with a customer parameter
  • Set the filters to ['unspecified', 'limited', 'always']
  • Specify us_bank_account in payment_method_types

When these requirements are met, Checkout automatically finds and displays all saved, verified bank accounts associated with that customer, eliminating the need to recollect payment details.

Ruby
Python
Node.js
PHP
Java
Go
.NET
No results
# Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key =
'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
session = Stripe::Checkout::Session.create({ mode: 'payment', ui_mode: 'custom', customer: '{{CUSTOMER_ID}}', payment_method_types: ['us_bank_account'], line_items: [{ price_data: { currency: 'usd', product_data: { name: 'T-shirt', }, unit_amount: 1099, }, quantity: 1, }], saved_payment_method_options: { allow_redisplay_filters: ['unspecified', 'limited', 'always'], }, return_url: YOUR_DOMAIN + '/complete?session_id={CHECKOUT_SESSION_ID}', })

If the customer has an email attached, the customer’s email is prefilled in the Session and cannot be modified. You must check for an email and render your email input field accordingly.

const {checkout} = useCheckout(); const currentEmail = checkout.email; if (currentEmail) { return <input value={currentEmail} readOnly />; }

Invoices

After you collect mandate acknowledgment, you must either update your customer’s default payment method or set the default_payment_method parameter to use ACH on PaymentIntent objects with Invoicing.

To update a customer’s default payment method:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/customers/{{CUSTOMER_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "invoice_settings[default_payment_method]"={{BANK_ACCOUNT_ID}}

To create an invoice with a bank account as a payment method:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/invoices \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer={{CUSTOMER_ID}} \ -d default_payment_method={{BANK_ACCOUNT_ID}}

Retrieve a BankAccount as a PaymentMethod

You can retrieve saved BankAccounts through the Payment Methods API:

Command Line
curl
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_methods/ba_1IsleZ2eZvKYlo2CI3To1g72 \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:

When using a BankAccount as a PaymentMethod, no new objects are created. The Payment Methods API simply provides a different view of the same underlying object.

{ "id": "ba_1IsleZ2eZvKYlo2CI3To1g72", "object": "payment_method", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jenny Rosen", "phone": null }, "us_bank_account": { "last4": "6789", "routing_number": "110000000", "fingerprint": "1JWtPxqbdX5Gamtc", "account_holder_type": "individual", "bank_name": "STRIPE TEST BANK", }, "created": 123456789, "customer": "cus_CY5bH92D99f4mn", "livemode": false, "metadata": {}, "type": "us_bank_account" }
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc