ReceivedDebit オブジェクトを使用して Treasury で送金
外部の口座保有者が Treasury の金融口座から資金を引き出す方法をご紹介します。
Certain processes initiated outside of Financial Accounts for platforms result in money being pulled out of a financial account. This includes:
- Spending money on a card through Stripe Issuing
- ACH デビットを使用して、金融口座から資金を引き出し、外部口座に追加する
- Pulling money out of a platform’s financial account into that platform’s Stripe Payments balance using top-ups
このような資金を移動すると、ReceivedDebit
オブジェクトが作成されます。ご自身で直接 ReceivedDebits
を作成することはなく、Webhook を使用して ReceivedDebit
オブジェクトが作成されるのを監視します。アカウントに十分な資金がなければ、ほとんどの場合 ReceivedDebit
は失敗します。
ReceivedDebit を取得する
GET /v1/treasury/received_
を使用して、関連付けられた ID の ReceivedDebit
を取得します。
成功すると、関連付けられた ID の ReceivedDebit
オブジェクトがレスポンスで返されます。 レスポンスの一部のパラメーターには、expand[]
パラメーターに値として追加した場合にのみ返される追加情報があります。次のレスポンス例で、拡張できるフィールドには、「Expandable」コメントが付いています。オブジェクトレスポンスの拡張の詳細については、レスポンスを拡張するをご覧ください。
ReceivedDebit を一覧表示する
GET /v1/treasury/received_
を使用して特定の金融口座のすべての ReceivedDebits
を取得します。financial_
パラメーターには金融口座 ID を指定する必要があります。標準のリストパラメーターまたは status
で結果をフィルタリングできます。
{ // Standard list parameters "limit", "starting_after", "ending_before", // Filter by FinancialAccount (Required) "financial_account": "{{FINANCIAL_ACCOUNT_ID}}", // Filter by status "status": "succeeded" | "failed" }
以下のリクエストは、特定された金融口座に対する指定された ReceivedDebit
以前に発生した、最後の成功した ReceivedDebit オブジェクト を取得します。
ReceivedDebit をテストする
Financial Accounts for platforms provides test endpoints for ReceivedDebit
objects. In testing environments, use POST /v1/test_
to simulate ReceivedDebit
creation. You can’t create ReceivedDebit
objects in live mode, so using this endpoint enables you to test the flow of funds when a third party initiates creation of a ReceivedDebit
. Set financial_
to the ID of the financial account to send money from. Set network
to ach
and optionally provide the ABA financial address details for the source_
parameter. As in live mode, test ReceivedDebits
fail if there are insufficient funds available.
ReceivedDebit Webhook
Stripe は、以下の ReceivedDebit
イベントを Webhook エンドポイントに送信します。
ReceivedDebit
作成時のtreasury.
。received_ debit. created