# Embedded Finance integration guide Build an embedded financial services integration with Issuing and Financial Accounts for platforms. Check out our introductory guide to using [embedded finance for SaaS Platforms](https://stripe.com/guides/introduction-to-embedded-finance). Build a US embedded financial services offering using Stripe [Issuing](https://docs.stripe.com/issuing/how-issuing-works.md) and [Financial Accounts for platforms](https://docs.stripe.com/financial-accounts/connect.md). Use Issuing to create cards, and Financial Accounts for platforms to store balances and fund card spend. By the end of this guide, you’ll know how to: - Create verified connected accounts representing your business customers with relevant Issuing and Financial Accounts for platforms capabilities - Create financial accounts that you can use as a wallet for your business customers and add funds to using an external bank account - Create virtual cards for your business customers and use these cards to spend funds from a wallet ## Before you begin 1. Sign up for a [Stripe account](https://dashboard.stripe.com/register). 1. [Activate Issuing and Financial Accounts for platforms](https://dashboard.stripe.com/setup/treasury/activate) in a *sandbox* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes) environment from the Dashboard. For more information, see [API access to Issuing and Financial Accounts for platforms](https://docs.stripe.com/financial-accounts/connect/access.md). 1. Configure your [Connect platform branding settings](https://dashboard.stripe.com/settings/connect/stripe-dashboard/branding) for your business and add an icon. ## Create connected accounts ### Create a connected account Create a connected account to represent a business customer of your platform. For example, if your product is a SaaS platform for restaurants, each restaurant would be represented as a connected account. > #### Connect account types > > Issuing only supports connected accounts that don’t use a Stripe-hosted Dashboard, and where your platform is responsible for requirements collection and loss liability, also known as a Custom connected account. Learn how to [create connected accounts](https://docs.stripe.com/connect/interactive-platform-guide.md?connect-charge-type=direct&connect-loss-liability-owner=platform) that work with Issuing. If your existing accounts don’t match this configuration, you must recreate them. The following request creates a US-based connected account with the correct configuration and requests the requisite capabilities: ```curl curl https://api.stripe.com/v1/accounts \ -u "<>:" \ -d country=US \ -d "controller[stripe_dashboard][type]=none" \ -d "controller[fees][payer]=application" \ -d "controller[losses][payments]=application" \ -d "controller[requirement_collection]=application" \ -d "capabilities[transfers][requested]=true" \ -d "capabilities[card_issuing][requested]=true" \ -d "capabilities[treasury][requested]=true" \ -d "capabilities[us_bank_account_ach_payments][requested]=true" ``` The user’s account information appears in the response: ```json { ... "id": "{{CONNECTED_ACCOUNT_ID}}", "controller": { "stripe_dashboard": { "type": "none" }, "fees": { "payer": "application" }, "losses": { "payments": "application" }, "is_controller": true, "type": "application", "requirement_collection": "application" }, ... } ``` Note the connected account’s `id`. You’ll provide this value to [authenticate](https://docs.stripe.com/connect/authentication.md) as the connected account by passing it into requests in the `Stripe-Account` header. If a connected account already exists, you can add the requisite capabilities by specifying the connected account `id` in the request: ```curl curl https://api.stripe.com/v1/accounts/{{CONNECTEDACCOUNT_ID}} \ -u "<>:" \ -d "controller[stripe_dashboard][type]=none" \ -d "controller[fees][payer]=application" \ -d "controller[losses][payments]=application" \ -d "controller[requirement_collection]=application" \ -d country=US \ --data-urlencode "email=jenny.rosen@example.com" \ -d "capabilities[transfers][requested]=true" \ -d "capabilities[treasury][requested]=true" \ -d "capabilities[card_issuing][requested]=true" ``` ### Verify the connected account Choose one of the following onboarding options: #### Stripe-hosted onboarding [Stripe-hosted onboarding](https://docs.stripe.com/connect/hosted-onboarding.md) is a web form hosted by Stripe with your brand’s name, color, and icon. Stripe-hosted onboarding uses the [Accounts API](https://docs.stripe.com/api/accounts.md) to read the requirements and generate an onboarding form with robust data validation and is localized for all Stripe-supported countries. Before using Connect Onboarding, you must provide the name, color, and icon of your brand in the Branding section of your [Connect settings page](https://dashboard.stripe.com/test/settings/connect). You can use hosted onboarding to allow connected accounts to link an `external_account` (which is required for payouts) by enabling it through your [Connect Onboarding settings](https://dashboard.stripe.com/settings/connect). To create an onboarding link for the connected account, use the [Account Links API](https://docs.stripe.com/api/account_links/create.md). ```curl curl https://api.stripe.com/v1/account_links \ -u "<>:" \ -d account={{CONNECTED_ACCOUNT_ID}} \ --data-urlencode "refresh_url=https://example.com/reauth" \ --data-urlencode "return_url=https://example.com/return" \ -d type=account_onboarding ``` > For security reasons, don’t email, text, or send account link URLs directly to your connected account. We recommend that you distribute the account link URL from within your platform’s application, where their account is authenticated. The response you receive includes the `url` parameter containing the link for your connected account to onboard to your platform. ```json { "object": "account_link", "created": 1612927106, "expires_at": 1612927406, "url": "https://connect.stripe.com/setup/s/…" } ``` #### Embedded onboarding Embedded onboarding is a themeable onboarding UI with limited Stripe branding. Your platform embeds the [Account onboarding component](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding.md) in your application, and your connected accounts interact with the embedded component without leaving your application. Embedded onboarding uses the [Accounts API](https://docs.stripe.com/api/accounts.md) to read the requirements and generate an onboarding form with robust data validation that’s localized for all Stripe-supported countries. With embedded onboarding, you get a customized onboarding flow without the complexity and maintenance associated with updating your onboarding integration as compliance requirements change. #### API onboarding If you prefer to build custom onboarding for your connected accounts, use the [Accounts update API](https://docs.stripe.com/api/accounts/update.md) and [Persons update API](https://docs.stripe.com/api/persons/update.md) to update the relevant `Account` and `Person` objects with the required information. You must show the [required agreements for Issuing](https://docs.stripe.com/issuing/compliance-us.md#issuing-terms) and record acceptance from connected accounts through the [Issuing TOS acceptance](https://docs.stripe.com/api/accounts/object.md#account_object-settings-card_issuing-tos_acceptance) hash. ```curl curl https://api.stripe.com/v1/accounts/{{CONNECTED_ACCOUNT_ID}} \ -u "<>:" \ -d business_type=company \ -d "business_profile[mcc]=5999" \ --data-urlencode "business_profile[url]=https://www.wesellsocks.com" \ -d "business_profile[estimated_worker_count]=100" \ -d "business_profile[annual_revenue][amount]=1000000" \ -d "business_profile[annual_revenue][currency]=usd" \ -d "business_profile[annual_revenue][fiscal_year_end]=2023-12-31" \ -d "company[name]=Rocket Rides" \ -d "company[tax_id]=11-3456789" \ -d "company[address][line1]=123 Main St" \ -d "company[address][city]=San Francisco" \ -d "company[address][state]=CA" \ -d "company[address][postal_code]=94111" \ -d "company[address][country]=US" \ -d "settings[card_issuing][tos_acceptance][ip]=192.168.123.132" \ -d "settings[card_issuing][tos_acceptance][date]=1696634647" ``` ```curl curl https://api.stripe.com/v1/accounts/{{CONNECTED_ACCOUNT_ID}}/persons \ -u "<>:" \ -d first_name=Jenny \ -d last_name=Rosen \ -d "dob[day]=12" \ -d "dob[month]=11" \ -d "dob[year]=1978" \ -d "address[line1]=510 Townsend Street" \ -d "address[city]=San Francisco" \ -d "address[state]=CA" \ -d "address[postal_code]=94111" \ -d "address[country]=US" \ -d id_number=123456789 \ --data-urlencode "email=jenny.rosen@example.com" \ -d "relationship[representative]=true" \ -d "relationship[owner]=true" \ -d "relationship[percent_ownership]=0.75" ``` See [Handling verification with the API](https://docs.stripe.com/connect/handling-api-verification.md) for additional details on fulfilling onboarding requirements. At this point, Stripe has created and verified the connected account with `active` relevant capabilities to use Issuing and Financial Accounts for platforms. To learn more, see: - [Set up an Issuing and Connect integration](https://docs.stripe.com/issuing/connect.md) - [Stripe hosted onboarding for connected accounts](https://docs.stripe.com/connect/custom/hosted-onboarding.md) - [Creating and using connected accounts](https://docs.stripe.com/connect/interactive-platform-guide.md?connect-charge-type=direct&connect-loss-liability-owner=platform) - [Identify verification for connected accounts](https://docs.stripe.com/connect/identity-verification.md) ## Create financial accounts and add funds After you enable Financial Accounts on your platform, add [FinancialAccount](https://docs.stripe.com/api/treasury/financial_accounts.md) objects to your [platform architecture](https://docs.stripe.com/financial-accounts/connect/account-management/accounts-structure.md) to enable the efficient storing, sending, and receiving of funds. Stripe attaches a financial account to your platform account after enablement, and lets you provision an individual financial account for each eligible connected account on your platform. In the Stripe API, `FinancialAccount` objects serve as the source and destination of money movement API requests. You request `Features` through the API to assign to `FinancialAccounts` that provide additional functionality for the financial accounts on your platform. A financial account operates a distinct [balance of funds](https://docs.stripe.com/financial-accounts/connect/account-management/working-with-balances-and-transactions.md) from the connected account payments balance of the account it’s linked to. For example, the owner of a connected account on your platform might have a 100 USD connected account balance and a 200 USD financial account balance. In this scenario, the connected account owner has a sum of 300 USD spread between their financial account and connected account balances. These two balances remain separate, but the API provides the ability to move money from the connected account balance to the financial account balance. ### Create a Financial Account After Stripe adds the `treasury` capability to an account and it’s marked `active`, you can create a `FinancialAccount` object for the connected account. To do this, call `FinancialAccounts` and request the `Features` you want to provide: ```curl curl https://api.stripe.com/v1/treasury/financial_accounts \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" \ -d "supported_currencies[]=usd" \ -d "features[card_issuing][requested]=true" \ -d "features[deposit_insurance][requested]=true" \ -d "features[financial_addresses][aba][requested]=true" \ -d "features[inbound_transfers][ach][requested]=true" \ -d "features[intra_stripe_flows][requested]=true" \ -d "features[outbound_payments][ach][requested]=true" \ -d "features[outbound_payments][us_domestic_wire][requested]=true" \ -d "features[outbound_transfers][ach][requested]=true" \ -d "features[outbound_transfers][us_domestic_wire][requested]=true" ``` The response, when you request features on financial account creation, indicates their status in the `active_features`, `pending_features`, and `restricted_features` parameters: ```json { "object": "treasury.financial_account", "created": 1612927106, "id": "fa_123", "country": "US", "supported_currencies": ["usd"], "active_features": ["card_issuing"], "pending_features": ["financial_addresses.aba"], "restricted_features": [], // No FinancialAddress added as the financial_addresses.aba feature is not yet active "financial_addresses": [], "livemode": true, "status": "open", ... } ``` Activation might be instantaneous for some features (for example, `card_issuing`). However, other features, like `financial_addresses.aba`, [activate asynchronously](https://docs.stripe.com/financial-accounts/connect/account-management/financial-account-features.md#webhooks) and might stay `pending` for up to 30 minutes while Stripe communicates with external systems. After all of the relevant features are active, you get confirmation on the `treasury.financial_account.features_status_updated` webhook listener. See [Available features](https://docs.stripe.com/financial-accounts/connect/account-management/financial-account-features.md#available-features) for more information on financial account features. ### Link a bank account To let your customers transfer money to and from an external account, create a `SetupIntent` with the required parameters, and denote that your customer owns the external account by attaching it to `self`: ```curl curl https://api.stripe.com/v1/setup_intents \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" \ -d attach_to_self=true \ -d "flow_directions[]=inbound" \ -d "flow_directions[]=outbound" \ -d "payment_method_types[]=us_bank_account" \ -d "payment_method_data[type]=us_bank_account" \ -d "payment_method_data[us_bank_account][routing_number]=110000000" \ -d "payment_method_data[us_bank_account][account_number]=000123456789" \ -d "payment_method_data[us_bank_account][account_holder_type]=company" \ -d "payment_method_data[billing_details][name]=Company Corp" \ -d confirm=true \ -d "mandate_data[customer_acceptance][type]=online" \ -d "mandate_data[customer_acceptance][online][ip_address]=123.123.123.123" \ --data-urlencode "mandate_data[customer_acceptance][online][user_agent]=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" ``` The API response includes a unique identifier for the `payment_method` that’s used to reference this bank account when making ACH transfers: ```json { "id": "{{SETUP_INTENT_ID}}", "object": "setup_intent", "next_action": { "type": "verify_with_microdeposits", "verify_with_microdeposits": { "arrival_date": 1642579200, "hosted_verification_url": "https://payments.stripe.com/microdeposit/sacs_test_xxx", "microdeposit_type": "amounts" } }, ... "payment_method": "{{PAYMENT_METHOD_ID}}", "payment_method_types": [ "us_bank_account" ] } ``` Before you can use a bank account, it must be verified using microdeposits (which we focus on here) or the faster [financial connections](https://docs.stripe.com/financial-connections.md) option. The `SetupIntent` response from the previous step includes a `hosted_verification_url` which you must present to your customer for them to input the associated descriptor code of the microdeposit. Use the value `SM11AA` to verify the bank account, or test a variety of other cases by using the [test account numbers](https://docs.stripe.com/payments/ach-direct-debit/set-up-payment.md?platform=web&payment-ui=stripe-hosted#test-account-numbers) Stripe provides. ![Microdeposit verification](https://b.stripecdn.com/docs-statics-srv/assets/microdeposit-verification.a9151fafd6f3582cb8a268bf7b1b306e.png) Microdeposit verification ### Add funds to the financial account #### Embedded Using the embedded [Financial account component](https://docs.stripe.com/connect/supported-embedded-components/financial-account.md) in your application, you can enable your Connected Accounts to transfer funds into the Financial account. ## Create an Account Session When [creating an Account Session](https://docs.stripe.com/api/account_sessions/create.md), enable the financial account component by specifying `financial_account` in the `components` parameter. You can enable or disable individual features of the financial account component by specifying the `features` parameter under `financial_account`. ```curl curl https://api.stripe.com/v1/account_sessions \ -u "<>:" \ -d "account={{CONNECTEDACCOUNT_ID}}" \ -d "components[financial_account][enabled]=true" \ -d "components[financial_account][features][send_money]=true" \ -d "components[financial_account][features][transfer_balance]=true" \ -d "components[financial_account][features][external_account_collection]=true" ``` After creating the account session and [initializing ConnectJS](https://docs.stripe.com/connect/get-started-connect-embedded-components.md#account-sessions), you can render the financial account component in the frontend: #### JavaScript ```js // Include this element in your HTML const financialAccount = stripeConnectInstance.create('financial-account'); financialAccount.setFinancialAccount('{{FINANCIAL_ACCOUNT_ID}}') container.appendChild(financialAccount); ``` From here, users can click **Move money** to initiate a transfer. #### API The following request transfers 200 USD using an `account-attached` payment method into the financial account with the provided ID. The `Stripe-Account` header value identifies the Stripe account that owns both the financial account and the payment method: ```curl curl https://api.stripe.com/v1/treasury/inbound_transfers \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" \ -d origin_payment_method={{PAYMENT_METHOD_ID}} \ -d financial_account={{FINANCIAL_ACCOUNT_ID}} \ -d amount=20000 \ -d currency=usd \ -d "description=Funds for repair" \ -d "statement_descriptor=Invoice 12" ``` If successful, the response provides the `InboundTransfer` object. The object includes a `hosted_regulatory_receipt_url` that provides access to details of the transaction for the account holder on the Homebox platform: ```json { "id": "{{INBOUND_TRANSFER_ID}}", "object": "inbound_transfer", "amount": 20000, "created": 1648071297, "currency": "usd", "description": "Funds for repair", "financial_account": "{{FINANCIAL_ACCOUNT_ID}}", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/{{IBT_URL}}", "linked_flows": null, "livemode": false, "metadata": {}, "origin_payment_method": "{{PAYMENT_METHOD_ID}}", ... "statement_descriptor": "Invoice 12", "status": "processing", ... } ``` At this point, the connected account has a `FinancialAccount` that has been loaded with funds received from an `InboundTransfer` that you can spend using cards or `OutboundPayments` like ACH or wires. To learn more, see: - [Getting permissions for InboundTransfers](https://docs.stripe.com/financial-accounts/connect/moving-money/working-with-bankaccount-objects.md#permissions) - [Working with Financial Accounts for platforms](https://docs.stripe.com/financial-accounts/connect/account-management/financial-accounts.md) - [Using Financial Accounts to move money](https://docs.stripe.com/financial-accounts/connect/examples/moving-money.md#microdeposits) - [Requesting features on a Financial Account](https://docs.stripe.com/financial-accounts/connect/account-management/financial-account-features.md#available-features) - [Working with SetupIntents, PaymentMethods, and BankAccounts](https://docs.stripe.com/financial-accounts/connect/moving-money/working-with-bankaccount-objects.md) - [Moving money using InboundTransfer objects](https://docs.stripe.com/financial-accounts/connect/moving-money/into/inbound-transfers.md) - [Moving money using ReceivedCredit objects](https://docs.stripe.com/financial-accounts/connect/moving-money/into/received-credits.md) ## Create cardholders and cards #### Embedded The [Cardholder](https://docs.stripe.com/api/issuing/cardholder/object.md) is the individual (that is, employee or contractor) that’s authorized by your business customer to use card funding by the associated balance. The `Cardholder` object includes relevant details, such as a [name](https://docs.stripe.com/api/issuing/cardholders/object.md#issuing_cardholder_object-name) to display on cards and a [billing](https://docs.stripe.com/api/issuing/cardholders/object.md#issuing_cardholder_object-billing) address, which is usually the business address of the connected account or your platform. Use the embedded [Issuing cards list component](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list.md) to enable your connected accounts to create a [Card](https://docs.stripe.com/api/issuing/cards/object.md) for a Cardholder and associate it with the Financial Account. Note: The following is a preview/demo component that behaves differently than live mode usage with real connected accounts. The actual component has more functionality than what might appear in this demo component. For example, for connected accounts without Stripe dashboard access (custom accounts), no user authentication is required in production. When [creating an Account Session](https://docs.stripe.com/api/account_sessions/create.md), enable the Issuing cards list component by specifying `issuing_cards_list` in the `components` parameter. You can enable or disable individual features of the Issuing cards list component by specifying the `features` parameter under `issuing_cards_list`. ```curl curl https://api.stripe.com/v1/account_sessions \ -u "<>:" \ -d "account={{CONNECTEDACCOUNT_ID}}" \ -d "components[issuing_cards_list][enabled]=true" \ -d "components[issuing_cards_list][features][card_management]=true" \ -d "components[issuing_cards_list][features][cardholder_management]=true" \ -d "components[issuing_cards_list][features][card_spend_dispute_management]=true" \ -d "components[issuing_cards_list][features][spend_control_management]=true" ``` After creating the account session and [initializing ConnectJS](https://docs.stripe.com/connect/get-started-connect-embedded-components.md#account-sessions), you can render the Issuing cards list component in the front end: #### JavaScript ```js // Include this element in your HTML const issuingCardsList = stripeConnectInstance.create('issuing-cards-list'); issuingCardsList.setShowSpendControls(true); container.appendChild(issuingCardsList); ``` From here, users can click **Create card** to begin creating a new Cardholder and Card. The user can also activate the card during creation, or do so afterwards. At this point, there’s an active card attached to a cardholder and financial account. See the [Issuing page](https://dashboard.stripe.com/issuing/overview) for the connected account to view the card and cardholder information. To learn more, see: - [Virtual cards with Issuing](https://docs.stripe.com/issuing/cards/virtual.md) - [Physical cards](https://docs.stripe.com/issuing/cards/physical.md) - [Use the Dashboard for Issuing with Connect](https://docs.stripe.com/issuing/connect.md#using-dashboard-issuing) - [Create cards with the API](https://docs.stripe.com/api/issuing/cards.md) #### API ### Create a cardholder The [Cardholder](https://docs.stripe.com/api/.md#issuing_cardholder_object) is the individual (that is, employee or contractor) that’s authorized by your business customer to use card funding by the `FinancialAccount`. The `Cardholder` object includes relevant details, such as a [name](https://docs.stripe.com/api/issuing/cardholders/object.md#issuing_cardholder_object-name) to display on cards and a [billing](https://docs.stripe.com/api/issuing/cardholders/object.md#issuing_cardholder_object-billing) address, which is usually the business address of the connected account or your platform. The following API call creates a new `Cardholder`: ```curl curl https://api.stripe.com/v1/issuing/cardholders \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" \ -d "name=Jenny Rosen" \ --data-urlencode "email=jenny.rosen@example.com" \ --data-urlencode "phone_number=+18008675309" \ -d status=active \ -d type=individual \ -d "individual[first_name]=Jenny" \ -d "individual[last_name]=Rosen" \ -d "individual[dob][day]=1" \ -d "individual[dob][month]=11" \ -d "individual[dob][year]=1981" \ -d "billing[address][line1]=123 Main Street" \ -d "billing[address][city]=San Francisco" \ -d "billing[address][state]=CA" \ -d "billing[address][postal_code]=94111" \ -d "billing[address][country]=US" ``` Stripe returns a `Cardholder` object that contains the information you provided and sends the `issuing_cardholder.created` webhook event. ### Create a card Create a card and attach it to the `Cardholder` that you want to make the authorized user of the card, and the `FinancialAccount` for support card spend. In the following examples, we show you how to create a [virtual card](https://docs.stripe.com/issuing/cards/virtual.md). You can, however, create [physical cards](https://docs.stripe.com/issuing/cards/physical.md) and ship them to cardholders in live mode. ```curl curl https://api.stripe.com/v1/issuing/cards \ -u "<>:" \ -d currency=usd \ -d type=virtual \ -d "cardholder={{ISSUINGCARDHOLDER_ID}}" ``` Stripe returns a `Card` object on creation, and sends the `issuing_card.created` webhook event: ```json { "id": "ic_1NvPjF2SSJdH5vn2OVbE7r0b", "object": "issuing.card", "brand": "Visa", ... "status": "inactive", "type": "virtual" } ``` You need to activate the card before a user can use it. While you can activate virtual cards in the same API call you used to create it, you must activate physical cards separately. When ready, activate the card by marking the `status` as `active`: ```curl curl https://api.stripe.com/v1/issuing/cards/ic_1NvPjF2SSJdH5vn2OVbE7r0b \ -u "<>:" \ -d status=active ``` At this point, there’s now an active card attached to a cardholder and financial account. See the [Issuing page](https://dashboard.stripe.com/issuing/overview) for the connected account to view the card and cardholder information. ```json { "id": "ic_1NvPjF2SSJdH5vn2OVbE7r0b", "object": "issuing.card", "brand": "Visa", ... "status": "active", "type": "virtual" } ``` To learn more, see: - [Virtual cards](https://docs.stripe.com/issuing/cards/virtual.md) - [Physical cards](https://docs.stripe.com/issuing/cards/physical.md) - [Use the Dashboard for Issuing with Connect](https://docs.stripe.com/issuing/connect.md#using-dashboard-issuing) - [Create cards with the API](https://docs.stripe.com/api/issuing/cards.md) ## Use the card ### Create an authorization To observe the impact of card activity on the associated balance, generate a test authorization. You can do this in the **Issuing page** of the Dashboard for the connected account, or with the following call to the [Authorization API](https://docs.stripe.com/api/issuing/authorizations.md): ```curl curl https://api.stripe.com/v1/test_helpers/issuing/authorizations \ -u "<>:" \ -d "card={{ISSUINGCARD_ID}}" \ -d amount=1000 \ -d authorization_method=chip \ -d "merchant_data[category]=taxicabs_limousines" \ -d "merchant_data[city]=San Francisco" \ -d "merchant_data[country]=US" \ -d "merchant_data[name]=Rocket Rides" \ -d "merchant_data[network_id]=1234567890" \ -d "merchant_data[postal_code]=94107" \ -d "merchant_data[state]=CA" ``` After approval, Stripe creates an `Authorization` in a `pending` state while it waits for [capture](https://docs.stripe.com/issuing/purchases/transactions.md). Note the authorization `id` that you’ll use to capture the funds: ```json {"id": "iauth_1NvPyY2SSJdH5vn2xZQE8C7k", "object": "issuing.authorization", "amount": 1000, ... "status": "pending", "transactions": [] } ``` You can use retrieve the balance details of the financial account and see the impact of the authorization: ```curl curl https://api.stripe.com/v1/treasury/financial_accounts/{{TREASURYFINANCIALACCOUNT_ID}} \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" ``` The API response is a `FinancialAccount` object with a `balance` hash that details the funds and their availability: ```json { "object": "treasury.financial_account", "id": "{{FINANCIAL_ACCOUNT_ID}}", ... "balance": { "cash": {"usd": 19000}, "inbound_pending": {"usd": 0}, "outbound_pending": {"usd": 1000} } } ``` The response indicates 190 USD is currently available for use with an additional 10 USD held in `outbound_pending` from the `pending` authorization. You can now simulate capture of the authorization with the API. ### Capture the funds Capture the funds using the following code: ```curl curl -X POST https://api.stripe.com/v1/test_helpers/issuing/authorizations/{{ISSUINGAUTHORIZATION_ID}}/capture \ -u "<>:" ``` After the authorization is captured, Stripe creates an Issuing [Transaction](https://docs.stripe.com/issuing/purchases/transactions.md), the `status` of the authorization is set to `closed`, and a `ReceivedDebit` webhook is created with these details. Retrieving the balance details of the financial account again shows the `outbound_pending` is now 0 USD while the available cash is remains 190 USD: ```json { "object": "treasury.financial_account", "id": "{{FINANCIAL_ACCOUNT_ID}}", ... "balance": { "cash": {"usd": 19000}, "inbound_pending": {"usd": 0}, "outbound_pending": {"usd": 0} } } ``` ## See also - [Spending controls](https://docs.stripe.com/issuing/controls/spending-controls.md) - [Issuing authorizations](https://docs.stripe.com/issuing/purchases/authorizations.md) - [Issuing transactions](https://docs.stripe.com/issuing/purchases/transactions.md) - [Working with Stripe Issuing cards and Financial Accounts for platforms](https://docs.stripe.com/financial-accounts/connect/account-management/issuing-cards.md) - [Manage transaction fraud](https://docs.stripe.com/issuing/manage-fraud.md)