Skip to main content

Cashback badge

A small but effective addition: show the customer their Cheggout points balance on your screens, so they have a reason to come back to the marketplace.

Available Android · Available iOS

Two ways to do it

Without an API callWith an API call
You showA coin iconThe actual points balance
EffortMinimalSmall
FreshnessLive
Best forA simple entry pointDriving return visits

Showing the number works better. "You have 240 points" is a reason to tap; a generic coin icon is decoration.

Without an API call

Place the coin icon anywhere in your app. Cheggout provides a deep link; launching it opens the SDK with the points displayed on the Cheggout page.

No integration beyond the launch you already have — the icon is a button that opens a specific Cheggout destination.

With an API call

Fetch the balance and render it yourself.

CHEGNetworkCallHelper.Companion.getChegCashBackPoints(
virtualId,
sessionId,
object : CHEGCashBackCallBack {
override fun onResponse(responseString: String?) {
val json = JSONObject(responseString ?: "{}")
val points = json.optString("cashbackPoints", "0")
val deepLink = json.optString("deepLink", "")
// Render points; open deepLink on tap
}
}
)

Response

{
"cashbackPoints": "100",
"deepLink": "REPLACE_WITH_DEEPLINK"
}
FieldTypeUse
cashbackPointsstringThe balance to display
deepLinkstringWhere to send the customer when they tap the badge
cashbackPoints is a string

Parse it before formatting or comparing. Do not assume it is a number in the JSON.

Design guidance

Refresh sensibly. Fetch when the screen becomes visible, not on a timer. Points change when the customer transacts, which is not often enough to justify polling.

Degrade quietly. If the call fails, show the coin icon without a number rather than an error. A missing balance is not worth interrupting your home screen for.

Cache briefly. A balance a minute old is fine. Do not call on every render pass.

Make the whole badge tappable, opening the deepLink. A number the customer cannot act on is a missed opportunity.

Don't show zero prominently. A new customer with no points is better served by a generic "Explore offers" entry point than by "0 points".

Where to put it

The badge works best next to something the customer already looks at — near the account balance, in the rewards or offers row, or on the post-transaction screen where they just earned something.

Requirements

Both variants need an active session, so the customer must be authenticated and you must have a virtualId and sessionId. See Session & SSO.

Next