# 注文キャンセル(支払いと取引の詳細を含む) ユーザー、パートナー、またはシステムによって支払いがキャンセルされた場合、エクソーラは指定されたURLにorder_canceledウ ェーブフックを送信します。このウェーブフックには、キャンセルされたアイテムと決済データに関する情報と、キャンセルされた注文の詳細が含まれています。 支払いが成功しなかった場合、ウェブフックは送信されません。例: * 決済UIは開かれましたが、ユーザーが注文の支払いを行われません * 決済UIが開かれましたが、支払いの実行中にエラーが発生しました 推奨されるウェーブフックの処理時間は3秒以内です。 Endpoint: POST order-cancellation Version: 1.0 ## Request fields (application/json): - `billing` (object) 取引と支払いの詳細。 - `billing.notification_type` (string, required) 通知タイプ。 - `billing.payment_details` (object, required) 支払明細(オブジェクト)。 - `billing.payment_details.country_wht` (object) 国境を越えた取引により特定の国に課せられる源泉徴収税(オブジェクト)。 - `billing.payment_details.country_wht.amount` (number) 金額。 - `billing.payment_details.country_wht.currency` (string) 通貨。[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)に基づく3文字の通貨コード。 - `billing.payment_details.country_wht.percent` (number) 直接源泉徴収税率(%)。 - `billing.payment_details.direct_wht` (object) 直接源泉徴収税。 - `billing.payment_details.direct_wht.percent` (number) 直接源泉徴収税率。 - `billing.payment_details.payment` (object) ユーザー(オブジェクト)によって支払われた金額。 - `billing.payment_details.payment_method_fee` (object) 決済システム料金。 - `billing.payment_details.payment_method_sum` (object) 決済システムから振り込まれた金額。 - `billing.payment_details.payout` (object) 配当の詳細(オブジェクト)。 - `billing.payment_details.payout_currency_rate` (string) 決済と配当間の為替レート。 - `billing.payment_details.repatriation_commission` (object) 第三者によってエクソーラに課された本国送還費用に関するデータを含むオブジェクト。 - `billing.payment_details.sales_tax` (object) 売上税(オブジェクト;米国とカナダのみ)。 - `billing.payment_details.sales_tax.percent` (number) 消費税率。 - `billing.payment_details.user_acquisition_fee` (object) アフィリエイトネットワークやインフルエンサー経由での購入から差し引かれた顧客獲得料の総額(オブジェクト)。 - `billing.payment_details.user_acquisition_fee.percent` (number) 顧客獲得料率(%)。 - `billing.payment_details.vat` (object) VATの詳細(オブジェクト;EUのみ)。 - `billing.payment_details.xsolla_balance_sum` (object) エクソーラ残高から引き落とされる金額。 - `billing.payment_details.xsolla_fee` (object) エクソーラ料金(オブジェクト)。 - `billing.purchase` (object) 購入内容(オブジェクト)。 - `billing.purchase.subscription` (object) サブスクリプションの詳細(オブジェクト)。 - `billing.purchase.subscription.amount` (number) 現金通貨での価格。 - `billing.purchase.subscription.date_create` (string) サブスクリプション作成日。日付時刻表記は、[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)形式。 - `billing.purchase.subscription.plan_id` (string) プランID(プランがAPIを使用して作成された場合は外部)。 - `billing.purchase.subscription.subscription_id` (integer) エクソラデータベースのサブスクリプションID。 - `billing.purchase.subscription.tags` (array) プランのタグ。 - `billing.purchase.total` (object, required) 購入(オブジェクト)の合計価格。 - `billing.purchase.total.amount` (number) 支払額合計。 - `billing.refund_details` (object) 返金の詳細(オブジェクト)。 - `billing.refund_details.author` (string) 返金イニシエーター。フィールド値は、次の表に従って渡されます: 返金イニシエーター フィールド値 ゲーム(API経由)。 API パブリッシャーアカウントのユーザー(自動返金)。 ユーザーのメールアドレス パブリッシャー アカウント ユーザー(エクソラカスタマーサポートの支援を受けて)。 support@xsolla.com エクソラ(エクソラカスタマーサポートの支援を受けて)。 support@xsolla.com - `billing.refund_details.code` (integer) コードID。 - `billing.refund_details.reason` (string) 返金の理由。 - `billing.settings` (object) カスタムプロジェクト設定(オブジェクト)。 - `billing.settings.merchant_id` (integer) マーチャントID。 - `billing.settings.project_id` (integer) プロジェクトID。このパラメータは、[ドメインページ](https://publisher.xsolla.com/)のプロジェクト名の横にあります。 - `billing.transaction` (object, required) トランザクションの詳細(オブジェクト)。 - `billing.transaction.agreement` (integer) 契約ID - `billing.transaction.dry_run` (integer) テストトランザクション。パラメータは、テストトランザクションの場合は1つの値を持ち、もしくはトランザクションが実際の場合は送信されません。 - `billing.transaction.external_id` (string) トランザクション外部ID。 - `billing.transaction.id` (integer) トランザクションID。 - `billing.transaction.payment_method_order_id` (string) 決済システムの決済ID。 - `custom_parameters` (object) 追加情報。 - `items` (array, required) ユーザーが購入したアイテムのリスト。 配列に含まれるパラメータのセットは、ウェブフックのバージョンによって異なります。バージョン2は、追加のパラメータが含まれています:is_free、is_b onusおよびis_bundle_content。バージョンを切り替えるには、[ウェブフック設定に関する情報を更新する](/ja/api/igs/operation/update-webhook/)APIコールでversionパラメータにその番号を渡します。 - `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の値は、Xsollaを介した支払いに使用されます。その他の支払いについては、ゲームパブリッシングプラットフォームの名前に対応する値が使用されます:playstation_network、xbox_live、pc_standalone、nintendo_shop、google_play、app_store_ios、android_standalone、ios_standalone、android_other、ios_other、pc_other。 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.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