Xsolla sendet den Webhook order_canceled an die angegebene URL,
wenn die Zahlung vom Nutzer, Partner oder automatisch storniert wurde. Der
Webhook enthält Informationen über zurückgesandte Artikel, Zahlungsdaten und
Details zur stornierten Bestellung.
Der Webhook wird nicht gesendet, wenn die Zahlung nicht erfolgreich war, zum Beispiel:
Die empfohlene Verarbeitungszeit für Webhooks beträgt maximal drei Sekunden.
| notification_type required | string Benachrichtigungstyp. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of Version = 1 (object) or Version = 2 (object) Liste der vom Nutzer gekauften Artikel. Die im Array enthaltenen Parameter hängen von der Webhook-Version ab. In
Version 2 sind zusätzliche Parameter enthalten: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array One of:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Bestellinformationen. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Benutzerinformationen. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Transaktions- und Zahlungsdetails. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| custom_parameters | object Zusätzliche Informationen. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Zur Signalisierung einer erfolgreiche Verarbeitung.
Im Falle eines Fehlers in den bereitgestellten Daten (z. B. fehlender erforderlicher Parameter, fehlgeschlagene Autorisierung usw.).
curl -v 'https://your.hostname/your/uri' \ -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'authorization: Signature d09695066c52c1b8bdae92f2d6eb59f5b5f89843' \ -d '{ "notification_type": "order_canceled", "items": [ { "sku": "com.xsolla.v.item_1", "type": "virtual_good", "is_pre_order": false, "quantity": 3, "amount": "1000", "promotions": [ { "amount_without_discount": "6000", "amount_with_discount": "5000", "sequence": 1 }, { "amount_without_discount": "5000", "amount_with_discount": "4000", "sequence": 2 } ], "custom_attributes": { "purchased": 0, "attr": "value" } }, { "sku": "com.xsolla.v.item_new_1", "type": "bundle", "is_pre_order": false, "quantity": 1, "amount": "1000", "promotions": [] }, { "sku": "com.xsolla.gold_1", "type": "virtual_currency", "is_pre_order": false, "quantity": 1500, "amount": null, "promotions": [] } ], "order": { "id": 1, "mode": "default", "currency_type": "virtual", "currency": "sku_currency", "amount": "2000", "status": "paid", "platform": "xsolla", "comment": null, "invoice_id": "1", "promotions": [ { "amount_without_discount": "4000", "amount_with_discount": "2000", "sequence": 1 } ], "promocodes": [ { "code": "promocode_some_code", "external_id": "promocode_sku" } ], "coupons": [ { "code": "WINTER2021", "external_id": "coupon_sku" } ] }, "user": { "external_id": "id_xsolla_login_1", "email": "email@example.com", "country": "US" }, "billing": { "notification_type": "refund", "settings": { "project_id": 18404, "merchant_id": 2340 }, "purchase": { "subscription": { "plan_id": "b5dac9c8", "subscription_id": "10", "date_create": "2014-09-22T19:25:25+04:00", "currency": "USD", "amount": 9.99 }, "total":{ "currency": "USD", "amount": 200 } }, "transaction": { "id": 1, "external_id": 1, "dry_run": 1, "agreement": 1 }, "refund_details": { "code": 4, "reason": "Potential fraud" }, "payment_details": { "sales_tax": { "currency": "USD", "amount": 0 }, "direct_wht": { "currency": "USD", "amount": 0.70 }, "xsolla_fee": { "currency": "USD", "amount": "10" }, "payout": { "currency": "USD", "amount": "200" }, "payment_method_fee": { "currency": "USD", "amount": "20" }, "payment": { "currency": "USD", "amount": "230" }, "repatriation_commission": { "currency": "USD", "amount": 10 } } } }