Money and finite inventory, in the same transaction
The backend behind a prize-draw product: a user reserves ticket numbers, pays, and either receives issued tickets or has the reservation released - with nothing left half-committed in between.
DrawApp - Money and finite inventory, in the same transactionThe challenge
Ticket numbers are finite, so a reservation has to hold real inventory while an external payment provider completes - and release it deterministically if the payment fails, is cancelled, or simply never returns. A single opaque purchase call cannot express that. Nor can it be trusted to the client: a mobile app that decides for itself whether payment succeeded is a mobile app that can be made to issue free tickets.
Consumer transactional. DrawApp.
Our approach
Purchase was split into explicit reserve, confirm and cancel steps, so inventory is never implicitly held by an in-flight request. Payment is verified server-side against the provider before any ticket is issued - the app reports what happened, it never decides it. Refunds moved onto a queue so a slow provider call can't block a user request, and the API is generated from an OpenAPI specification so the mobile client and the backend cannot silently drift apart.
Designed, built and shipped end to end.
What we built
- Firebase phone OTP exchanged server-side for Laravel Sanctum bearer tokens
- Reserve → pay → issue flow with deterministic release on failure
- Server-side Razorpay verification, with refunds as queued jobs
- Admin panel for draws, orders, users, banners, FAQs and notifications
- In-app bug reporting, CRM ticketing and store-compliant account deletion
- Force-update version endpoint for the mobile client
The results
Built and documented across the full draw lifecycle, from OTP signup through ticket issuance to refunds.
3 steps: reserve, confirm, cancel
A travel site where the product problem is a content problem
Want results like this?
Tell us what you're working on and what's slowing you down. A short call is usually enough to know whether we're the right fit - no proposal required first.


