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
Get started with Connect
Integration fundamentals
    Make API calls for connected accounts
    Integration recommendations
    Listen for updates
    Testing
    Accounts v2 API overview
Example integrations
Onboard accounts
Configure account Dashboards
Accept payments
Pay out to accounts
Manage your Connect platform
Tax forms for your Connect platform
Work with connected account types
HomePlatforms and marketplacesIntegration fundamentals

Making API calls for connected accounts

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

Copy page

You can make API calls for your connected accounts:

  • Server-side with the Stripe-Account header and the connected account ID, per request
  • Client-side by passing 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.

Adding the Stripe-Account header server-side

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

Command Line
cURL
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 Stripe account ID in the URL. Here’s an example that shows how to Retrieve an account with your user’s Account identifier in the URL.

Command Line
cURL
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
curl https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ --data-urlencode email="person@example.com"

Adding 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}}
, });

See also

  • Creating charges
  • Using subscriptions
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc