# 注文支払い完了（支払いおよび取引の詳細なし）

エクソーラは、次の条件が満たされると、指定されたURLにorder_paidウェブフックを送信します：
1. ユーザーは注文の支払いに成功しました。
2. エクソーラは、決済ウェブフックの正常な処理に関する応答を受け取りました。

order_paidウェブフックには、購入したアイテムとトランザクションの詳細に関する情報が含まれています。

次の場合、order_paidウェブフックは送信されません：
* 決済が失敗しました。例：
  * 決済フォームは開かれましたが、ユーザーは注文の支払いをしていません
  * 決済フォームが開かれましたが、支払い中にエラーが発生しました
* 決済ウェブフックの正常な処理に関する応答が受信されていません。

order_paidウェブフックの処理時間は3秒未満にすることをお勧めします。

予想される回答は、「応答」セクションに記載されています。他の応答コードを使用できます。応答コードと自動返金機能の接続に応じて、エクソーラ側のウェブ
フック処理ロジックは以下のようになります：


    
    
        応答コード
        自動返金は無効になっています（デフォルト）
        自動返金が有効になっています
    
    
    
    
        400、401、402、403、404、409、422、415
        操作なし
        ユーザーへの自動返金
    
    
        200、201、204
        操作なし
        操作なし
    
    
        別のコードまたはウェブフックへの応答なし
        指定された時間間隔内に複数のウェブフックが送信されます。5分間隔で2回、15分間隔で7回、60分間隔で10回試行されます。
        指定された時間間隔内に複数のウェブフックが送信されます。5分間隔で2回、15分間隔で7回、60分間隔で10回試行されます。すべてのウェブフックが送信されても正常な応答が受信されない場合、ユーザーに自動返金が発行されます。
    
    


自動返金機能を接続するには、カスタマーサクセスマネージャーにお問い合わせいただくか、csm@xsolla.comまで電子メールをお送りください。

Endpoint: POST successful-order-payment-separate
Version: 1.0

## Request fields (application/json):

  - `custom_parameters` (object)
    追加情報。

  - `items` (array, required)
    ユーザーが購入したアイテムのリスト。

The set of parameters included in the array depends on the webhook version. 
Version 2 includes additional parameters: is_free, is_bonus, and 
is_bundle_content. To switch the version, pass its number in the version 
parameter in the [Update webhook version](/ja/api/catalog/common-webhooks/update-webhook-version/) API call.

  - `notification_type` (string, required)
    通知タイプ。

  - `order` (object, required)
    注文に関する情報。

  - `order.amount` (string, required)
    選択された通貨に基づくカートの合計金額です。

  - `order.comment` (string,null, required)
    注文に対するユーザーのコメント。

  - `order.coupons` (array)
    適用されたクーポン。クーポンが適用されていない場合は、配列は返されません。

  - `order.coupons.code` (string)
    適用されたクーポンのコードです。

  - `order.coupons.external_id` (string)
    External ID。

  - `order.currency` (string, required)
    注文の通貨。仮想通貨はSKUを使用し、実際通貨は3文字の[ISO4217](https://en.wikipedia.org/wiki/ISO_4217)コードを使用します。

  - `order.currency_type` (string, required)
    決済通貨タイプ。無料注文の場合はunknownの値が指定されています。
    Enum: "real", "virtual", "unknown", "loyalty_point"

  - `order.id` (integer, required)
    エクソーラ側でのユーザーの注文の一意の識別子。

  - `order.invoice_id` (string,null, required)
    実際通貨による支払い請求書ID。仮想通貨の決済また無料アイテムは、nullの値を使用します。

  - `order.mode` (string, required)
    決済モード。defaultは実際の支払いに、sandboxはテスト支払いに使用されます。
    Enum: "default", "sandbox"

  - `order.platform` (string,null, required)
    決済プラットフォーム。xsolla値は、エクソーラを介した決済ソリューションに使用されます。その他の決済ソリューションについては、ゲームパブリッシングプラットフォームの名前に対応する値が使用されます。
    Enum: "xsolla", "playstation_network", "xbox_live", "pc_standalone", "nintendo_shop", "google_play", "app_store_ios", "android_standalone", "ios_standalone", "android_other", "ios_other", "pc_other"

  - `order.promocodes` (array)
    適用されたプロモーションコード。プロモーションコードが適用されていない場合、配列は返されません。

  - `order.promocodes.code` (string)
    適用されたプロモーションコードのコードです。

  - `order.promocodes.external_id` (string)
    External ID。

  - `order.promotions` (array, required)
    注文全体に適用されたプロモーションです。
この配列は、次のいずれかのケースで返されます。：
  - 購入割引 設定のプロモーションコードなど、購入合計金額に影響するプロモーションが設定されている場合。
  - 購入に割引は適用されませんが、ボーナスアイテムが注文に追加される場合。この場合、割引ありのコスト（[amount_with_discount](/ja/webhooks/#operation/order-cancellation!path=order/promotions/amount_with_discount&t=request)）と割引なしのコスト（[amount_without_discount](/ja/webhooks/#operation/order-cancellation!path=order/promotions/amount_without_discount&t=request)）の値が返され、割引が適用されていないため両者は同じ値になります。

注文レベルのプロモーションが適用されていない場合は、空の配列が返されます。

  - `order.promotions.amount_with_discount` (string)
    割引なしのアイテムの総コスト。

  - `order.promotions.amount_without_discount` (string)
    割引なしのアイテムの総コスト。

  - `order.promotions.sequence` (integer)
    プロモーションアプリケーションの注文。

  - `order.status` (string, required)
    注文状況。

  - `user` (object, required)
    ユーザー情報。

  - `user.country` (string)
    ユーザーの国。2文字の国コード（大文字）は、[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)に従って使用されます。

  - `user.email` (string, required)
    ユーザーのメールアドレス。

  - `user.external_id` (string, required)
    ユーザーID。


## Response 200 fields

## Response 400 fields
