跳至主要内容

在游戏中实现“领取免费商品”按钮

为了通过游戏内按钮与兑换码在游戏中心吸引玩家,您应该:

  1. 确保一切准备就绪
  2. 创建免费商品优惠券
  3. 实现item.add webhook
  4. 在游戏中创建领取免费商品按钮
    信息

    您可以使用任何其他按钮名称。

确保一切准备就绪

Before you begin, integrate the Checkout.

创建免费商品优惠券

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.

实现item.add webhook

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

在游戏中创建领取免费商品按钮

  1. 在游戏中创建领取免费商品按钮。
  2. 领取免费商品按钮中嵌入深度链接。 它应:
    • 将玩家重定向至游戏中心的兑换码页面。
    • 为玩家提供无缝身份验证和代码兑换。
    • 允许玩家领取与兑换码相关的免费商品。
Example of a deep link
https://<GAME_HUB_URL>/go/redeem?player_id=<UNIQUE_PLAYER_ID>&code=<REDEEM_CODE>

需要技术支持?
联系我们的集成技术团队: [email protected]