What you’ll build
- A credential schema that encodes loyalty tier, lifetime points, and membership date.
- A backend function that issues (or upgrades) the credential when a user crosses a tier boundary.
- Status polling to confirm on-chain issuance.
Prerequisites
- Issue on Behalf enabled for your partner account
- A published issuance program with a loyalty schema
- Partner JWT signing configured
Step 1: Design the credential schema
Create a schema in the Developer Dashboard (Issuer > Schemas) with fields like:| Field | Type | Description |
|---|---|---|
tier | string | Loyalty tier name (e.g. "Gold", "Platinum") |
lifetimePoints | integer | Total points accumulated |
memberSince | string | ISO date when membership started |
upgradedAt | string | ISO date of the most recent tier upgrade |
Step 2: Issue on tier upgrade
When your loyalty engine determines a user has crossed a tier boundary, call Issue on Behalf withonDuplicate: "revoke" to replace the previous tier credential.
Step 3: Trigger on purchase events
Wire the issuance into your purchase or activity pipeline:Step 4: Let verifiers read the credential
Any partner in the ecosystem can verify the user’s tier using Credential Verification. The user presents the credential (via AIR Kit SDK), and the verifier confirms tier status without accessing underlying purchase data.Duplicate handling
UseonDuplicate: "revoke" (default) to replace the old tier credential each time the user upgrades. Use onDuplicate: "ignore" only if you want to keep the existing credential unchanged (e.g. for one-time membership issuance).
Next steps
- AIR for Loyalty for a broader integration guide
- Issue on Behalf API reference for endpoint details
- Credential Verification to set up cross-partner verification