Skip to main content

RegisterEvent & ExitEvent

Two event endpoints on the bank API host. They have different standing, so read the badge on each section rather than treating them as a pair.

EndpointStatusUse it for
RegisterEventAvailableReporting a converted referral — the payout signal for Refer & Earn
ExitEventNot availableNothing. Reference only — see below

RegisterEvent​

Available

Logs an event for a specific user, together with the time the event was recorded. Its primary use is Refer & Earn: when a referee's account is activated, your backend fires a referral event and Cheggout assigns rewards to both sides.

Integration guidance lives with the module

This page is the endpoint contract. For when to fire, idempotency, retry and a worked walkthrough of building the signed request, see Event integration.

POST /api/RegisterEvent
EnvironmentURL
Productionhttps://bankapi.cheggout.com/api/RegisterEvent
UAThttps://bankapi-uat.cheggout.com/api/RegisterEvent

Authentication — signed envelope

BDATA payload​

FieldTypeRequiredDescription
virtualIdstringNot specifiedThe customer. For a referral event, the referee — whose account was just activated
channelNamestringNot specifiedYour channel — the publisher's CHANNELID
eventTypestringNot specifiedReferral for the referral module. Other event types such as register appear in older material
subEventTypestringNot specifiedIn the referral case this carries the referral code
additionalParamsstringNot specifiedJSON string, for example {"isNewUser":true} — escaped JSON, not a nested object

TBD The source material lists these fields but does not mark any of them mandatory or optional. Treat the Required column as unconfirmed.

Payload before encoding (synthetic)
{
"virtualId": "pub_8f14e45fceea167a",
"channelName": "YOURCHANNEL",
"eventType": "Referral",
"subEventType": "REPLACE_REFERRAL_CODE",
"additionalParams": "{\"isNewUser\":true}"
}
Sign on your server

A referral event is a payout instruction against your campaign budget. Sign it behind your backend — never with a key embedded in a mobile app.

SDK methods​

Both platforms expose a corresponding SDK call. Use these for in-session signals — for the conversion that pays out, prefer the server-to-server call above, because the device cannot know whether an account was really activated.

Android

CHEGNetworkCallHelper.registerEvent(
virtualId,
eventType,
subEventType,
additionalParams,
object : CHEGregisterCampaignEventCallBack {
override fun onResponse(responseString: String?) { }
}
)

iOS

CheggoutApp.registerEvent(
VirtualId: virtualId,
EventType: "",
SubEventType: "",
additionalParams: ""
) { registerCampaignEventResponse in
print("registerCampaignEventResponse: \(String(describing: registerCampaignEventResponse))")
}

ExitEvent — reference only​

Not available
Do not build against ExitEvent

ExitEvent appears in Cheggout's SDK documentation, but verification against the platform did not find a server implementation for it. The specification below is retained only so publishers who encountered it in older material understand what it described. Confirm availability with Cheggout before writing any code against it. Tracked on Open items.

Documented as logging an event when the customer logs out of the application, and clearing their data.

POST /api/ExitEvent
EnvironmentURL
Productionhttps://bankapi.cheggout.com/api/ExitEvent
UAThttps://bankapi-uat.cheggout.com/api/ExitEvent

Authentication — signed envelope

BDATA payload​

FieldTypeDescription
virtualIdstringThe customer
channelNamestringYour channel — the publisher's CHANNELID
sessionIdstringThe session being ended
tokenstringThe token being invalidated
Payload before encoding (reference only)
{
"virtualId": "pub_8f14e45fceea167a",
"channelName": "YOURCHANNEL",
"sessionId": "REPLACE_SESSION_ID",
"token": "REPLACE_TOKEN"
}

Instead of ExitEvent​

For logout. You do not need ExitEvent to end a session cleanly. Sessions are bounded, and the return handshake already terminates the SDK session when the customer leaves. If you have a specific requirement to invalidate a Cheggout session at logout, raise it with Cheggout.

For general event logging. There is no published general-purpose event API. Instrument your own analytics.

Next​