# Reward Links

URL: https://www.digia.tech/docs/developer/reference/reward-links

The placeholders a Digia Engage gamification reward link can carry, how the SDK routes and opens the link, and what to handle in your app.

A reward can have a button with a link. Your campaign team sets the link on the reward in the dashboard.

## Placeholders

Write placeholders with double braces. Digia fills them when the user wins.

| Placeholder | Filled with | `{{code}}` | The winner's coupon code. Coupon rewards only. | `{{grantId}}` | The ID of the win. Send it to thereward used callback . | `{{rewardKey}}` | The reward's reference key. | `{{campaignKey}}` | The campaign's key. 

A reward link of

```text
myapp://wallet/offers?code={{code}}&grant={{grantId}}
```

reaches your app as

```text
myapp://wallet/offers?code=SAVE100&grant=665f1c2e9a1b2c3d4e5f6a7b
```

Each value is URL-encoded. Decode it in your app. Put placeholders in the path or query, not in the scheme or host.

## How the SDK opens a link

- `http` and `https` links go to your open-URL handler.
- Other links, such as `myapp://wallet` , go to your deep-link handler. The rewards page or game closes first.
If you have no handler, the system opens the link. To register your handlers, see [Open URL and Deep link](/docs/developer/reference/campaign-actions/#3-open-url-and-deep-link) and [App-owned actions](/docs/developer/reference/campaign-actions/#7-app-owned-actions) .

To open your own screens, use your app's scheme, such as `myapp://wallet` .

## In your app

Treat the link as untrusted input. Validate it before you route it. Tapping the reward button doesn't mark the reward used. Your server does that with thereward used callback .
