Implement Points Redemption in Your App
Redemption allows customers to convert loyalty points into discounts, wallet credit, or order-based savings.While the iOS SDK handles balance display, the backend handles all redemption logic for security. This page summarizes the SDK responsibilities and includes core logic extracted from the full Redemption Integration Tutorial. For the end-to-end journey, flows, and business logic, refer to:
👉 Points Redemption Tutorial
Redemption Architecture (Short Summary)
Gameball supports two primary redemption paths:1. Direct Points Redemption
Customer redeems points directly (e.g., wallet value or fixed value rewards).
Your backend calls the Redeem API and updates the customer’s balance.
Your backend calls the Redeem API and updates the customer’s balance.
2. Checkout Redemption
Customer applies points during checkout.
Your backend calls the Order API (with redeemed points + discount values).
Your backend calls the Order API (with redeemed points + discount values).
Both paths are fully documented with diagrams in the
Redemption Integration Tutorial.
Redemption Integration Tutorial.
SDK Role vs Backend Role
SDK Handles
- Fetching customer balance
- Showing points in UI
- Updating UI after redemption
- Sending orders (Track Order API wrapper)
Backend Handles
- Validating redemption
- Fraud prevention
- Calculating discount
- Calling Redeem API
- Applying discount to the cart/order
- Returning final result to the app
Step 1: Fetch Customer Balance (via SDK)
Use the SDK to show the balance before redemption.Step 2: User Chooses a Redemption Amount
This is purely UI-level. Examples:- “Redeem 500 points”
- “Apply maximum available points”
- “Redeem enough points to reach 50% discount”
Step 3: Backend Creates the Redemption Transaction
Your backend must:1
Validate the selected points
Ensure the requested redemption amount is allowed and the customer has enough points.
2
Call the Redeem API
Use
/transactions/cashback-and-redemptions/redeem to deduct points and create a redemption transaction.3
Return discount info to the app
Your backend returns:
- success/failure
- discount amount
- updated balance
- any validation errors
Step 4: App Updates UI Based on Backend Response
Example app implementation:Checkout-Based Redemption (Order API)
For e-commerce checkout flows (cart, items, subtotals), use Order API through the SDK’ssendOrder() method.
Redemption Scenarios (Summary)
Fixed Points Redemption
Customer redeems a fixed amount of points for a fixed-value reward.
Backend calls Redeem API → updates wallet.
Backend calls Redeem API → updates wallet.
Percentage / Flexible Redemption
The customer chooses how many points to apply.
Backend calculates the discount and calls the Redeem API.
Backend calculates the discount and calls the Redeem API.
Checkout Discount Redemption
Points reduce the order total.
Backend calls Order API.
Backend calls Order API.
Full Wallet Use
The customer uses all available points.
Backend performs full validation.
Backend performs full validation.