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
Get started with Connect
Design your integration
Integration fundamentals
    Make API calls for connected accounts
    Integration recommendations
    Migrate to a supported configuration
    Configure the behavior of connected accounts
    Use the Accounts v2 API in your existing integration
    Listen for updates
    Testing
Example integrations
Account management
Onboard connected accounts
Configure account Dashboards
Capabilities and information requirements
Work with connected account types
Payment processing
Accept payments
Pay out to accounts
Platform administration
Manage your Connect platform
Tax forms for your Connect platform
United States
English (United States)
  1. Home/
  2. Platforms and marketplaces/
  3. Integration fundamentals

Make API calls for connected accounts

Learn how to make API calls for your connected accounts on the server or the client.

You can make API calls for your connected accounts on the server or on the client:

  • Server-side: Include the connected account ID in the Stripe-Account header on each request
  • Client-side: Pass the connected account ID as an argument to the client library

To help with performance and reliability, Stripe has established rate limits and allocations for API endpoints.

Add the Stripe-Account header server-side

To make server-side API calls for connected accounts, use the Stripe-Account header with the Account ID, which begins with the prefix acct_. Here are four examples using your platform’s API secret key and the connected account’s Account ID:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d amount=1000 \ -d currency=usd

The Stripe-Account header approach is implied in any API request that includes the Account ID in the URL. This example shows how to Retrieve an Account by including its ID in the request URL.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/accounts/
{{CONNECTED_ACCOUNT_ID}}
\ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:"

All of Stripe’s server-side libraries support this approach on a per-request basis:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/customers \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ --data-urlencode "email=person@example.com"

Add the connected account ID to a client-side application

Client-side libraries set the connected account ID as an argument to the client application:

The JavaScript code for passing the connected account ID client-side is the same for plain JS and for ESNext.

var stripe = Stripe('pk_test_TYooMQauvdEDq54NiTphI7jx', { stripeAccount:
'{{CONNECTED_ACCOUNT_ID}}'
, });

Use Connect embedded components

Instead of directly integrating with Stripe’s APIs, you can use Connect embedded components to provide Stripe functionality to your connected accounts in your platform’s UI. These components require less code to implement and handle all API calls internally.

For example, to show payments data to your connected accounts, embed the Payments component in your platform’s UI. This eliminates the need to make separate calls to the Charges, Payment Intents, Refunds, and Disputes API.

For a complete list of the available embedded components, see Supported components.

See also

  • Creating charges
  • Using subscriptions
  • Getting started with Connect embedded components
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc
On this page
Advertisement
Advertisement