# Order cancellation (without payment and transaction details) Xsolla sends the order_canceled webhook to the specified URL when the payment was canceled by the user, partner, or automatically. The webhook contains information about returned items and details of the canceled order. The webhook is not sent if the payment was not successful, for example: * the payment UI was opened but the user did not pay for the order * the payment UI was opened but there were errors during the payment The recommended webhook processing time is within 3 seconds. Endpoint: POST order-cancellation-separate Version: 1.0 ## Request fields (application/json): - `notification_type` (string, required) Notification type. - `items` (array, required) List of items purchased by the user. 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 information about webhook settings](/api/igs/operation/update-webhook/) API call. - `order` (object, required) Information about the order. - `order.id` (integer, required) Unique identifier of the user's order on the Xsolla’s side. - `order.mode` (string, required) Payment mode. default is used for real payments; sandbox for test payments. Enum: "default", "sandbox" - `order.currency_type` (string, required) Payment currency type. For a free order, unknown value is specified. Enum: "real", "virtual", "unknown", "loyalty_point" - `order.currency` (string, required) Currency of order. Virtual currency uses the SKU and real currency uses a three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code. - `order.amount` (string, required) The total cost of a cart based on the chosen currency. - `order.status` (string, required) Order status. - `order.platform` (string,null, required) Payment platform. The xsolla value is used for payments via Xsolla. For other payments, the value corresponding to the name of the game publishing platform is used: 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.comment` (string,null, required) User’s commentary to the order. - `order.invoice_id` (string,null, required) Real currency payments invoice ID. Virtual currency payments or free items have a null value. - `order.promotions` (array, required) Applied promotions for the entire order. The array is returned in the following cases: - A promotion affects the total purchase amount, such as a promo code with the Discount on purchase setting. - No discount is applied to the purchase, but bonus items are added to the order. In this case, the values for the cost with discount ([amount_with_discount](/webhooks/#operation/order-cancellation!path=order/promotions/amount_with_discount&t=request)) and without discount ([amount_without_discount](/webhooks/#operation/order-cancellation!path=order/promotions/amount_without_discount&t=request)) are returned and identical, since no discount is applied. If no order-level promotions are applied, an empty array is returned. - `order.promotions.amount_without_discount` (string) Total cost of items without a discount. - `order.promotions.amount_with_discount` (string) Total cost of items with a discount. - `order.promotions.sequence` (integer) Order of promotions application. - `order.coupons` (array) Applied coupons. If the coupon isn’t applied, the array doesn’t return. - `order.coupons.code` (string) The code of an applied coupon. - `order.coupons.external_id` (string) External ID. - `order.promocodes` (array) Applied promocodes. If the promocode isn’t applied, the array doesn’t return. - `order.promocodes.code` (string) The code of an applied promocode. - `user` (object, required) User information. - `user.external_id` (string, required) User ID. - `user.email` (string, required) User email address. - `user.country` (string) User’s country. Two-letter uppercase [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - `custom_parameters` (object) Additional information. ## Response 200 fields ## Response 400 fields