The problem
A telecom partner wanted to bundle course access with mobile purchases: 10,000 QR codes handed out in shops, redeemed later by people who had never used the platform. A code had to work exactly once, survive a refunded phone, and fail in a language the customer reads.
What we built
Redemption and preview APIs
A preview call that tells a customer what a code contains before they commit, and a redemption call wired into login, with throttling and localized error messages. Redeeming produces a zero-value order, so the rest of the platform treats it like any other purchase.
A queued QR generator
Ten thousand codes generated on a queue with progress polling and cancellation, so an operator can watch a batch run and stop it without leaving half-written data behind.
The guards around a free code
Collision-free generation, self-redemption guards, and invalidation when the underlying purchase is refunded or charged back. A returned phone does not leave a live code in the world.
Tests where the rules live
About 1,800 lines of tests cover the redemption rules, because this is the only surface through which those mobile purchases become accounts.
Screens
How we worked
The partnership requirement came from the business; we owned the engineering end to end, from the generator an operator runs to the error message a customer sees in their own language.
Results
QR codes distributed with mobile purchases
Generated in batches on a queue.
of codes redeemed
Campaign is ongoing.
lines of tests behind the redemption rules
Sole redemption surface for the partnership.
What's next
The gift-code stack is reusable: another partner campaign is a configuration and a batch, not a rebuild.