Pay booking balance (guest)
Public, unauthenticated guest page to pay a booking's outstanding balance. Keyed by booking id.
📄️ View a booking's balance as a guest
Guest-safe booking view + live outstanding. Always 200: an unknown booking comes back with state INVALID.
📄️ Poll the collection status
PENDING (balance still due) or COLLECTED (nothing left), with the live outstanding/paid.
📄️ Confirm a gateway callback and settle the balance
Verifies the gateway callback and idempotently applies the payment to the booking's balance. Safe under concurrent callback + webhook for the same payment.
📄️ Create a payment order for the FULL remaining balance
Creates a gateway order for the live outstanding amount (server-computed — no amount is accepted from the client) and returns the order id + public key for checkout. The backend picks the gateway account by priority, with failover.
📄️ Verify payment with the gateway and settle the balance
Server-side confirmation: queries the gateway for the booking's orders and applies the first paid one to the booking's balance. Idempotent — call after checkout/redirect.