Skip to main content

Scratch Cards

A scratch card turns a completed action into a moment worth repeating. The user pays a bill, reads an article or finishes a transfer; a card appears; they scratch it; they get a coupon, some points, or a friendly miss. Cheggout supplies the campaign, the inventory, the eligibility rules and the reward. You supply the moment.

The problem it solves

Most transactions in a banking or content app are functional and forgettable. There is nothing to anticipate, so there is nothing to come back for. A scratch card inserts a small, cheap, variable-outcome reward at exactly the point where the user has already done what you wanted.

Three properties make it work commercially:

  • It is post-action. Cost is only incurred after the behaviour you wanted has happened.
  • It is variable. Not every card pays out, so the cost per engagement stays low while the anticipation stays high.
  • It is targeted server-side. Eligibility, frequency caps, budget and probability all live in Cheggout's campaign configuration, so you change the economics without shipping an app release.

Business value

OutcomeMechanism
Higher transaction frequencyUsers repeat the qualifying action to get another card
Higher engagement per sessionAn unscratched card is a reason to open the app
Measurable attributionEvery card carries impression and click tracking
No inventory risk for unopened cardsRewards are assigned at reveal, not at issue
Campaign changes without a releaseTargeting and payout rules are server-side configuration

The two-phase model

This is the single most important thing to understand before reading any of the integration pages. Issuing a card and assigning its reward are two separate operations, at two separate moments.

Phase 1 creates temporary cards. They prove the user is eligible. No coupon is attached to them yet. The targeting parameters you send at this point — location, demographics, transaction context — are stored and applied later.

Phase 2 performs the actual reward assignment at the moment the user scratches. Cheggout calls this late binding, and its purpose is stated plainly in the source contract: it prevents inventory burn. If a million cards are issued and a hundred thousand are opened, only a hundred thousand pieces of inventory are consumed.

Three consequences fall out of this, and every integration must handle them:

  1. Reveal is one-shot. Once a card is revealed, re-revealing the same rewardId returns REWARD NOT FOUND — not the reward you got the first time. You must persist what you receive.
  2. A miss is a normal outcome. BETTER LUCK NEXT TIME is a successful business response, not an error. Design the UI for it before you design the win state.
  3. Issuance is idempotent, reveal is not. Replaying the same extTransactionId returns the same set of cards. Replaying a reveal does not return the same reward.

Read Lifecycle for the full state machine.

Integration options by surface

There are three ways to put a scratch card in front of a user, plus a hosted listing page. They are not mutually exclusive — a bank commonly uses the SDK in-app and the headless API for its web channel.

PathYou renderYou callBest when
Headless APIEverythingRewards Center HTTP APIsYou need full design control, or you are not on a supported SDK surface
Mobile SDKNothing — the SDK doesOne SDK method, or one signed server APIYou have a native app and want the shortest path
Web widgetNothing — the widget doesTwo JavaScript functionsYou are a website and want a drop-in overlay
Prefer server-to-server issuance

On mobile, there are two ways to issue a card: a client SDK call, or a signed GetScratchCardForBank call from your backend after you have validated the order. Prefer the server call. A client-initiated path allows issuance requests that are not tied to a verified transaction. The reasoning and both code paths are on SDK integration.

What you need before starting

PrerequisiteApplies toWhere it comes from
CHANNELID / channel nameAll pathsCheggout onboarding
RSA key pair, public certs exchangedAll pathsKey generation
Outbound IPs whitelistedAll server callsShared with Cheggout during onboarding
A stable, immutable virtualId per userAll pathsYour own identity system
A unique extTransactionId per eventAll pathsYour own transaction system
At least one trigger event codeAll pathsAgreed during campaign setup — see Trigger events
A campaign configured for your channelAll pathsCheggout campaign operations
SDK artefact, or the widget script URLSDK / web pathsCheggout, per surface
You cannot self-serve campaigns or trigger codes

There is no console for creating campaigns, allocating inventory, or registering trigger-event codes. All of it is configured by Cheggout for your channel. Until a campaign exists and is active, every issuance call correctly returns "no rewards" — which looks identical to a broken integration. Confirm your campaign is live in UAT before debugging your code.

What Cheggout decides, and what you decide

DecisionOwner
Whether this user gets a card at allCheggout
How many cards per eventCheggout
Which reward is behind the cardCheggout, at reveal
Frequency caps, budget, probabilityCheggout
When the qualifying event firesYou
What the card looks like, in headless modeYou
Where revealed rewards are stored and re-displayedYou
When impression and click are firedYou

Next