Trigger events
A trigger event is how you tell Cheggout that a rewardable thing happened. It is a short code —
UPI, CAMPAIGN_ARTICLEREAD — that you send with every issuance request, and it is the join
between your product's behaviour and Cheggout's campaign configuration.
What a trigger event is
Three properties define it:
It is predefined, not free text. Codes are agreed with Cheggout during campaign setup. Sending an unrecognised code does not create a campaign; it simply matches nothing, and you get an empty response that looks exactly like "user not eligible."
It is the campaign selector. All the interesting behaviour — who is eligible, how often, what the reward pool is, what the budget is — hangs off the campaign that the code resolves to. Changing a campaign's economics does not require an app release, because the code stays the same.
It is per-channel. Two publishers can use different codes for the same conceptual event, and the same publisher can have several codes for variants of one event.
Where it appears
The parameter name changes by surface, but the concept does not.
| Surface | Parameter | Sent to |
|---|---|---|
| Mobile SDK, client call | triggerEventType | getScratchCardDetails / sendRewardCardRequest |
| Headless API | triggerEventType | GetReward |
| Web widget | eventType | bannerTriggerEvent, checkPendingRewardEvent |
| Server-to-server | campaignId | GetScratchCardForBank |
That last row is worth noting: GetScratchCardForBank does not take a trigger code. It takes a
campaignId directly, so the resolution step you get for free on the other surfaces is something
you do yourself. Your backend must know which campaign a given event belongs to.
Documented examples
These are the codes that appear in Cheggout's integration documents. They are examples from real integrations, not a registry — yours will be assigned to you.
Mobile SDK
Payment-type codes, reflecting the banking context the SDK was first built for:
| Code | Event it represents |
|---|---|
UPI | A UPI payment. merchantVPA is required alongside it |
WITHINBANK | A transfer between accounts at the same institution |
IMPS | An IMPS transfer |
RTGS | An RTGS transfer |
Web widget
Campaign-prefixed content codes:
| Code | Event it represents |
|---|---|
CAMPAIGN_ARTICLEREAD | An article read to completion. Documented as triggering after five events |
CAMPAIGN_ADREAD | TBD Documented in an earlier integration as firing after four events. Availability is unconfirmed — do not build against it without confirmation |
Those two codes are the only widget trigger codes that appear in Cheggout's integration material. No further widget codes are documented, and there is no published list to consult for more.
Separately, the current bannerTriggerEvent examples pass the lowercase value article_read as
eventType. That form comes from a different document than the CAMPAIGN_-prefixed codes, and it
is not established whether they are two eras of the same code or two distinct codes. Use whichever
value Cheggout assigns you.
Headless
No fixed codes are documented for the headless path. Codes are channel-specific campaign codes
assigned during setup. A channel-prefixed convention such as YOURCHANNEL_CAMPAIGN appears in
circulated examples.
subTriggerEventType
Several surfaces accept an optional subTriggerEventType alongside the main code. It carries a
finer-grained sub-category of the same event.
| Property | Value |
|---|---|
| Type | String |
| Required | No |
| Available on | Client SDK call, headless GetReward |
| Purpose | Sub-categorise within a trigger code |
There is one documented behaviour worth knowing: for a referral event on the historical
RegisterEvent endpoint, the referral code itself was carried in subEventType. That endpoint is
not currently available, but it shows the intended pattern — the main
code says what kind of thing happened, the sub-code carries the qualifier.
TBD No valid values for subTriggerEventType are documented, nor is it
documented whether campaigns can target on it at all, or whether it is purely a reporting
dimension. Ask what yours should contain before sending anything meaningful in it.
The registry is not published
TBDThere is no authoritative, published registry of trigger-event codes. This is the single largest gap in the scratch-card documentation, and it has practical consequences.
What is missing:
- A canonical list of valid codes per channel.
- Whether codes are global to the platform or scoped per channel.
- Whether codes are case-sensitive.
- Naming rules — the examples in circulation are inconsistent, mixing bare uppercase (
UPI),CAMPAIGN_-prefixed uppercase (CAMPAIGN_ARTICLEREAD) and lowercase snake case (article_read). - Any self-service way to register a new code.
- Valid values and semantics for
subTriggerEventType. - What happens when an unknown code is sent — whether it errors or silently matches nothing.
How to work around it. Obtain your channel's codes in writing from Cheggout during onboarding, alongside the campaigns they map to. Store them as constants in one place in your codebase rather than scattering string literals through call sites — when the registry is published, or when campaign operations change a code, you want one file to edit.
Tracked as a P0 item in Open Items.
Debugging a code that returns nothing
An empty issuance response has several possible causes, and they are indistinguishable from the response alone. Work through them in this order:
| Check | How |
|---|---|
| Is the campaign live for your channel? | Ask Cheggout. This is the most common cause in a fresh environment |
| Is the code exactly right, including case? | Compare against what Cheggout gave you, character by character |
| Is the user genuinely eligible? | Frequency caps and targeting apply. Try a fresh virtualId |
| Is the budget or pool exhausted? | Ask Cheggout |
| Are you calling the right environment? | UAT campaigns do not exist in production and vice versa |
Is extTransactionId genuinely new? | A reused value returns the original card set, which may be empty |
See Testing for a UAT walkthrough.
Next
- Lifecycle — what happens once a code matches.
- Headless integration — where the code goes on the API path.
- SDK integration — where the code goes on mobile.
- Core concepts — the shared vocabulary.