Stored-value card platform
Your task
Design a stored-value / gift-card platform for a large retailer: ~100M active cards, peak ~6,000 redemptions/sec at checkout. Cards have a balance, can be partially redeemed across many purchases, can be reloaded, and some balances expire on a schedule (oldest-funds-first). A redemption at the POS must be fast and must never let two terminals double-spend the same card. Describe the model, the expiry handling, and how you prevent double-spend under concurrent redemptions.
It covers
- Stored value
- Expiry
- Gift card redemption