Sent whenever a user completes a payment. Includes payment details.
Webhooks (1.0)
Webhooks allow you to receive instant notifications of configured events that happen on Xsolla’s side. You can use webhooks to automate back-end and supplementary functions of your application.
Examples of events that you can be notified about:
- payments, including purchases of virtual currency and items
- recurring payments and actions with subscriptions
- refunds
When a configured event occurs, Xsolla notifies your system about it via webhooks. For example, you can do the following after receiving a webhook:
- add to a user’s balance
- unlock new items for a user
- start subscription service
- block user after fraud detection
Below is an example of how a payment processing webhook works:
The following settings have to be applied for webhooks to work correctly:
- Listen to webhooks at the following IP addresses:
185.30.20.0/24,185.30.21.0/24,185.30.23.0/24. - Application database must not contain two successful transactions with the same ID.
Notice
If your listener receives a webhook with an existing transaction ID, it must return the previous result for that transaction. It is not recommended to charge the user twice or create duplicate records in the database.
Note
Xsolla API accepts conventional HTTP response codes for successful and failed requests. Code 204 indicates successful processing.
As internet connections are not always 100% reliable, webhooks may be lost or delayed. To address this issue, Xsolla resends failed webhooks until your listener receives them. Webhook resends are sent within 12 hours after the previous one until your listener confirms receiving. The maximum number of retries is 12.
Note
Although connection problems may result in lost, delayed, or duplicate webhooks, the most common cause is incorrect logic on the listener side.
Digital signatures enable secure data transmission. To generate a signature:
- Concatenate the request’s JSON body with your project’s secret key.
- Apply SHA-1 hashing to the resulting string.
POST /your_uri HTTP/1.1
host: your.host
accept: application/json
content-type: application/json
content-length: 165
authorization: Signature 52eac2713985e212351610d008e7e14fae46f902
{
"notification_type":"user_validation",
"user":{
"ip":"127.0.0.1",
"phone":"18777976552",
"email":"email@example.com",
"id":1234567,
"name":"Xsolla User",
"country":"US"
}
}curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'authorization: Signature 52eac2713985e212351610d008e7e14fae46f902' \
-d '{
"notification_type":
"user_validation",
"user":
{
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "email@example.com",
"id": 1234567,
"name": "Xsolla User",
"country": "US"
}
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User’s country. Two-letter uppercase ISO 3166-1 alpha-2 country code.
Purchase details (object).
Checkout details (object).
Currency. Three-letter currency code per ISO 4217.
Subscription details (object).
Gift details (object).
Total price of purchase (object).
Currency. Three-letter currency code per ISO 4217.
Promotions applied to this transaction.
Coupon details (object; if a coupon was used when creating the subscription).
Object that contains information about an order. This information is not passed in the webhook by default. To enable this function, contact your Account Manager or email to am@xsolla.com.
Object that contains information about an item.
Virtual currency to purchase (object).
Virtual currency package SKU (if set for the virtual currency package).
Currency. Three-letter currency code per ISO 4217.
Virtual items in purchase (object).
Currency. Three-letter currency code per ISO 4217.
Game keys (array).
DRM platform used to distribute the game. Make sure that you have configured the required DRM platforms in your Publisher Account.
Currency. Three-letter currency code per ISO 4217.
Object with upgrade data.
Object with data on the package, from which the user upgraded.
Object with data on the package, to which the user upgraded.
Currency. Three-letter currency code per ISO 4217.
Transaction details (object).
Test transaction. The parameter has the 1 value if it is a test transaction, or is not sent if the transaction is real.
Payment details (object).
Amount paid by the user (object).
Currency. Three-letter currency code per ISO 4217.
Amount debited from the payment system.
Currency. Three-letter currency code per ISO 4217.
Amount debited from Xsolla balance.
Currency. Three-letter currency code per ISO 4217.
Payout details (object).
Currency. Three-letter currency code per ISO 4217.
VAT details (object; EU only).
Currency. Three-letter currency code per ISO 4217.
Xsolla fee (object).
Currency. Three-letter currency code per ISO 4217.
Payment system fee.
Currency. Three-letter currency code per ISO 4217.
Sales tax (object; USA and Canada only).
Currency. Three-letter currency code per ISO 4217.
Direct withholding tax.
Currency. Three-letter currency code per ISO 4217.
Object with data on repatriation costs, imposed on Xsolla by third parties.
Currency. Three-letter currency code per ISO 4217.
- https://api.xsolla.com/merchant/v2/payment
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/payment
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-d '{
"notification_type": "payment",
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"purchase": {
"virtual_currency": {
"name": "Coins",
"sku": "com.xsolla.package1",
"quantity": 10,
"currency": "USD",
"amount": 100
},
"subscription": {
"plan_id": "b5dac9c8",
"subscription_id": "10",
"product_id": "Demo Product",
"date_create": "2014-09-22T19:25:25+04:00",
"date_next_charge": "2014-10-22T19:25:25+04:00",
"currency": "USD",
"amount": 9.99
},
"checkout": {
"currency": "USD",
"amount": 50
},
"virtual_items": {
"items": [
{
"sku": "com.xsolla.item1",
"amount": 1
}
],
"currency": "USD",
"amount": 50
},
"total": {
"currency": "USD",
"amount": 200
},
"promotions": [{
"technical_name": "Demo Promotion",
"id": "853"
}],
"coupon": {
"coupon_code": "ICvj45S4FUOyy",
"campaign_code": "1507"
},
"order": {
"id": 1234
"lineitems": [
{
"sku": "com.xsolla.item_1",
"quantity": 1,
"price": {
"currency": "EUR",
"amount": 6.5
}
}
]
}
},
"user": {
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "email@example.com",
"id": "1234567",
"name": "Xsolla User",
"country": "US"
},
"transaction": {
"id": 1,
"external_id": 1,
"payment_date": "2014-09-24T20:38:16+04:00",
"payment_method": 1,
"payment_method_name": "PayPal",
"payment_method_order_id": 1234567890123456789,
"dry_run": 1,
"agreement": 1
},
"payment_details": {
"payment": {
"currency": "USD",
"amount": 230
},
"vat": {
"currency": "USD",
"amount": 0,
"percent": 20
},
"sales_tax": {
"currency": "USD",
"amount": 0,
"percent": 0
},
"direct_wht": {
"currency": "USD",
"amount": 0,
"percent": 0
},
"payout_currency_rate": 1,
"payout": {
"currency": "USD",
"amount": 200
},
"xsolla_fee": {
"currency": "USD",
"amount": 10
},
"payment_method_fee": {
"currency": "USD",
"amount": 20
},
"repatriation_commission": {
"currency": "USD",
"amount": 10
}
},
"custom_parameters": {
"parameter1": "value1",
"parameter2": "value2"
}
}'Request
When a payment is canceled, Xsolla sends details of the canceled transaction in a webhook with the refund type to the webhook URL.
The webhook retry mechanism depends on who initiated the refund:
- If the refund was initiated on your side, the webhook isn’t resent. The payment is refunded to the user regardless of the response to a webhook.
- If the refund was initiated by a third party — e.g., a payment system or Xsolla Customer Support team — and in response to a webhook, a
5xxstatus code was returned, the webhook is resent at increasing intervals. The maximum number of retries is 12 within 48 hours from the first attempt.
For detailed information about the refund process, refer to the instructions.
Notice
The payment will still be refunded to the user if all of the following conditions are met:
- The refund was initiated by Xsolla.
- In response to a webhook, a
4xxstatus code was returned, or no response was received after all retry attempts, or a5xxstatus code was returned.
When you save the webhook URL in Publisher Account, you can also set up receiving additional information in webhooks.
Note
If you registered in Publisher Account on or before January 22, 2025, you can find the toggles in your project in the Settings > Webhooks > Testing > Payments > Advanced settings section.
| Toggle | Description |
|---|---|
| Show info about transactions via saved payment methods | Information is passed in the following custom parameters of the webhook:
|
Refund codes:
| Code | Reason | Description |
|---|---|---|
| 1 | Cancellation by the user request / the game request | Cancellation initiated from Publisher Account. |
| 2 | Chargeback | Transaction chargeback requested. |
| 3 | Integration error | Issues in integration between Xsolla and the game. Recommendation: Do not add the user to blocklist. |
| 4 | Potential fraud | Fraud suspected. Recommendation: Add the user to blocklist. |
| 5 | Test payment | Test transaction followed by cancellation. Recommendation: Do not add the user to blocklist. |
| 6 | User invoice expired | Invoice overdue (used for postpaid model). |
| 7 | Fraud notification from PS | Payment refused by payment system. Potential fraud detected by PS. Recommendation: Add the user to blocklist. |
| 8 | Cancellation by the PS request | Cancellation requested by payment system. Recommendation: Do not add the user to blocklist. |
| 9 | Cancellation by the user request | The user was not satisfied with the game or the purchase for any reason. Recommendation: Do not add the user to blocklist. |
| 10 | Cancellation by the game request | Cancellation requested by the game. Recommendation: Do not add the user to blocklist. |
| 11 | Account holder called to report fraud | The account owner states that they didn’t make the transaction. |
| 12 | Friendly fraud | Friendly fraud reported. |
| 13 | Duplicate | Duplicate transaction for the same invoice. |
Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User’s country. Two-letter uppercase ISO 3166-1 alpha-2 country code.
Purchase details (object).
Checkout details (object).
Currency. Three-letter currency code per ISO 4217.
Subscription details (object).
Total price of purchase (object).
Currency. Three-letter currency code per ISO 4217.
Virtual currency to purchase (object).
Currency. Three-letter currency code per ISO 4217.
Virtual items in purchase (object).
Currency. Three-letter currency code per ISO 4217.
Game keys (array).
Object with upgrade data.
Object with data on the package, from which the user upgraded.
Object with data on the package, to which the user upgraded.
Currency. Three-letter currency code per ISO 4217.
Transaction details (object).
Test transaction. The parameter has the 1 value if it is a test transaction, or is not sent if the transaction is real.
Refund details (object).
Refund initiator. The field value is passed according to the table:
| Refund initiator | Field value |
|---|---|
| Game (via API). | API |
| Publisher Account user (automatic refund). | User email |
| Publisher Account user (with assistance from Xsolla customer support). | support@xsolla.com |
| Xsolla (with assistance from Xsolla customer support). | support@xsolla.com |
Payment details (object).
Amount paid by the user (object).
Currency. Three-letter currency code per ISO 4217.
Amount debited from the payment system.
Currency. Three-letter currency code per ISO 4217.
Amount debited from Xsolla balance.
Currency. Three-letter currency code per ISO 4217.
Payout details (object).
Currency. Three-letter currency code per ISO 4217.
VAT details (object; EU only).
Currency. Three-letter currency code per ISO 4217.
Xsolla fee (object).
Currency. Three-letter currency code per ISO 4217.
Payment system fee.
Currency. Three-letter currency code per ISO 4217.
Sales tax (object; USA and Canada only).
Currency. Three-letter currency code per ISO 4217.
Direct withholding tax.
Currency. Three-letter currency code per ISO 4217.
Object with data on repatriation costs, imposed on Xsolla by third parties.
Currency. Three-letter currency code per ISO 4217.
- https://api.xsolla.com/merchant/v2/refund
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/refund
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-d '{
"notification_type": "refund",
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"purchase": {
"virtual_currency": {
"name": "Coins",
"quantity": 10,
"currency": "USD",
"amount": 100
},
"subscription": {
"plan_id": "b5dac9c8",
"subscription_id": "10",
"date_create": "2014-09-22T19:25:25+04:00",
"currency": "USD",
"amount": 9.99
},
"checkout": {
"currency": "USD",
"amount": 50
},
"virtual_items": {
"items": [
{
"sku": "com.xsolla.item1",
"amount": 1
}
],
"currency": "USD",
"amount": 50
},
"total":{
"currency": "USD",
"amount": 200
}
},
"user": {
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "email@example.com",
"id": "1234567",
"name": "Xsolla User",
"country": "US"
},
"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
}
}
}
}'Request
When a partial refund is made, Xsolla sends details of the canceled transaction in a webhook with the partial_refund type to the webhook URL. Learn more about the partial refund process in these instructions.
When you save the webhook URL in Publisher Account, you can give permissions to receive detailed information in webhooks. To do that, set the following toggle to active in Publisher Account in the Project settings > Webhooks > Advanced settings section.
Note
If you registered in Publisher Account on or before January 22, 2025, you can find the toggles in the Project settings > Webhooks > Testing > Payments > Advanced settings section.
| Toggle | Description |
|---|---|
| Show info about transactions via saved payment methods | Information is passed in the following custom parameters of the webhook:
|
Refund codes:
| Code | Reason | Description |
|---|---|---|
| 1 | Cancellation by the user request / the game request | Cancellation initiated from Publisher Account. |
| 3 | Integration error | Issues in integration between Xsolla and the game. Recommendation: Do not add the user to blocklist. |
| 5 | Test payment | Test transaction followed by cancellation. Recommendation: Do not add the user to blocklist. |
| 7 | Fraud notification from PS | Payment refused by payment system. Potential fraud detected by PS. Recommendation: Add the user to blocklist. |
| 9 | Cancellation by the user request | The user was not satisfied with the game or the purchase for any reason. Recommendation: Do not add the user to blocklist. |
| 10 | Cancellation by the game request | Cancellation requested by the game. Recommendation: Do not add the user to blocklist. |
Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User’s country. Two-letter uppercase ISO 3166-1 alpha-2 country code.
Purchase details (object).
Checkout details (object).
Currency. Three-letter currency code per ISO 4217.
Total price of purchase (object).
Currency. Three-letter currency code per ISO 4217.
Virtual currency to purchase (object).
Currency. Three-letter currency code per ISO 4217.
Virtual items in purchase (object).
Currency. Three-letter currency code per ISO 4217.
Game keys (array).
Object with upgrade data.
Object with data on the package, from which the user upgraded.
Object with data on the package, to which the user upgraded.
Currency. Three-letter currency code per ISO 4217.
Transaction details (object).
Test transaction. The parameter has the 1 value if it is a test transaction, or is not sent if the transaction is real.
Refund details (object).
Refund initiator. The field value is passed according to the table:
| Refund initiator | Field value |
|---|---|
| Game (via API). | API |
| Publisher Account user (automatic refund). | User email |
| Publisher Account user (with assistance from Xsolla customer support). | support@xsolla.com |
| Xsolla (with assistance from Xsolla customer support). | support@xsolla.com |
Payment details (object).
Amount paid by the user (object).
Currency. Three-letter currency code per ISO 4217.
Amount debited from the payment system.
Currency. Three-letter currency code per ISO 4217.
Amount debited from Xsolla balance.
Currency. Three-letter currency code per ISO 4217.
Payout details (object).
Currency. Three-letter currency code per ISO 4217.
VAT details (object; EU only).
Currency. Three-letter currency code per ISO 4217.
Xsolla fee (object).
Currency. Three-letter currency code per ISO 4217.
Payment system fee.
Currency. Three-letter currency code per ISO 4217.
Sales tax (object; USA and Canada only).
Currency. Three-letter currency code per ISO 4217.
Direct withholding tax.
Currency. Three-letter currency code per ISO 4217.
Object with data on repatriation costs, imposed on Xsolla by third parties.
Currency. Three-letter currency code per ISO 4217.
- https://api.xsolla.com/merchant/v2/partial-refund
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/partial-refund
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-d '{
"notification_type": "partial_refund",
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"purchase": {
"virtual_currency": {
"name": "Coins",
"quantity": 10,
"currency": "USD",
"amount": 100
},
"checkout": {
"currency": "USD",
"amount": 50
},
"virtual_items": {
"items": [
{
"sku": "com.xsolla.item1",
"amount": 1
}
],
"currency": "USD",
"amount": 50
},
"total":{
"currency": "USD",
"amount": 200
}
},
"user": {
"ip": "127.0.0.1",
"phone": "18777976552",
"email": "email@example.com",
"id": "1234567",
"name": "Xsolla User",
"country": "US"
},
"transaction": {
"id": 1,
"external_id": 1,
"dry_run": 1,
"agreement": 1,
"date": "2022-03-01 10:53:15"
},
"refund_details": {
"author": "email@example.com",
"date": "2022-03-01 10:56:48"
},
"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
}
}
}
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
- https://api.xsolla.com/merchant/v2/get-game-keys
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/get-game-keys
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"notification_type": "get_pincode",
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"user": {
"id": "1234567",
"name": "Xsolla User"
},
"pin_code": {
"digital_content": "Game SKU",
"DRM": "Steam"
}
}'{ "pin_code": "AAA-BBB-CCC-DDD" }
Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Key activation date in the YYYYMMDDHHMMSS format per ISO 8601.
User’s country. Two-letter uppercase ISO 3166-1 alpha-2 country code.
Object with regional restriction cluster settings. The cluster includes a restriction type and a list of countries, servers and locales for which the game is available.
- https://api.xsolla.com/merchant/v2/activate-key
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/activate-key
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"notification_type": "redeem_key",
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"key": "wqdqwwddq9099022",
"sku": "com.xsolla.key_123",
"user_id": "sample_user",
"activation_date": "2018-11-20T08:38:51+03:00",
"user_country": "EN",
"restriction": {
"name": "cls_1",
"types": [
"activation"
],
"countries": [
"RU"
]
}
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User balance data (object).
- https://api.xsolla.com/merchant/v2/user-balance-payment
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/user-balance-payment
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"virtual_currency_balance": {
"old_value": "0",
"new_value": "200",
"diff": "200"
},
"user": {
"name": "Xsolla User",
"id": "1234567",
"email": "email@example.com"
},
"transaction": {
"id": "123456789",
"date": "2015-05-19T15:54:40+03:00"
},
"operation_type": "payment",
"notification_type": "user_balance_operation",
"id_operation": "66989"
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User balance data (object).
- https://api.xsolla.com/merchant/v2/user-balance-purchase
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/user-balance-purchase
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"virtual_currency_balance": {
"old_value": "0",
"new_value": "200",
"diff": "200"
},
"user": {
"name": "Xsolla User",
"id": "1234567",
"email": "email@example.com"
},
"operation_type": "inGamePurchase",
"notification_type": "user_balance_operation",
"items_operation_type": "add",
"items": [{
"sku": "com.xsolla.item_1468",
"amount": "2"
}],
"id_operation": "66989"
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User balance data (object).
- https://api.xsolla.com/merchant/v2/user-balance-redeem-coupon
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/user-balance-redeem-coupon
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"virtual_currency_balance": {
"old_value": "0",
"new_value": "0",
"diff": "0"
},
"user": {
"name": "Xsolla User",
"id": "1234567",
"email": "email@example.com"
},
"operation_type": "coupon",
"notification_type": "user_balance_operation",
"items_operation_type": "add",
"items": [{
"sku": "com.xsolla.item_1468",
"amount": "2"
}],
"id_operation": "66989",
"coupon": {
"coupon_code": "test123",
"campaign_code": "Xsolla Campaign"
}
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
- https://api.xsolla.com/merchant/v2/user-balance-manual-update
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/user-balance-manual-update
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"virtual_currency_balance": {
"old_value": "0",
"new_value": "100",
"diff": "100"
},
"user": {
"name": "Xsolla User",
"id": "1234567",
"email": "email@example.com"
},
"operation_type": "internal",
"notification_type": "user_balance_operation",
"id_operation": "67002"
}'Custom project settings (object).
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
User details (object).
User balance data (object).
Transaction details (object).
- https://api.xsolla.com/merchant/v2/user-balance-refund
- Mock serverhttps://xsolla.redocly.app/_mock/deprecated-webhooks/user-balance-refund
- CURL
- PHP
- Payload
curl -v 'https://your.hostname/your/uri' \
-X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \
-d '{
"settings": {
"project_id": 18404,
"merchant_id": 2340
},
"virtual_currency_balance": {
"old_value": "0",
"new_value": "0",
"diff": "0"
},
"user": {
"name": "Xsolla User",
"id": "1234567",
"email": "email@example.com"
},
"transaction": {
"id": "123456789",
"date": "2015-05-19T15:54:40+03:00"
},
"operation_type": "cancellation",
"notification_type": "user_balance_operation",
"items_operation_type": "remove",
"items": [{
"sku": "com.xsolla.item_1468",
"amount": "2"
}],
"id_operation": "66989"
}'