連結アカウントに対する API コールを実行する
API コールに適切な情報を追加して、連結アカウントに対してコールを実行する方法について説明します。
連結アカウントに対して API コールを実行できます。
- リクエストごとに、Stripe-Account ヘッダーと連結アカウントの ID を使用してサーバ側で実行
- 連結アカウントの ID を引数としてクライアントライブラリに渡して、クライアント側で実行
パフォーマンスと信頼性を高めるために、Stripe では API エンドポイントに対してレート制限と割り当てを設定しています。
Add the Stripe-Account header server-side 
連結アカウントに対してサーバー側の API コールを実行するには、acct_
で始まるアカウント ID を指定した Stripe-Account
ヘッダーを使用します。プラットフォームの API シークレットキーと連結アカウントの Account (アカウント) ID を使用する 4 つの例を以下に示します。
URL に Stripe アカウント ID を含む API リクエストのすべてで、Stripe-Account
ヘッダーによる方法が必要になります。下記は、URL 内のユーザーのアカウント ID を使用してアカウントを取得する方法を示す例です。
Stripe のすべてのサーバ側ライブラリでは、この方法がリクエストごとにサポートされます。
Add the connected account ID to a client-side application
クライアント側ライブラリでは、連結アカウントの ID がクライアントアプリケーションへの引数として設定されます。
Connect 埋め込みコンポーネントの使用
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.