Webhook: refund.processed
The refund.processed event is sent when a player's purchase has been refunded. When you receive it, remove the refunded item quantities from the player's account.
Example
A player buys 2 units of "550 Gems" at $5.00 each, for a total of $10.00, paid with $3.00 from their Neon wallet and $7.00 by card. The purchase is then fully refunded to the player's wallet.
{
"id": "663e302a-6599-4464-b284-e155e0ca88fc",
"type": "refund.processed",
"version": 2,
"isSandbox": false,
"data": {
"refund": {
"id": "34126a8b-77ca-4983-9140-64f34bcf4534",
// `refundId` is deprecated: use `id` instead
"refundId": "34126a8b-77ca-4983-9140-64f34bcf4534",
"date": "2024-01-01T00:00:00.000Z",
"currency": "USD",
"purchaseId": "39781eb2-6189-4f86-92ea-577b733f3dd8",
"subtotalAmount": 1000,
"taxAmount": 0,
"totalAmount": 1000,
"accountId": "player-account-id",
"playerCountry": "US",
"initialCurrency": "USD",
"initialPlayerCountry": "US",
"pricingSheetName": null,
"externalReferenceId": null,
"externalMetadata": {
"creatorCode": "ABC-XYZ"
},
// `payment` is deprecated; use `payments` instead
"payment": {
"vendor": "stripe",
"method": "credit_card"
},
"payments": [
{
"method": "neon_wallet",
"amount": 300
},
{
"method": "credit_card",
"amount": 700
}
],
"destinations": [
{
"method": "neon_wallet",
"amount": 1000
}
],
"items": [
{
"id": "b5e19212-a640-49d1-a48e-3175778bc459",
"quantity": 2,
"item": {
"id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"sku": "offer-550-gems"
},
"sku": "offer-550-gems",
"name": "550 Gems",
"price": 500,
"refundableQuantity": 0,
"referencePrice": 500,
"referenceCurrency": "USD",
"bundleContents": []
}
]
}
}
}refundIdandpaymentare deprecated. Useidandpaymentsinstead.- All monetary amounts are expressed as 100x the currency's base unit; see Currencies.
Amounts
totalAmount is the amount refunded (here $10.00), and taxAmount is the tax portion of it.
destinations
destinationsWhere the refunded money went, with one entry per payment method. When both a wallet and a payment processor destination are present, the wallet appears first. The amounts add up to totalAmount.
- Any portion the player paid from their Neon wallet is returned to the wallet (
neon_wallet). - The portion paid through a payment processor is returned to the original payment method, such as
credit_card, unless the refund was created withdestination: "wallet". In that case, it is credited to the player's wallet instead.
If the same split-purchase had been refunded to its original payment methods, destinations would be:
{
"destinations": [
{
"method": "neon_wallet",
"amount": 300
},
{
"method": "credit_card",
"amount": 700
}
]
}Bonus credit granted as a wallet-refund incentive is separate from the refund and is not included in destinations. Cashback reversal is also not included in destinations.
payments
paymentsHow the original purchase was paid for, in the same format as payments on purchase.completed. Use destinations, not payments, to determine where the refund went.
A purchase funded in whole or in part by the Neon wallet can currently only be refunded in full, with a refund fee of zero.
A purchase funded entirely through a payment processor can be partially refunded; in that case, the payments amounts add up to the original purchase's totalAmount, not the refund's totalAmount.
items
itemsOne entry per refunded item. item.id and item.sku identify the originally purchased item, and quantity is the number of units refunded (here both units).
Updated 4 days ago

