Most rewards products start simple: "give users some cashback". Within a few months the team is dealing with points that expire, vouchers that run out of stock, partial redemptions and users asking where their money went. The difference between a rewards program people trust and one they abandon is mostly in how the wallet and the rewards store are designed.
Here is a practical way to structure it.
1. One ledger, several balances
Keep a single append only ledger table and derive every balance from it. Each row has a user, an amount, a currency type and a reason:
| type | meaning |
|---|---|
cashback | real money, withdrawable to UPI or bank |
points | program currency, only redeemable in the store |
bonus_points | promotional points with an expiry date |
Never update a balance column in place. Credits and debits are new rows, which makes audits, refunds and disputes far easier.
2. Decide what is cash and what is not
This decision affects regulation, accounting and user trust. Cashback that can be withdrawn behaves like money, so it needs reliable payouts and reconciliation. Points are a promise that can be redeemed only inside your catalogue. Be explicit in the UI about which is which. Users get angry when something called "cashback" turns out to be store credit.
3. Expiry that users can see
If promotional points expire, show the expiry date next to the balance and send a reminder before it happens. Process expiry as a ledger debit with reason expired, rather than silently deleting anything. Spend the oldest points first (FIFO) so expiry hits as few users as possible.
4. Designing the catalogue
A rewards store only works if people want what is in it. Things that matter:
- Everyday brands first. Vouchers for groceries, fuel, food delivery and fashion get redeemed far more than niche items.
- Low entry price. Make sure there is something users can redeem with a small balance, so they experience the reward early.
- Live stock and price sync. Gift card inventory comes from aggregators via API. Cache availability, but re check stock at checkout.
A good real world example of a consumer facing rewards store is one that sits right next to the cashback wallet, so the user can choose between withdrawing cash and redeeming for a voucher from the same screen.
5. The redemption flow
Redemption is a distributed transaction between your ledger and a third party gift card provider, so treat it carefully:
- Create a
redemptionrecord with statuspendingand an idempotency key. - Place a hold (debit) on the user's balance in the ledger.
- Call the provider to issue the card, passing the idempotency key.
- On success, store the card code encrypted and mark the redemption
completed. - On a definite failure, reverse the hold with a credit row. On a timeout, poll the provider before deciding.
This pattern means a user is never charged twice and never loses balance because a provider was slow.
6. Delivering gift cards safely
Show the code inside the app behind authentication, not only by SMS or email. Mask it by default and let the user reveal it. Log every reveal. Most gift card fraud comes from leaked codes, not from the redemption API itself.
Offering both cash withdrawal and the option to redeem cashback for gift cards gives users a choice, and in practice many prefer vouchers for brands they already shop at.
Wrapping up
Rewards systems look like a marketing feature but behave like a small bank: ledgers, holds, idempotency and reconciliation. Get those right first and the fun parts, campaigns, bonus points and catalogue design, become much easier to change later.
What is the trickiest part of rewards you have had to build? I would love to hear about it in the comments.
