Skip to main content

Item Remove Webhook

Aghanim offers a centralized webhook that alerts your game to remove items from a player's account.

This webhook is triggered in the following cases:

  • A bank or payment system reverses a player’s transaction on the game hub
  • A transaction refund is requested via the Transactions section of the Aghanim Dashboard

Each event includes a reason field with the justification for item removal.

Redeem code webhook imageRedeem code webhook image

Requirements​

To use the item.remove webhooks from Aghanim, you should have the webhook server configured as follows:

  • HTTPS endpoint, accepting POST webhook requests.
  • Listen for events, generated and signed by Aghanim.
  • Handle the idempotency_key included in the webhook payload to prevent processing duplicate webhooks.
  • Remove items of the reversed or refunded order from a player's account accordingly or perform other required actions.
  • Respond with 2xx status codes to signal successful processing, and 4xx or 5xx for denial or errors.

Configuration​

Below are function templates for an endpoint that processes Aghanim webhooks, alerting your game to remove items:

Once your function is ready:

  1. Make your endpoint available.
  2. Register your endpoint within Aghanim account → Game → Webhooks → New Webhook by choosing the corresponding event type.

Alternatively, you can register your endpoint within Aghanim using the Create Webhook API method.

The Event Data schema​

KeyTypeDescription
player_idstringThe unique Player ID chosen for player authentication.
itemsItem[]An array of items to be removed from the player's account.
reasonstringThe human-readable reason triggered the webhook. Example: Order refunded ord_eCacAulggpY.
item_idstring[Deprecated] Item ID generated by Aghanim.
skustring[Deprecated] Item SKU matching on both the game and Aghanim sides.

Need help?
Contact our integration team at integration@aghanim.com