Commerce & payments stack
The e-commerce and payments backbone: order booking, the full order-tracking lifecycle, every payment integration (Razorpay, PayPal, Stripe), and the hard commerce flows: partial cash-on-delivery, a native coupon engine, and cross-gateway refunds and cancellations.
I built the commerce spine from the ground up: order booking, the order-tracking lifecycle, and integrations with Razorpay, PayPal, and Stripe behind one consistent set of flows. The interesting engineering was in the edges most storefronts don't handle.
A native coupon engine runs a reserve → confirm → revert redemption state machine with row-locked reservations and an expiry sweep, so concurrent checkouts can't over-redeem and abandoned carts don't strand inventory. Partial cash-on-delivery charges a configurable advance online and collects the rest in cash, with a deterministic proportional refund-split so a partial cancellation always refunds exactly the right share of the captured advance, plus a self-heal reconciler that catches out-of-band refunds and refuses to double-refund.
On top of that, a unified cancellation and refund engine spans all three gateways with idempotency keys so webhook retries are safe, per-item partial cancellation, and admin-key-locked internal endpoints. The kind of code that's boring when it works and a very bad day when it doesn't.