Integrate Engage with your POS, e-commerce checkout, or custom app. Generate codes, redeem points, and look up customer balances — all over a simple REST API.
Any Pro or Enterprise business with a checkout process. Whether you run a cafe, an online store, or a phone order line — you can generate codes for customers and let them spend their points with you.
POS Systems
Generate receipt codes at checkout, redeem points for discounts
E-Commerce
Generate codes after order confirmation, let customers pay partially with points
Custom Apps
Build customer-facing apps that spend points on rewards you control
All merchant API calls require an API key. The business owner or an admin creates one in business settings under Settings → Engagement → POS Receipt Codes. The full key is shown once, when it is created: we store only a fingerprint of it, so copy it straight into your POS. If it is lost, regenerate it.
x-api-key: engage_live_abc123def456...receipt:createGenerate codes
Required for POST /api/business/receipt/generate
customer:lookupLook up customers
Required for POST /api/business/customers/lookup
points:redeemRedeem points
Required for POST /api/business/points/redeem
Your API key is bound to a set of permissions. By default, a new key gets all three. If you build a read-only integration (e.g., a reporting dashboard), ask us to issue a key with only customer:lookup — the other endpoints will return 403 without the matching permission.
Keep your API key secret
Only make API calls from your server. Never embed the key in client-side code. Regenerating rotates the key immediately — the old one stops working on the next request.
Rate limits per key
Each key has its own per-minute request budget based on your plan: Pro 60/min, Enterprise 300/min. Requests over the limit return 429 with a Retry-After header. Different keys share nothing — a high-volume key doesn't affect a low-volume one.
Engage does not record your sales data. We only need the cart total to calculate points. Everything else is optional metadata for your records.
amount — Cart total in your program currencyunlocks — what customer getspointsOverride — set exact base pointsitems — line items for your recordstransactionId — your POS order IDcustomerPhone — pre-fill customerBase points = Cart amount × Your POS multiplier
Example: KSh 250 × 2.0 multiplier = 500 base points
If the customer has reached a loyalty tier, their actual award is higher than the base. The tier multiplier is applied when they redeem the code, not when you generate it.
What to print on the receipt
The points_earned in the response is the base amount. If you print "You earned 500 points" and the customer is Silver, they'll actually receive 600 — a pleasant surprise. If you print "You earned 500 points" and want it to be exactly 500, set pointsOverride (that locks the value and skips the tier bonus).
Use the unlocks parameter to control what the customer gets from this code.
Points Only
Earn points, come back later to play
Small purchases
Spin Access
Unlock the spin wheel immediately
Mid-tier purchases
Trivia Access
Enter the current trivia challenge
Engagement-focused campaigns
Draw Entry
Auto-entry into an open prize draw
Promotional periods
Spin + Draw
Both spin access AND draw entry
High-value purchases
Trivia + Draw
Trivia access AND draw entry
Event-linked purchases
Everything
Full access — spins, trivia, AND draw
VIP customers
/api/business/receipt/generateAPI KeyPro & EnterpriseGenerate a unique receipt code after a customer purchase. Works with POS systems, e-commerce checkouts, and manual order entry. Returns the code to print on the receipt, plus a shareable URL the customer can scan.
Request
{
"amount": 250.00, // Required: Cart total (KSh)
"unlocks": "spin", // Optional: what customer gets (default: "points")
"items": [ // Optional: for your records + printed receipt
{ "name": "Latte", "qty": 2, "price": 125.00 }
],
"cashier": "Jane", // Optional: staff or order reference
"transactionId": "ORD-12345", // Optional: your POS order ID
"customerPhone": "0712345678", // Optional: pre-fill customer info
"pointsOverride": 500, // Optional: set exact base points (skips calculation)
"requireActivation": false // Optional: default false for POS (any customer can redeem)
}Response
{
"success": true,
"receipt": {
"code_id": "uuid",
"receipt_id": "uuid",
"receipt_number": "RCPT-00042",
"code": "BREW-PR-00042-A7X9",
"points_earned": 500,
"amount": 250.00,
"unlocks": "spin",
"tier": "standard",
"business_slug": "brew-bean",
"engagement_url": "https://engagespin.com/brew-bean/code-entry?code=BREW-PR-00042-A7X9",
"business_url": "https://engagespin.com/brew-bean",
"activation_days": 30,
"plan_used": 42,
"plan_limit": 5000
}
}Notes
/api/business/customers/points/redeemAPI KeyPro & EnterpriseDeduct points from a customer's balance and record the redemption. Called from your POS during checkout, or by your backend when a customer spends points on your e-commerce site. Requires a merchant API key; for customer self-service, use /api/business/customers/points/deduct instead.
Request
{
// ─── Identify the customer (one of these) ───
"user_id": "uuid", // OR: their Engage user ID
"customer_phone": "+254...", // OR: their registered phone
"customer_id": "12345678", // OR: their national ID
"code": "BREW-PR-00042-A7X9", // OR: the code they just redeemed
// ─── Staff identifty ───
"staff_user_id": "uuid", // Optional: customer's points redemption record
// ─── What to redeem ───
"points": 100, // Required: number of points to deduct
"reason": "discount", // "discount" | "free_item" | "free_service" | "other"
// ─── Idempotency (strongly recommended) ───
"external_ref": "ORD-12345", // Your transaction ID — prevents double-deduction on retries
"metadata": { "table": "12" } // Optional: any extra context
}Response
{
"success": true,
"redemption_id": "uuid",
"points_redeemed": 100,
"monetary_value": 0.10,
"currency": "KES",
"remaining_points": 400,
"remaining_value": 0.40,
"points_value": 0.001
}Notes
/api/business/customers/points/deductCustomer SessionPro & EnterpriseCustomer-initiated redemption from your app or web client. Same behaviour as a customer redeeming their points, but identifies the customer from their session instead of your API key. Use this if you've built a customer-facing app (mobile or web) that lets customers spend points directly.
Request
{
"business_id": "uuid", // Required: which business
"points": 100, // Required: number of points
"reason": "extra_spin", // "discount" | "extra_spin" | "extra_draw_entry" | "trivia_retry" | "in_app_coupon" | "other"
"external_ref": "SPIN-2026-001", // Optional but recommended
"metadata": {}
}Response
{
"success": true,
"redemption_id": "uuid",
"points_redeemed": 100,
"monetary_value": 0.10,
"currency": "KES",
"remaining_points": 400,
"remaining_value": 0.40,
"points_value": 0.001
}Notes
/api/business/customers/lookupAPI KeyPro & EnterpriseFind one of your customers by phone, email, or ID number. Only people who have activated at your business are found. Returns their balance at YOUR business only — points, tier, activation status, and recent activity at your business. Nothing from other businesses on the platform.
Request
{
"phone": "+254712345678" // OR
// "email": "customer@email.com" // OR
// "id_number": "12345678"
}Response
{
"success": true,
"count": 1,
"users": [
{
"id": "uuid",
"full_name": "Jane Doe",
"phone": "+254 7•• ••• 678", // partly hidden
"email": "ja•••@email.com", // partly hidden
"id_number": "•••••678", // partly hidden, never returned in full
"id_verified": false,
"id_verified_by_this_business": false,
"status": "active",
"loyalty": {
"points": 500,
"points_value_local": 0.50,
"currency": "KES",
"tier": "silver",
"points_earned": 750,
"points_redeemed": 250
},
"activation": {
"is_active": true,
"expires_at": "2026-11-15T...",
"spins_used": 3,
"activated_at": "2026-10-16T..."
},
"recent_activity_here": {
"last_spin_at": "2026-10-25T...",
"last_draw_entry_at": null,
"last_trivia_at": "2026-10-23T..."
},
"flag": null
}
]
}Notes
Every failed request returns:
{
"error": "Insufficient points: customer has 40, needs 100"
}| Status | Meaning | Retry? |
|---|---|---|
| 400 | Validation failed, insufficient points, customer not active | No — fix the request |
| 401 | Missing or invalid API key | No — fix auth |
| 402 | Subscription past due or expired | No — billing issue |
| 403 | Not authorized for this action (plan or engagement cap) | No — upgrade or wait |
| 404 | Business or customer not found | No |
| 429 | Rate limit exceeded | Yes — back off and retry |
| 500 | Server error | Yes — back off and retry |
If your POS retries after a network timeout, you can accidentally double-deduct points. Prevent this by passing external_ref with every redemption call (and every receipt generation, if you'd like). Retries with the same external_ref return the same result without a second deduction.
// First call — new deduction
POST /api/business/points/redeem
{ "user_id": "uuid", "points": 100, "external_ref": "ORD-12345" }
→ { "success": true, "points_redeemed": 100, "remaining_points": 400 }
// Retry after timeout — SAME external_ref
POST /api/business/points/redeem
{ "user_id": "uuid", "points": 100, "external_ref": "ORD-12345" }
→ { "success": true, "points_redeemed": 100, "remaining_points": 400 }
// ↑ same values, no double deductionIf your business is at its monthly engagement limit, code generation returns 403 and points redemption returns 403. Code redeeming, spins, trivia, and draw entries are all hard-blocked at cap. Points redemption is softly metered — it succeeds, but the counter doesn't advance until your next billing period. Handle 403 on generation gracefully (print "This promotion is at capacity, check back next month") and let 403 on redemption fall through.
Every code follows the same pattern — you can identify the type at a glance:
| Example | Type | Where it comes from |
|---|---|---|
| BREW-PR-00042-A7X9 | Receipt | This API (POST /receipt/generate) |
| BREW-PS-00001-B3K2 | Sticker | Batch generation from dashboard |
| BREW-PP-00015-C7D1 | Public | Marketing codes from dashboard |
The letter after the dash (R, S, or P) is for display reference only. Your business's plan and limits are enforced server-side and never depend on the code's prefix.
Rate limits are per API key, per minute. Each key has its own budget; you can run multiple integrations (POS, e-commerce, reporting) without them competing for the same quota.
| Plan | Requests/min (per key) |
|---|---|
| Starter | 30 |
| Pro | 60 |
| Enterprise | 300 |
When you exceed the limit, the response includes Retry-After: N (seconds). Back off for that duration and retry. Sustained abuse can result in temporary key suspension; batch and retry responsibly.
We're happy to help your development team get set up — whether you run a POS, e-commerce store, or custom checkout system.