Docs/Daily Login Rewards
Guides

Daily Login Rewards

Use a server-managed Player Store cooldown to limit claims to once every 24 hours. This example increments a claim index and grants 120 standard tokens each time. The index records successful claims; it does not define a rotating reward schedule.

Define the Daily Reward Index

In Tools → TurnKit → Configuration → Player Store Defs, create daily_reward_index as a NUMBER. Disable client writes, enable client reads, and set cooldown duration to PT24H. The definition displays this cooldown as 86,400 seconds.

TurnKit Player Store definitions including a daily_reward_index number with an 86400 second cooldown
The screenshot shows daily_reward_index with an 86,400-second cooldown alongside token and gold_token definitions.

Create the Login Transaction

In Player Store Tx Catalog, create an enabled transaction named daily_login. Add both mutations:

  • daily_reward_index → ADD → 1
  • token → ADD → 120
TurnKit daily_login transaction adding one to daily_reward_index and 120 to token
One atomic transaction advances the claim index and grants 120 tokens.

Claim the Reward

Call the transaction from the authenticated player context when the player claims. Handle the cooldown response as “already claimed for this period.” Because the cooldown is configured on daily_reward_index, keep that key server-managed.

var result = await PlayerStore.Transaction("daily_login").Execute();

See Player Store for transaction rules. If your game has a multi-day reward calendar, use the incremented index in server-side logic to choose the next reward; do not trust a client-selected reward amount.

Daily Login Rewards in Unity | TurnKit Guide