コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けリソース
概要
導入を開始
資金調達と財務
Treasury
    概要
    Treasury の仕組み
    利用資格要件
    始める
    API の使用を開始
    ユーザーのアカウント登録
    不正利用の管理
    マーケティングと法令遵守のガイドライン
    導入のサンプル
    Treasury を使用して金融アカウントとカードを設定する
    Treasury を使用して資金を移動する
    Issuing と Treasury のサンプルアプリケーション
    Treasury with Issuing
    Issuing and Treasury Webhooks
    Work with cards
    アカウント管理
    Stripe Treasury のアカウント構造
    連結アカウントの使用
    金融口座を使用する
    金融アカウントの機能
    プラットフォームの金融アカウント
    残高と取引の使用
    資金移動
    Stripe Payments からの入金とトップアップ
    SetupIntent、PaymentMethod、BankAccount を使用する
    金融アカウントに資金を移動する
      InboundTransfer オブジェクトを使用して Treasury で送金
      ReceivedCredit オブジェクトを使用して Treasury で送金
      CreditReversals オブジェクトを使用して Treasury で送金
    金融アカウントから資金を移動する
    資金移動のタイムライン
    銀行パートナー
    Fifth Third Bank の概要
    Fifth Third Bank の使用を開始
Capital
支払い管理
カードを発行する
グローバル入金
資金の管理
ホーム資金管理TreasuryMoving money into financial accounts

CreditReversals オブジェクトを使用して Treasury で送金

受領したクレジットから返金して Treasury の金融口座に資金を追加する方法とそのシナリオをご紹介します。

ReceivedCredit を差戻すと、CreditReversal が作成されます。ReceivedCredits は、一部のケース (以下の表で説明) でのみ差戻しできます。ReceivedCredit を差戻しできるかどうかは、ネットワークとソースフローによって決まります。

ReceivedCredit オブジェクトの reversal_details サブハッシュには以下の値の組み合わせを使用できます。これによって、ReceivedCredit を差戻せるかどうかが決まります。

制限理由期限 (Epoch タイムスタンプ)シナリオ例
source_flow_restrictednullOutboundPayment 以外のフローから発生した Stripe ネットワークの ReceivedCredit。Stripe ではユーザーによるこのような ReceivedCredits の差戻しを制限しています。
network_restrictednullネットワークの制約により、Stripe は電信送金からの ReceivedCredit など、一部の ReceivedCredits を差戻すことができません。
null{{TIMESTAMP}}deadline のタイムスタンプまでであれば差戻すことができる ReceivedCredit。ACH ReceivedCredits には、差戻し可能な期間を決定する期限が設定されています。
deadline_passed{{TIMESTAMP}}deadline のタイムスタンプ以前であれば差戻し可能であったが、deadline を過ぎたために差戻しできなくなった ReceivedCredit。ACH ReceivedCredits は、作成後に差戻し可能な時間が制限されています。
already_reversednullすでに差戻しされている ReceivedCredit には、この restricted_reason が設定されます。null 以外の deadline 値があることがあります。
nullnullrestricted_reason と deadline の両方に null が設定されている場合は、いつでも ReceivedCredits を差戻すことができます。

CreditReversal を作成する

POST /v1/treasury/credit_reversals を使用して CreditReversal を作成します。リクエストの本文で、received_credit パラメーターを差戻し対象の ReceivedCredit の ID に設定します。

注

CreditReversals を更新できないため、作成時にオプションのメタデータを設定する必要があります。

以下のリクエストは、必須の received_credit パラメーターの ReceivedCredit ID 値に基づいて CreditReversal を作成します。このリクエストは、オプションのメタデータ値も設定します。

Command Line
cURL
curl https://api.stripe.com/v1/treasury/credit_reversals \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d received_credit={{RECEIVED_CREDIT_ID}} \ -d "metadata[reason]"=Because

成功するとレスポンスで、新しい CreditReversal オブジェクトが返されます。

{ "id": "{{CREDIT_REVERSAL_ID}}", "object": "credit_reversal", "amount": 1000, "currency": "usd", "financial_account": "{{FINANCIAL_ACCOUNT_ID}}", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/{{URL_ID}}", "livemode": false, "metadata": { "csr_id": "CSR-12"

CreditReversal を取得する

GET /v1/treasury/credit_reversals/{{CREDIT_REVERSAL_ID}} を使用して、関連付けられた ID の CreditReversal を取得します。

Command Line
cURL
curl https://api.stripe.com/v1/treasury/credit_reversals/{{CREDIT_REVERSAL_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"

レスポンスで、特定の CreditReversal オブジェクトが返されます。

JSON (コメント付き)
{ "id": "{{CREDIT_REVERSAL_ID}}", "object": "credit_reversal", "livemode": "{{Boolean}}", "created": "{{Timestamp}}", "financial_account": "{{FINANCIAL_ACCOUNT_ID}}", "amount": 1000, "currency": "usd", // The ReceivedCredit that was reversed "received_credit": "{{RECEIVED_CREDIT_ID}}", // The rails used to reversed. Always the same as that of the ReceivedCredit "network": "ach", "status": "processing" | "posted", "status_transitions": { "posted_at": null | "{{Timestamp}}", }, // Transaction representing balance impact of the CreditReversal "transaction": "{{TRANSACTION_ID}}", // A unique, Stripe-hosted direct link to the regulatory receipt for the CreditReversal "hosted_regulatory_receipt_url": "{{Url}}", // A map of String-String intended for users to use custom data "metadata": {}, }

CreditReversal を一覧表示する

GET /v1/treasury/credit_reversals を使用して、必須の financial_account パラメーターで指定された ID の金融口座について、CreditReversals のリストを取得します。標準のリストパラメーター、status、または received_credit パラメーターを使用する ReceivedCredit ID でリストをフィルタリングできます。

{ // Standard list parameters "limit", "starting_after", "ending_before", // Filter by status "status": "processing" | "posted", // Filter by FinancialAccount (Required) "financial_account": "{{FINANCIAL_ACCOUNT_ID}}", // Filter by ReceivedCredit "received_credit": "{{RECEIVED_CREDIT_ID}}" }

以下のリクエストは、指定された金融口座についてステータスが posted の、最新の 3 件のクレジット差戻しを返します。

Command Line
cURL
curl -G https://api.stripe.com/v1/treasury/credit_reversals \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d limit=3 \ -d status=posted \ -d financial_account=
{{FINANCIAL_ACCOUNT_ID}}

成功すると、該当する CreditReversal オブジェクトのリストがレスポンスで返されます。

CreditReversal をテストする

CreditReversals をテストするには、まず test ReceivedCredits を作成する必要があります。次に、POST /v1/treasury/credit_reversals を使用し、received_credit パラメーターにテスト用の ReceivedCredit ID を指定して、テスト用の CreditReversal を作成します。

CreditReversal Webhook

Stripe は、Webhook エンドポイントに以下の CreditReversal イベントを送信します。

  • CreditReversal 作成時の treasury.credit_reversal.created。
  • CreditReversal 転記時の treasury.credit_reversal.posted。
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc