Case study · Employment work
Booking and payment rules behind an event-booking API
I built NestJS booking and payment APIs for an event-booking product, including existing-booking checks and deposit and remaining-balance logic.
Role: Backend Developer (full-time)
- NestJS
- Node.js
How the booking rules work
Booking request
A request arrives for a booking.
Existing-booking check
If the booking already exists, the request is rejected or handled, not treated as new.
Deposit, then balance
A booking can be part-paid now and the remaining balance collected later.
The problem
A booking API has to cope with requests for something that is already booked, and with payments that arrive in stages. If every request is treated as new, or every payment as final, bookings and balances drift out of step.
What I did
- Developed the NestJS APIs for the booking flow.
- Added application-level existing-booking checks, so a request for a booking that already exists is rejected or handled instead of being treated as new.
- Implemented deposit and remaining-balance logic, so a booking can be part-paid and the balance collected later.
- Reviewed backend API logic and validation as part of the ongoing work.
Related: payment gateways
Separately, I guided another developer on payment-gateway integrations: standardised request and response models and a Factory pattern, so new providers could be added without rewriting the flow.
Questions about this work? connect@aadilagwan.dev