VOOZH about

URL: https://docs.stripe.com/context

⇱ Stripe-Context header | Stripe Documentation


Skip to content

Stripe-Context header

Perform API operations on related accounts.

By default, API requests execute on the Stripe account that generated the accompanying API key. However, you can use the Stripe-Context header to perform an API request in the context of a related account.

Note

The Stripe-Context header supersedes the Stripe-Account header, which facilitates performing API operations on connected accounts. Stripe-Context expands the scope and the types of related accounts they can access.

API request scope

You can make API requests to operate within different scopes:

  • Your own account
  • Any connected account in your platform
  • Any v2 account with at least the merchant or recipient configuration
  • Any account in your organization

When you make an API request targeting an account other than that of the API key, you must identify the intended account by including the Stripe-Context header. The value depends on the relative relationship of the intended account to the API key used to make the request.

For example, consider an organization with multiple platform accounts representing different business lines. Each platform has connected accounts and one connected account has a recipient account.

Given this business structure, it’s possible to perform API requests using several different scopes. The following table shows the Stripe-Context format for each different scope that requires context based on its relationship to the account the requesting API key belongs to.

Requesting API key owner Scope accountStripe-Context format
Rocket, Inc.Rocket RidesPlatform ID: acct_111
Rocket, Inc.Driver SmithPlatform ID/Connected account ID: acct_111/acct_111a
Rocket RidesDriver SmithConnected account ID: acct_111a
Rocket DeliveriesCourier VegaConnected account ID: acct_333a
Rocket RidesFuel CityConnected account ID/Recipient ID: acct_111a/acct_111b