Skip to content
Sign in
An image of the Stripe logo
/
Create account
Sign in
Home
Payments
Finance automation
Banking as a service
Developer tools
No-code
All products
Home
Payments
Finance automation
Home
Payments
Finance automation
Banking as a service
Developer tools
Overview
Get started
About Stripe payments
Start an integration
Payment Links
Checkout
Web Elements
Mobile Elements
Payment scenarios
During the payment
After the payment
Add payment methods
More payment scenarios
Faster checkout with Link
Other Stripe products
Connect
    Overview
    Get started
    Collect payments then pay out
    Enable other businesses to accept payments directly
    Pay out money
    Explore Connect
    Onboard your accounts
    Choose your account type
    Standard
    Express
    Custom
    Update accounts
    Service agreement types
    Payment methods
    Account capabilities
    Handle verification with the API
    Additional Verifications
    Update verified info
    Connect embedded components
    Quickstart
    Quickstart (beta)
    Get started with Connect embedded components
    Customize Connect embedded components
    Accept payments
    Create a charge
    Create a payments page
    Create payment links with Connect
    Connect integration guide
    Dynamic payment methods
    Set statement descriptors
    Connect platforms using the Payment Methods API
    Create subscriptions
    Create invoices
    Debit Express and Custom connected accounts
    Pay out
    Set bank and debit card payouts
    Bank accounts and debit cards
    Manage payout schedule
    Manual payouts
    Payout reversals
    Instant Payouts
    Cross-border payouts
    Crypto payouts
    Manage funds
    Add money to your platform balance
    Account balance
    Handle multiple currencies
    Manage accounts
    Best practices
    Listen for updates
    Dashboard account management
    Understanding risk offerings
    Platform controls for Standard accounts
    Make API calls for connected accounts
    Set MCCs
    Testing
    Payment Method Configurations API
    Migrate to Payment Method Configurations API
    Multiple payment method configurations
    Manage tax forms
    Overview
    Get started with tax reporting
    1099 Tax Support and Communication Guide
    Tax form settings
    Calculation methods
    Identity information on tax forms
    File tax forms
    File tax forms with states
    Identify forms with missing information
    Update tax forms
    Deliver tax forms
    Deliver tax forms with Stripe Express
    Correct tax forms
    Split tax forms
    Tax year changeover
    What's new for tax year 2023
Terminal
Radar
Financial Connections
Crypto
Identity
Climate
Resources
About the APIs
Implementation guides
Regulation support
Testing
Connect
·
HomePaymentsConnect

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.

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 optimize performance and reliability, Stripe has established rate limits and allocations for API endpoints.

Adding the Stripe-Account header server-side

For server-side API calls, you can make requests as connected accounts using the special header Stripe-Account with the Stripe account identifier (it starts with the prefix acct_) of your platform user. Here’s an example that shows how to Create a PaymentIntent with your platform’s API secret key and your user’s Account identifier.

Command Line
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d amount=1000 \ -d currency=usd \ -d "automatic_payment_methods[enabled]"=true

In the latest version of the API, specifying the automatic_payment_methods parameter is optional because Stripe enables its functionality by default.

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 https://api.stripe.com/v1/accounts/
{{CONNECTED_ACCOUNT_ID}}
\ -u "
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:"

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

Command Line
curl https://api.stripe.com/v1/customers \ -u "
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:"
\ -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('{{PLATFORM_PUBLISHABLE_KEY}}', { stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', });

See also

  • Creating charges
  • Using subscriptions
Was this page helpful?
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Questions? Contact Sales.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Adding the Stripe-Account header server-side
Adding the connected account ID to a client-side application
See also
Products Used
Connect
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$