Skip to main content

Store Get Webhook

The store.get webhook retrieves a list of items available for a player in the Game Hub store. This is useful for displaying the store content based on game logic.

This webhook is triggered in the following cases:

  • A player logs in to the game hub.
  • A player opens the store.
  • A player makes a purchase.
Get store webhookGet store webhook

Requirements

To use the store.get 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.
  • Respond with 2xx status codes to signal successful processing, and 4xx or 5xx for denial or errors.

Configuration

  1. Develop a function for the store.get webhook processing.
  2. Make your endpoint available.
  3. Register your endpoint within Aghanim account → Game → Webhooks → New Webhook by choosing the store.get 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.

Response schema

Upon a successful response, your server is expected to return a status code in the 2xx range and the following JSON payload:

KeyTypeDescriptionRequired?
itemsItem[]An array of items available for the player in the store.Yes

The item schema

KeyTypeDescriptionRequired?
skustringItem SKU matching on both the game and Aghanim sides.Yes
start_atnumber|nullThe unix-timestamp when the item becomes available to the player.No
end_atnumber|nullThe unix-timestamp when the item expires and is no longer available to the player.No

Successful response example:

{
"items": [
{
"sku": "crystals"
},
{
"sku": "shield",
"start_at": 1630000000,
"end_at": 1635000000
}
]
}

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