Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
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
    Bank debits
      ACH Direct Debit
        Accept a payment
        Save bank details
        Migrating from the Charges API
        Migrating from another processor
        Blocked bank accounts
        SEC codes
      Bacs Direct Debit
      Pre-authorized debit in Canada
      Australia BECS Direct Debit
      New Zeland 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 interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsAdd payment methodsBank debitsACH Direct Debit

Migrating from the Charges API

Upgrade to the Payment Intents API.

Copy page

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

  1. The customer’s bank account has been verified.
  2. An active mandate exists for that bank account.

Compatibility with the Bank Accounts API

Create a PaymentIntent with a Bank Account

Bank Accounts that are already verified and have been attached to a Customer are usable in any API that accepts a PaymentMethod object. You can use a saved BankAccount as a PaymentMethod when creating a PaymentIntent. This eliminates the need to recollect payment details. However, make sure that you also update your integration to begin creating PaymentMethods instead.

Command Line
curl
curl https://api.stripe.com/v1/payment_intents \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "amount"=1099 \ -d "currency"="usd" \ -d "customer"="{{CUSTOMER_ID}}" \ -d "payment_method_types[]"="us_bank_account" \ -d "payment_method"="{{BANK_ACCOUNT_ID}}"

Similarly, you can use a saved BankAccount as a PaymentMethod when creating a SetupIntent.

Command Line
curl
curl https://api.stripe.com/v1/setup_intents \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "payment_method_types[]"="us_bank_account" \ -d "customer"="{{CUSTOMER_ID}}" \ -d "payment_method"="{{BANK_ACCOUNT_ID}}"

Collect mandate acknowledgement

Confirming a PaymentIntent or SetupIntent requires having your customer authorize a mandate to debit the account. Learn more about SEC codes to understand which authorization type is right for your business.

In some cases, you might have pre-authorization from your customer from an earlier purchase or SetupIntent that you can use to create an off-session payment. For example:

  • If you previously collected an online mandate from the customer, you can use both the IP address and user agent information to create a mandate object.
  • If you previously collected payment and mandate information offline on paper, you can create a PPD mandate.

To create an off-session payment, you can use offline mandate acceptance to provide a record of your customer’s original authorization.

Authorization is only required the first time you use a BankAccount object with the PaymentIntents API. After that, you can use the BankAccount object as a PaymentMethod to accept future payments.

Command Line
curl
curl https://api.stripe.com/v1/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -d "mandate_data[customer_acceptance][type]"="offline" \ -d "mandate_data[customer_acceptance][accepted_at]"="{{ACCEPTANCE_TIMESTAMP}}" \ -d "payment_method_options[us_bank_account][mandate_data][collection_method]"="paper"

Retrieving a BankAccount as a PaymentMethod

You can retrieve saved BankAccounts through the Payment Methods API.

Command Line
curl
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.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc