Refunds are issued by Neon, based on the refund policy listed in your contract with us. Purchases cannot be partially refunded; once a purchase is refunded, no further refunds (of any amount) can be issued.

Refunds can be requested in one of three ways:

  • Your user can request a refund directly, via the refund link in their confirmation email.
  • Finally, you can contact your Neon representative directly. Make sure to include the order number of the purchase in your request.

Once we process the refund, we'll update your game by sending you a refund.processed event. (See Webhooks and Callbacks for more on how we handle events, and how you can set up a server to listen for them.) The event body includes the purchase ID of the purchase being refunded. You can use this event as a trigger to update your user's account however you choose (e.g. by removing the item from their account).

Refund types

When issuing or requesting a refund, you can either issue a total refund or a partial refund:

  • Total refunds: A total refund is a refund for the entire purchase.
    • All items are considered “refunded” when a total refund is issued (purchase limits are reset, etc).
    • A total refund may not be for the full amount of the original purchase. You can optionally set a fee on a total refund, reducing the amount refunded to the user. These fees and charges will be imposed on the total amount of the purchase.
    • Only one total refund can be issued. A total refund cannot be issued if another refund has already been issued.
  • Partial refunds: A partial refund is a refund for a subset of items within a purchase.
    • Only the items being refunded are considered refunded for purchase limits / inventory.
    • Partial refund amounts are calculated based on the item total of the items being refunded. Taxes are calculated as appropriate for the market (backed out or added on).
    • An arbitrary number of partial refunds can be issued, but items cannot be refunded beyond the original purchase amount (less any items already refunded).

To request a total refund, simply call the POST /refund API, optionally with a fee specified:

curl --request POST \
     --url https://api.neonpay.com/purchases/<purchase ID>/refund \
     --header 'X-API-KEY: <your API key>'
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "fee": 1234
}
'

(Note that if fee is left unspecified, we'll default to a fee of zero and refund the entire purchase amount.)

To request a partial refund, call the POST /refund API with a list of items to be refunded.

  • First, call GET /purchases/{purchaseId} and inspect the items array for the items you'd like to refund. Note the id and refundableQuantity on each item.
  • For each item you'd like to refund, construct an object with { itemId: <item.id>, quantity: <quantity> }.
  • Pass in the array of items as items to the POST endpoint.

For example, consider the following purchase:

curl --request GET \
     --url https://api.neonpay.com/purchases/06f65af3-e18c-45ed-8268-9ebc9238d7ee
     --header 'X-API-KEY: <your API key>'
     --header 'accept: application/json'
     --header 'content-type: application/json'
{
  "id": "06f65af3-e18c-45ed-8268-9ebc9238d7ee",
  ...
  "items": [
    {
      "id": "72a51367-ef54-4e28-af67-403595055fca",
      "sku": "wood-sku",
      "name": "Wood Shield",
      "price": 199,
      "referencePrice": 199,
      "referenceCurrency": "USD",
      "quantity": 1,
      "refundableQuantity": 1
    },
    {
      "id": "1df53a38-585f-47f2-9247-5804cbc422e0",
      "sku": "iron-sku",
      "name": "Iron Shield",
      "price": 199,
      "referencePrice": 199,
      "referenceCurrency": "USD",
      "quantity": 2,
      "refundableQuantity": 2
    }
  ]
  ...
}

In order to request a refund of 1 unit of the Wood Shield and 1 unit of the Iron Shield, call the POST /refund API as follows:

curl --request POST \
     --url https://api.neonpay.com/purchases/<purchase ID>/refund \
     --header 'X-API-KEY: <your API key>'
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "items": [
    {
      "itemId": "72a51367-ef54-4e28-af67-403595055fca",
      "quantity": 1
    },
    {
      "itemId": "1df53a38-585f-47f2-9247-5804cbc422e0",
      "quantity": 1
    }
  ]
}
'