Skip to content

Middleware Backend — Payments ​

Folder: src/routes/payments/
Mount: api/v1/bookdirect/payments
Status: live. Paystack checkout or wallet. Persist Core payment. Do not store the booking only in Mongo.

Middleware Backend · winnerimplemented

POST https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/initialize

POST https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/verify/{reference}

POST https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/webhook/paystack

GET https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/wallet/virtual-account

GET https://middleware-dev.bookdirect.live/api/v1/bookdirect/payments/wallet/balance

Initialize body: booking_uuid required. provider: paystack | wallet. For Paystack, amount_kobo must match booking total_amount_ngn * 100.

Webhook: x-paystack-signature HMAC — no user JWT. Never accept a client body that says “mark paid”.

Refunds: to implement — no folder. Paid cancel must not only PATCH reservation status.

ENV: PAYSTACK_SECRET_KEY (server). Frontend: Booking.

API-first. Middleware Backend wins over Core Backend when both exist.