Skip to documentation content

Developer Reference

Integrate payment gateways

Register a payment gateway through the public extension API while preserving server verification, amount matching and idempotent ledger ownership.

Payment gateway extensions plug into Hotel Booking’s public payment contract; they do not become a theme feature. The authoritative pipeline is availability, server room quote, services and tax, atomic booking snapshot, payment transaction, verified provider settlement and refund ledger. Browser amounts are advisory and must never become the ledger amount. The server authority remains canonical for quote, currency, settlement and ledger state.

Gateway obligations

  1. Register a stable gateway identifier and presentation metadata through the documented extension API. Keep credentials in the provider’s secure store.
  2. Create or reference the provider transaction from the saved booking and return a recoverable Payment step when the provider requires redirect or client confirmation.
  3. Verify webhook signatures, provider amount, currency and event identity before writing a ledger entry. Settlement and refund events must be idempotent and exactly once.
  4. Keep booking lifecycle separate from payment status. A successful payment does not silently confirm a booking, and payments never recalculate live tax rules.
  5. Provide a signed return or callback route that restores the stored confirmation URL and preserves the booking locale.

Themes may render the supplied payment fields and notices, but cannot create transactions, read secrets or mutate the ledger. Test pending, failed, duplicate, mismatched and refunded events with sandbox doubles.

Next: register a tax provider.

Was this article helpful?

Your feedback helps us improve the documentation.