# 订单取消(不包含付款和交易详情) 当订单被用户、合作伙伴取消或系统自动取消时,艾克索拉会向指定URL发送order_canceled Webhook。此Webhook包含已退回商品的信息和已取消订单的详细内容。 如果付款不成功,则不会发送该Webhook,例如: * 打开了支付UI,但用户没有为订单付款 * 打开了支付UI,但付款过程中出现错误 推荐的Webhook处理时间为3秒以内。 Endpoint: POST order-cancellation-separate Version: 1.0 ## Request fields (application/json): - `custom_parameters` (object) 附加信息。 - `items` (array, required) 用户所购商品的列表。 数组中包含的参数集取决于Webhook版本。版本2包含额外参数:is_free、is_bonus和is_bundle_content。要切换版本,请 在[更新Webhook设置信息](/zh/api/igs/operation/update-webhook/) API调用的version参数中传入版本编号。 - `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) 外部ID。 - `order.currency` (string, required) 订单货币。虚拟货币使用SKU,真实货币使用三个字母的[ISO 4217](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值用于通过艾克索拉进行的支付。其他支付使用游戏发布平台名称对应的值: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](/zh/webhooks/#operation/order-cancellation!path=order/promotions/amount_with_discount&t=request))和不含折扣的价格值([amount_without_discount](/zh/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) 用户所在国家/地区。使用[ISO 3166-1 alpha-2 标准](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)规定的2字母组合表示国家/地区。 - `user.email` (string, required) 用户邮箱地址。 - `user.external_id` (string, required) 用户ID。 ## Response 200 fields ## Response 400 fields