The Percents SDK lets an issuer add branded rewards experiences to an existing web app without rebuilding offer, wallet, and reward activity UI.
The integration has four pieces:
- The issuer host app loads
@percents/web-sdkand callsPercents.init(...). - The SDK requests a short-lived SDK session from the issuer-owned session endpoint.
- The SDK mounts the Percents iframe app and sends the session, appearance, and initial view through
postMessage. - The iframe calls the issuer-owned proxy API, which forwards CHG-scoped requests to Percents.
The browser never receives a broad Percents API token. It only receives an opaque proxy session token that is meaningful to the issuer proxy.
The current SDK supports:
- Offers: available branded rewards offers and merchant activation.
- Wallet: merchant-scoped branded balance summaries and balance detail.
- History: branded rewards activity and balance trends.
Use the SDK Playground to customize the appearance and see the SDK event stream.