Fix booking flow blockers preventing customer payments #3708
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/Hibiscus-to-airport/pull/39
The Stripe payment step was hitting /api/payment/create-checkout, which does not exist (only /api/stripe/create-session does), so every card booking 404'd after the booking row was created. The promo lookup hit a non-existent /api/promo-codes/validate. The form also read errors from the wrong response key (detail vs error), so customers saw a generic "Failed to create booking" instead of the real reason. Price calc errors were silently swallowed. Payment success page polled two endpoints that don't exist; switched to the existing /api/bookings/[ref] which already accepts both id and booking_ref.
Other fixes:
Build verified: cd frontend && yarn build — no errors, no warnings.