Skip to main content

Implement Claim Free Item button within game

To engage the players on the game hub via the in-game button with the redeem codes, you should:

  1. Make sure everything is ready.
  2. Create the Free Item coupons.
  3. Implement the item.add webhook.
  4. Create the Claim Free Item button within the game.
    info

    You can use any other button name.

Make sure everything is ready

Before you begin, integrate the Checkout.

Create Free Item coupons

To have the redeem codes for free items, you need the coupons with the Free Item type.

To create the redeem codes, use the POST Create Coupon API call.

Implement item.add webhook

To automatically grant the items to the player accounts when the codes are redeemed, implement the Item Add (item.add) webhook.

Create Claim Free Item button within game

  1. Create the Claim Free Item button withing the game.
  2. Embed a deep link into the Claim Free Item button. It should:
    • Redirect the players to the redeem code page of the game hub.
    • Provide the players seamless authentication and code redemption.
    • Allow the players to claim the free items linked to the redeem codes.
Example of a deep link
https://<GAME_HUB_URL>/go/redeem?player_id=<UNIQUE_PLAYER_ID>&code=<REDEEM_CODE>

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