FetchRewardInfo
Reveals a scratch card. This is where Cheggout assigns the reward — picking from the campaign pool, applying the targeting context stored at creation — and returns the full reward detail.
AvailablePOST /api/FetchRewardInfo
| Environment | URL |
|---|---|
| Production | https://rewardscenter.cheggout.com/api/FetchRewardInfo |
| UAT | https://rewardscenter-uat.cheggout.com/api/FetchRewardInfo |
Authentication — Authorization: Bearer <token> from
GetAuthToken
Revealing is one-shot. Calling this again with the same rewardId returns
REWARD NOT FOUND, not the reward. Persist the response the moment you receive it. To
re-display a reward later, read it from your own store or from
GetAllScratchCardsByUserId.
Request
This endpoint uses the BDATA wrapper without a SIGN field.
| Field | Type | Required | Description |
|---|---|---|---|
CHANNELID | string | Yes | Your channel identifier |
BDATA | string | Yes | Base64 of the payload below |
BDATA here is encoding, not signingThere is no signature on this request — authentication is the bearer token. Base64 is a transport
convention, not a security boundary. Do not assume the presence of BDATA implies a signed
request. See API conventions.
BDATA payload
| Field | Type | Required | Description |
|---|---|---|---|
rewardId | string | Yes | The card to reveal, from GetReward |
virtualId | string | Yes | The user revealing it |
channelName | string | Yes | Your channel name |
entryPoint | string | No | Where the reveal happened in your UI |
rewardId is a string hereGetReward returns rewardId as a number; this endpoint takes it as a
string. Convert explicitly rather than relying on your JSON library.
{
"rewardId": "45144",
"virtualId": "pub_8f14e45fceea167a",
"channelName": "YOURCHANNEL"
}
Example
curl -X POST https://rewardscenter-uat.cheggout.com/api/FetchRewardInfo \
-H "Authorization: Bearer REPLACE_WITH_USER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"CHANNELID": "YOURCHANNEL",
"BDATA": "REPLACE_WITH_BASE64_PAYLOAD"
}'
Response
{
"CHANNELID": "CHEGGOUT",
"BDATA": "REPLACE_WITH_BASE64_PAYLOAD"
}
Base64-decode BDATA to get either a reward or a business failure.
Reward payload
Beta This schema is documented here for the first time and is pending final confirmation from Cheggout engineering. Field presence — particularly the optional fields below — should be treated defensively: read what you need, tolerate absences.
There are two variants, distinguished by couponType.
Shared fields
| Field | Type | Description |
|---|---|---|
rewardId | number | The revealed card |
transactionId | string | Your original extTransactionId |
offerTitle | string | Headline shown to the user |
description | string | Offer description |
terms | string | Terms and conditions, HTML list markup |
couponCode | string | The code to redeem. Empty for points rewards. |
endDate | string | Validity end, YYYY-MM-DD HH:mm:ss.SSS |
couponType | string | "Brand" for a coupon reward, "points" for a points reward |
isSeen | boolean | true — the card has now been revealed |
couponImage | string | Coupon artwork URL |
redeemSteps | string | How to redeem, HTML list markup |
bannerDisplayUrl | string | Banner artwork URL |
iconImage | string | Icon URL |
details | string | Additional detail, HTML list markup |
siteName | string | Merchant name |
points | number | Points awarded. 0 for coupon rewards. |
coverImage | string | Cover artwork URL |
createdDateTime | string | When the card was created |
rewardImage | string | Reward artwork URL |
bgColor | string | Suggested background colour for your card UI |
copyClick | array | Fire when the user copies the coupon code |
redeemClick | array | Fire when the user taps redeem |
Coupon reward — additional fields
| Field | Type | Description |
|---|---|---|
siteId | number | Merchant identifier |
offerId | number | Offer identifier |
promoLink | string | Destination for the redeem action |
Points reward
couponType is "points", couponCode is empty, and points carries the awarded value. The
merchant-specific fields above are not applicable.
{
"rewardId": 45144,
"transactionId": "PUB_TXN_20260731_000117",
"offerTitle": "Flat 20% off your next order",
"description": "Valid on orders above the minimum spend.",
"terms": "<ul><li>One use per customer.</li><li>Not valid with other offers.</li></ul>",
"couponCode": "REPLACE-COUPON-CODE",
"endDate": "2026-12-31 23:59:59.000",
"couponType": "Brand",
"isSeen": true,
"couponImage": "https://assets.example.com/coupon.png",
"redeemSteps": "<ul><li>Tap redeem.</li><li>Apply the code at checkout.</li></ul>",
"bannerDisplayUrl": "https://assets.example.com/banner.png",
"iconImage": "https://assets.example.com/icon.png",
"details": "<ul><li>Applies to the full catalogue.</li></ul>",
"siteId": 1217,
"offerId": 517,
"siteName": "Example Merchant",
"points": 0,
"coverImage": "https://assets.example.com/cover.png",
"promoLink": "https://click.cheggout.com/REPLACE",
"createdDateTime": "2026-07-31 14:15:31.000",
"rewardImage": "https://assets.example.com/reward.png",
"bgColor": "#db551c",
"copyClick": ["https://tracking.cheggout.com/Tracker/clicks?REPLACE"],
"redeemClick": ["https://tracking.cheggout.com/Tracker/clicks?REPLACE"]
}
{
"rewardId": 45145,
"transactionId": "PUB_TXN_20260731_000118",
"offerTitle": "You won 100 points",
"couponType": "points",
"couponCode": "",
"points": 100,
"isSeen": true,
"endDate": "2026-12-31 23:59:59.000",
"createdDateTime": "2026-07-31 14:20:02.000",
"bgColor": "#db551c"
}
Branch on couponType. A points reward has no coupon code and no merchant link, so a UI that
assumes a code will render an empty card.
Business failures
A failure decodes to:
{ "status": false, "message": "REWARD NOT FOUND" }
message | Meaning | How to handle |
|---|---|---|
BETTER LUCK NEXT TIME | No reward allocated — campaign inactive, frequency cap reached, empty pool, probability miss, or budget exhausted | A normal outcome. Show your "no luck this time" state. |
REWARD NOT FOUND | No card matches this rewardId for this user — including a card already revealed | Look it up in reward history |
SCRATCHCARDID NOT FOUND | rewardId missing or not a valid number | Fix the request |
CHEGCUSTOMERID NOT FOUND | User could not be resolved | Check the token matches the user |
VIRTUALID NOT FOUND | virtualId missing from the payload | Fix the request |
BANKNAME NOT FOUND | channelName missing from the payload | Fix the request |
BETTER LUCK NEXT TIME is a successThe platform answered correctly: this card had no reward behind it. Do not retry, do not refresh the token, do not raise an alert. Design the "no luck" state into your UI from day one — with frequency caps in play, it will be common.
Reveal flow
Implementation notes
- Persist before you render. If your app crashes between receiving and storing the reward, the reward is not recoverable through this endpoint.
- Do not blind-retry a timeout. The reveal may have succeeded server-side. Call
GetAllScratchCardsByUserIdto find out what actually happened before deciding. - Fire tracking:
copyClickwhen the user copies the code,redeemClickwhen they tap redeem. - Render HTML fields safely.
terms,redeemStepsanddetailscontain list markup — sanitise before injecting into a web view.
Next
GetAllScratchCardsByUserId— history and recovery.- Scratch card lifecycle
- Error codes