払い戻しのフロー
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
概要
払い戻しは、ユーザーのアクティブな操作([払い戻し] ボタンを押す)によって開始することも、ユーザーの代わりに自動的に開始することもできます。トリガーされたトリガーにかかわらず、払い戻しリクエストは Google からインテグレーターに送信されます。
フローの仕組み
ユーザーが開始する払い戻しフローの例を次に示します。
払い戻しフロー

上の図のオブジェクトは次のとおりです。
- お客様: 全額払い戻しまたは一部払い戻しを希望しているユーザーです。
- Google サーバー: 決済インテグレーター サーバーに払い戻しコマンドを送信する Google のバックエンド サーバー。
- 決済インテグレータ サーバー: 払い戻しのリクエストを受け入れるインテグレータのバックエンド サーバー。
この例の払い戻しは、ユーザーによって開始されます。
- ユーザーが Google サーバーへの払い戻し手続きを開始します。
- Google サーバーが、決済インテグレーター サーバーの
Refund
エンドポイントを呼び出します。
- 決済インテグレータ サーバーは「Success」を返します。
- お客様に払い戻しが行われます。
ベスト プラクティスとその他の考慮事項
Google 広告などの一部の Google サービスでは、アカウントにクレジットが残っている限り払い戻しがサポートされているため、トランザクションの払い戻しリクエストは無期限に実施する必要があります。技術的な制限がある場合、払い戻し期間はプラットフォームで認められる期間にする必要があります。
GPT の有効期限が切れている場合でも、払い戻しは正常に機能します。払い戻しが不承認となるのは、元の取引の残高が払い戻し額に満たない場合、またはアカウントが閉鎖されているか保留中で、インテグレータがユーザーにこの金額を送金できない場合のみです。
回収は、回収から数秒以内に開始されます。払い戻しの時期は Google の裁量によります。
払い戻しを全額払い戻しとみなすべきではありません。アカウントの払い戻しを行う際は、常に refundAmount
フィールドを考慮する必要があります。
一部払い戻しを複数サポートする必要があります。たとえば、1,100 円のトランザクションが発生し、ユーザーは元のトランザクションから 400 円、500 円、100 円を払い戻しできるとします。この場合、3 つの払い戻しの merchantTransactionId
はすべて同じですが、requestId
の値は異なります。この取引の残高は 1 ドルです。
今度は 1,200 円の商品を購入したとします。この例では、ユーザーは 2 回、それぞれ 600 円の払い戻しを行えます。この 2 つの払い戻しの requestId
の値が異なる(かつ merchantTransactionId
が同じ)場合、同じ取引に対する別々の払い戻しとして処理する必要があります。この場合、払い戻しが完了すると、お客様の取引の残高は 0 円になります。
All rights reserved. Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eRefunds can be initiated by users or automatically triggered, requiring payment integrators to handle refund requests from Google.\u003c/p\u003e\n"],["\u003cp\u003eThe refund flow involves the user, Google Server, and the Payment Integrator Server, where Google Server sends the refund command and the Payment Integrator Server processes it.\u003c/p\u003e\n"],["\u003cp\u003ePayment integrators should support refunds for an indefinite duration or as long as technically feasible, even if the Google Payment Token (GPT) has expired.\u003c/p\u003e\n"],["\u003cp\u003eRefunds can be full or partial, with multiple partial refunds allowed on the same transaction using unique request IDs.\u003c/p\u003e\n"],["\u003cp\u003eIntegrators must consider the \u003ccode\u003erefundAmount\u003c/code\u003e field for each refund and only decline refunds if the original transaction balance is insufficient or the user account is unavailable.\u003c/p\u003e\n"]]],["Refunds are triggered by user action or automatically. Google sends a refund request to the Payment Integrator Server, which responds with success. Refunds should be supported indefinitely, unless technical limitations exist. Refunds should work even if the GPT is expired and can be initiated seconds after capture. Partial refunds are supported and are treated as separate refunds on the same transaction. Integrators must use the `refundAmount` field and handle multiple partial refunds, with each having a unique `requestId` but the same `merchantTransactionId`.\n"],null,[]]