--- title: Collect a bank account to optimize ACH Direct Debit payments with account data subtitle: Use account data such as balances to optimize your payments integration. route: /financial-connections/ach-direct-debit-payments --- # Collect a bank account to optimize ACH Direct Debit payments with account data Use account data such as balances to optimize your payments integration. Not sure about which Financial Connections integration to use? See our [overview of integration options](https://docs.stripe.com/financial-connections/use-cases.md). Stripe offers a number of ways to accept ACH Direct Debit payments from your users. All of these methods require that you [verify](https://docs.stripe.com/payments/ach-direct-debit.md#verification) the user’s account before you can debit their account. Financial Connections is the secure method offered by Stripe to perform instant bank account verification, that’s also extensible to more powerful features such as balance or ownership checks. When using Financial Connections to power your ACH flows, you can: * Reduce payment failure rate from closed or inactive accounts * Improve payments conversion by keeping users on session, instead of forcing them to leave your payments flow to locate their account and routing numbers * Save development time by eliminating the need to create a custom bank account collection form * Enable the collection of additional bank account data, such as balances and ownership information, to further optimize your integration Financial Connections is the default verification method for all hosted ACH payment flows, such as Checkout or the Payment Element. If you use a hosted flow, skip directly to [accessing additional account data](#access). If you’re not already set up to collect ACH payments, [set that up](https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment.md?platform=web&ui=stripe-hosted) first. ## Enable Financial Connections The `verification_method` parameter on various API resources controls whether Financial Connections is enabled for bank account verification. Financial Connections with microdeposit fallback is the default. Bank accounts that your customers link through manual entry and microdeposits won’t have access to additional bank account data like balances, ownership, and transactions. | Verification method | Description | | --------------------- | ------------------------------------------------------------------------------------------------------ | | `automatic` (default) | Financial Connections with the option to manually enter bank account information and use microdeposits | | `instant` | Financial Connections only, with no manual entry + microdeposit fallback | | `microdeposits` | Manual entry and microdeposits only | This option is available on the following APIs: Additional steps, such as NACHA mandate collection, are required for businesses that don’t use a Stripe-hosted integration such as Payment Element, Checkout, or Hosted Invoicing. See [this section of the ACH guide](https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment.md?platform=web&ui=direct-api#web-collect-details). * [PaymentIntent](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-payment_method_options-us_bank_account-verification_method) * [SetupIntent](https://docs.stripe.com/api/setup_intents/create.md#create_setup_intent-payment_method_options-us_bank_account-verification_method) * [CheckoutSession](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-payment_method_options-us_bank_account-verification_method) * [Invoice](https://docs.stripe.com/api/invoices/create.md#create_invoice-payment_settings-payment_method_options-us_bank_account-verification_method) * [Subscription](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-payment_settings-payment_method_options-us_bank_account-verification_method) * [Payment Element](https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions-us_bank_account-verification_method) ## Create a customer We recommend that you create a *Customer* with an email address to represent your user, that you then attach to your payment. Attaching a Customer object allows you to [list previously linked accounts ](https://docs.stripe.com/api/financial_connections/accounts/list.md) later. By providing an email address on the Customer object, Financial Connections can improve the authentication flow by streamlining sign-in or sign-up for your user, depending on whether they’re a returning [Link](https://support.stripe.com/questions/link-for-financial-connections-support-for-businesses) user. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new CustomerCreateOptions { Email = "{{CUSTOMER_EMAIL}}" }; var service = new CustomerService(); Customer customer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CustomerParams{Email: stripe.String("{{CUSTOMER_EMAIL}}")}; result, err := customer.New(params); ``` ```java Stripe.apiKey = "<>"; CustomerCreateParams params = CustomerCreateParams.builder().setEmail("{{CUSTOMER_EMAIL}}").build(); Customer customer = Customer.create(params); ``` ```node const stripe = require('stripe')('<>'); const customer = await stripe.customers.create({ email: '{{CUSTOMER_EMAIL}}', }); ``` ```python import stripe stripe.api_key = "<>" customer = stripe.Customer.create(email="{{CUSTOMER_EMAIL}}") ``` ```php $stripe = new \Stripe\StripeClient('<>'); $customer = $stripe->customers->create(['email' => '{{CUSTOMER_EMAIL}}']); ``` ```ruby Stripe.api_key = '<>' customer = Stripe::Customer.create({email: '{{CUSTOMER_EMAIL}}'}) ``` ## Request access to additional account data To access additional account data on Financial Connections Accounts, first make sure you’ve submitted your Financial Connections application by checking [Financial Connections settings in the Dashboard](https://dashboard.stripe.com/settings/financial-connections). To view this page, activate your account. How you configure which types of account data you have access to depends on your integration. If you use Stripe’s [dynamic payment method feature](https://docs.stripe.com/payments/payment-methods/dynamic-payment-methods.md) to collect ACH payments for non-Connect use cases, you can configure requested Financial Connections data directly from the [ACH Dashboard settings page](https://dashboard.stripe.com/test/settings/payment_methods). Account and routing number is always required for ACH debits; other data types are optional. We recommend configuring permissions in the Dashboard because it allows you to change which data you collect without any code changes. To override the Dashboard configuration, specify Financial Connections permissions directly in the API. To do this for PaymentIntents: ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentIntentCreateOptions { Amount = 2000, Currency = "usd", Customer = "<>", AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions { Enabled = true }, PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions { UsBankAccount = new PaymentIntentPaymentMethodOptionsUsBankAccountOptions { FinancialConnections = new PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions { Permissions = new List { "payment_method", "balances", "ownership", "transactions", }, }, }, }, }; var service = new PaymentIntentService(); PaymentIntent paymentIntent = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(2000), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String("<>"), AutomaticPaymentMethods: &stripe.PaymentIntentAutomaticPaymentMethodsParams{ Enabled: stripe.Bool(true), }, PaymentMethodOptions: &stripe.PaymentIntentPaymentMethodOptionsParams{ USBankAccount: &stripe.PaymentIntentPaymentMethodOptionsUSBankAccountParams{ FinancialConnections: &stripe.PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams{ Permissions: []*string{ stripe.String(string(stripe.PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod)), stripe.String(string(stripe.PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances)), stripe.String(string(stripe.PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership)), stripe.String(string(stripe.PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions)), }, }, }, }, }; result, err := paymentintent.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(2000L) .setCurrency("usd") .setCustomer("<>") .setAutomaticPaymentMethods( PaymentIntentCreateParams.AutomaticPaymentMethods.builder().setEnabled(true).build() ) .setPaymentMethodOptions( PaymentIntentCreateParams.PaymentMethodOptions.builder() .setUsBankAccount( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.builder() .setFinancialConnections( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.builder() .addPermission( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.PAYMENT_METHOD ) .addPermission( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.BALANCES ) .addPermission( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.OWNERSHIP ) .addPermission( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.TRANSACTIONS ) .build() ) .build() ) .build() ) .build(); PaymentIntent paymentIntent = PaymentIntent.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentIntent = await stripe.paymentIntents.create({ amount: 2000, currency: 'usd', customer: '<>', automatic_payment_methods: { enabled: true, }, payment_method_options: { us_bank_account: { financial_connections: { permissions: ['payment_method', 'balances', 'ownership', 'transactions'], }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_intent = stripe.PaymentIntent.create( amount=2000, currency="usd", customer="<>", automatic_payment_methods={"enabled": True}, payment_method_options={ "us_bank_account": { "financial_connections": { "permissions": ["payment_method", "balances", "ownership", "transactions"], }, }, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentIntent = $stripe->paymentIntents->create([ 'amount' => 2000, 'currency' => 'usd', 'customer' => '<>', 'automatic_payment_methods' => ['enabled' => true], 'payment_method_options' => [ 'us_bank_account' => [ 'financial_connections' => [ 'permissions' => ['payment_method', 'balances', 'ownership', 'transactions'], ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' payment_intent = Stripe::PaymentIntent.create({ amount: 2000, currency: 'usd', customer: '<>', automatic_payment_methods: {enabled: true}, payment_method_options: { us_bank_account: { financial_connections: { permissions: ['payment_method', 'balances', 'ownership', 'transactions'], }, }, }, }) ``` If you pass `payment_method_types` in the API directly, you must explicitly specify which Financial Connections data permissions you want in every API call. To do this for [CheckoutSession](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-payment_method_options-us_bank_account-financial_connections-permissions): ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { Customer = "<>", SuccessUrl = "https://example.com/success", LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "{PRICE_ID}", Quantity = 1 }, }, PaymentMethodOptions = new Stripe.Checkout.SessionPaymentMethodOptionsOptions { UsBankAccount = new Stripe.Checkout.SessionPaymentMethodOptionsUsBankAccountOptions { FinancialConnections = new Stripe.Checkout.SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions { Permissions = new List { "payment_method", "balances", "ownership", "transactions", }, }, }, }, }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ Customer: stripe.String("<>"), SuccessURL: stripe.String("https://example.com/success"), LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("{PRICE_ID}"), Quantity: stripe.Int64(1), }, }, PaymentMethodOptions: &stripe.CheckoutSessionPaymentMethodOptionsParams{ USBankAccount: &stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountParams{ FinancialConnections: &stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams{ Permissions: []*string{ stripe.String(string(stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod)), stripe.String(string(stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances)), stripe.String(string(stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership)), stripe.String(string(stripe.CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions)), }, }, }, }, }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .setCustomer("<>") .setSuccessUrl("https://example.com/success") .addLineItem( SessionCreateParams.LineItem.builder().setPrice("{PRICE_ID}").setQuantity(1L).build() ) .setPaymentMethodOptions( SessionCreateParams.PaymentMethodOptions.builder() .setUsBankAccount( SessionCreateParams.PaymentMethodOptions.UsBankAccount.builder() .setFinancialConnections( SessionCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.builder() .addPermission( SessionCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.PAYMENT_METHOD ) .addPermission( SessionCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.BALANCES ) .addPermission( SessionCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.OWNERSHIP ) .addPermission( SessionCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Permission.TRANSACTIONS ) .build() ) .build() ) .build() ) .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ customer: '<>', success_url: 'https://example.com/success', line_items: [ { price: '{PRICE_ID}', quantity: 1, }, ], payment_method_options: { us_bank_account: { financial_connections: { permissions: ['payment_method', 'balances', 'ownership', 'transactions'], }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( customer="<>", success_url="https://example.com/success", line_items=[{"price": "{PRICE_ID}", "quantity": 1}], payment_method_options={ "us_bank_account": { "financial_connections": { "permissions": ["payment_method", "balances", "ownership", "transactions"], }, }, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'customer' => '<>', 'success_url' => 'https://example.com/success', 'line_items' => [ [ 'price' => '{PRICE_ID}', 'quantity' => 1, ], ], 'payment_method_options' => [ 'us_bank_account' => [ 'financial_connections' => [ 'permissions' => ['payment_method', 'balances', 'ownership', 'transactions'], ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ customer: '<>', success_url: 'https://example.com/success', line_items: [ { price: '{PRICE_ID}', quantity: 1, }, ], payment_method_options: { us_bank_account: { financial_connections: { permissions: ['payment_method', 'balances', 'ownership', 'transactions'], }, }, }, }) ``` ## Use data to optimize ACH integration After you have been approved for additional bank account data access like balances or ownership, you can use this data to optimize ACH payments performance. For example, you can use balance data to reduce the risk of insufficient funds failures. See related data guides for examples: * [Balances](https://docs.stripe.com/financial-connections/balances.md): check account balance prior to payment initiation to reduce *NSFs*. * [Ownership](https://docs.stripe.com/financial-connections/ownership.md): pull account owners and compare against your internal data models to catch potential fraud. * [Transactions](https://docs.stripe.com/financial-connections/transactions.md): pull an account’s transaction history to check when the customer’s paycheck might land. ### Finding the Financial Connections Account ID To initiate data refreshes and retrieve data on a Financial Connections Account, you first need to get the account’s ID from the linked Payment Method by expanding the Payment Intent’s `payment_method` property: ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentIntentGetOptions { Expand = new List { "payment_method" } }; var service = new PaymentIntentService(); PaymentIntent paymentIntent = service.Get("{{PAYMENT_INTENT}}", options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentIntentParams{}; params.AddExpand("payment_method") result, err := paymentintent.Get("{{PAYMENT_INTENT}}", params); ``` ```java Stripe.apiKey = "<>"; PaymentIntentRetrieveParams params = PaymentIntentRetrieveParams.builder().addExpand("payment_method").build(); PaymentIntent paymentIntent = PaymentIntent.retrieve("{{PAYMENT_INTENT}}", params, null); ``` ```node const stripe = require('stripe')('<>'); const paymentIntent = await stripe.paymentIntents.retrieve( '{{PAYMENT_INTENT}}', { expand: ['payment_method'], } ); ``` ```python import stripe stripe.api_key = "<>" payment_intent = stripe.PaymentIntent.retrieve( "{{PAYMENT_INTENT}}", expand=["payment_method"], ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentIntent = $stripe->paymentIntents->retrieve( '{{PAYMENT_INTENT}}', ['expand' => ['payment_method']] ); ``` ```ruby Stripe.api_key = '<>' payment_intent = Stripe::PaymentIntent.retrieve({ expand: ['payment_method'], id: '{{PAYMENT_INTENT}}', }) ``` The Financial Connections Account ID is on the expanded Payment Method’s [`us_bank_account` hash](https://docs.stripe.com/api/payment_methods/object.md#payment_method_object-us_bank_account). If you allow [manual entry fallback](https://docs.stripe.com/financial-connections/ach-direct-debit-payments.md#enable) and the user manually entered their account information, this field is `null`. ```json { "id": "pi_3OK3g4FitzZY8Nvm11121Lhb", "object": "payment_intent", "payment_method": { "us_bank_account": { "financial_connections_account": "fca_1OK123bitUAA8SvmruWkck76" } // ... other fields on the Payment Method } // ... other fields on the Payment Intent } ```