Engage

Customers who engage come back.

Product

  • How It Works
  • About
  • Documentation
  • Enter a Code

For Businesses

  • Create Account
  • Plans
  • Consultation
  • Contact

Legal

  • Terms of Use
  • Merchant Agreement
  • Privacy Policy
  • Cookie Notice
  • Privacy Contact

Legal

  • Terms
  • Privacy
  • Cookies
  • Privacy Contact

© 2026 Upshift Technologies Limited. Engage is a product of Upshift.

Businesses see only their own customers. We never sell personal data.

For Developers

API Reference

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.

Who Can Use This 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

Authentication

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:create

Generate codes

Required for POST /api/business/receipt/generate

customer:lookup

Look up customers

Required for POST /api/business/customers/lookup

points:redeem

Redeem 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.

What Engage Needs

Engage does not record your sales data. We only need the cart total to calculate points. Everything else is optional metadata for your records.

Required

  • • amount — Cart total in your program currency

Optional

  • • unlocks — what customer gets
  • • pointsOverride — set exact base points
  • • items — line items for your records
  • • transactionId — your POS order ID
  • • customerPhone — pre-fill customer

Points Calculation & Tiers

Base points = Cart amount × Your POS multiplier

Example: KSh 250 × 2.0 multiplier = 500 base points

Tier bonus applies on top — automatically

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.

Bronze (1.0×)500 pts
Silver (1.2×)600 pts
Gold (1.5×)750 pts
Platinum (2.0×)1000 pts

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).

What Your Customer Unlocks

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

Endpoints

POST/api/business/receipt/generateAPI KeyPro & Enterprise

Generate Receipt Code

Generate 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

  • • Each code is single-use and expires 30 days after generation
  • • The points_earned value is the base amount before the customer's tier bonus
  • • plan_used and plan_limit tell you your current usage — if plan_used reaches plan_limit, further generation fails
  • • When requireActivation is true, only customers already active at your business can redeem
  • • Use pointsOverride to set exact base points (skips the multiplier calculation)
POST/api/business/customers/points/redeemAPI KeyPro & Enterprise

Redeem Customer Points

Deduct 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

  • • External_ref is your idempotency key — resending the same external_ref returns the same result without a second deduction
  • • Returns 400 with a clear message if the customer has insufficient points or is not active at your business
  • • The monetary_value uses the customer's original earn rate, not your current rate — their balance is honoured at face value
  • • One engagement is consumed per successful redemption
  • • Fails with 402/403 if your subscription is lapsed or you're at your monthly engagement cap
POST/api/business/customers/points/deductCustomer SessionPro & Enterprise

Deduct Points (Customer Session)

Customer-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

  • • The customer must be signed in to Engage — call this from your app with their session, not their user_id
  • • Same idempotency contract: pass external_ref to prevent double-deduction
  • • Fulfillment (issuing a spin ticket, applying a coupon, etc.) is your responsibility after a successful response
  • • Best practice: call this immediately before delivering the reward, not after
POST/api/business/customers/lookupAPI KeyPro & Enterprise

Look Up Customer

Find 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

  • • Only finds your own customers (people who activated at your business); anyone else returns an empty list
  • • Only returns data for YOUR business — cross-tenant data is never exposed
  • • Requires the customer:lookup permission on your API key
  • • Phone, email and ID number are partly hidden. Your owner or an admin can reveal a phone or email in the dashboard; ID numbers are only ever checked, never shown
  • • Every lookup is recorded with the API key that made it, and your business owner can read the record (Settings → Team → Customer data access log)
  • • Flagged users show the reason and timestamp but not which business flagged them
  • • Phone matches multiple formats automatically: 0712..., +254712..., 254 712..., etc.
  • • Returns up to 5 matches — refine your search if you get more than 1
  • • Banned users are excluded — the response is empty for those

Errors, Retries & Idempotency

Standard error format

Every failed request returns:

{
  "error": "Insufficient points: customer has 40, needs 100"
}
StatusMeaningRetry?
400Validation failed, insufficient points, customer not activeNo — fix the request
401Missing or invalid API keyNo — fix auth
402Subscription past due or expiredNo — billing issue
403Not authorized for this action (plan or engagement cap)No — upgrade or wait
404Business or customer not foundNo
429Rate limit exceededYes — back off and retry
500Server errorYes — back off and retry

Idempotency — use external_ref

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 deduction

Engagement limits

If 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.

What a Code Looks Like

Every code follows the same pattern — you can identify the type at a glance:

ExampleTypeWhere it comes from
BREW-PR-00042-A7X9ReceiptThis API (POST /receipt/generate)
BREW-PS-00001-B3K2StickerBatch generation from dashboard
BREW-PP-00015-C7D1PublicMarketing 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

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.

PlanRequests/min (per key)
Starter30
Pro60
Enterprise300

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.

Need help integrating?

We're happy to help your development team get set up — whether you run a POS, e-commerce store, or custom checkout system.

Contact Developer Support