VANITYPASS
B2B APIHotels

Hotel Bookings

Initiate, pay, list, and cancel hotel bookings.

Hotel Bookings

Manage the full hotel booking lifecycle: initiate a reservation, process payment, retrieve booking history, and handle cancellations.

Initiate Booking

POST /v1/hotel/booking/initiate

Create a reservation. Returns a booking_id used in all subsequent booking operations. The reservation is held for a short window while payment is processed.

FieldTypeRequiredDescription
room_idstringyesRoom identifier from the rooms response.
hotel_idstringyesHotel identifier.
check_instringyesCheck-in date in YYYY-MM-DD format.
check_outstringyesCheck-out date in YYYY-MM-DD format.
guests.adultsintegeryesNumber of adult guests.
guests.roomsintegeryesNumber of rooms.
lead_guest.first_namestringyesLead guest's first name.
lead_guest.last_namestringyesLead guest's last name.
lead_guest.emailstringyesLead guest's email address for confirmation.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/hotel/booking/initiate

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/hotel/booking/initiate' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"room_id":"room_example","hotel_id":"htl_example","check_in":"2026-07-01","check_out":"2026-07-03","guests":{"adults":2,"rooms":1},"lead_guest":{"first_name":"Jane","last_name":"Doe","email":"jane@example.com"}}'

Pay for Booking

POST /v1/hotel/booking/pay

[!WARNING] Deprecated: This endpoint is deprecated. Use the unified checkout orchestrator endpoints (/v1/checkout/sessions and /v1/checkout/sessions/{id}) instead.

Initiate payment for a booking. Returns a payment intent or redirect URL depending on the payment method and gateway configured for your organisation.

FieldTypeRequiredDescription
booking_idstringyesBooking identifier from the initiate response.
payment_methodstringyesPayment method: card, wallet, or bank_transfer.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/hotel/booking/pay

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/hotel/booking/pay' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"booking_id":"book_example","payment_method":"card"}'

List Bookings

POST /v1/hotel/booking/list

List bookings with optional filters. Returns a paginated list of hotel bookings for the organisation.

FieldTypeRequiredDescription
pageintegernoPage number (default: 1).
per_pageintegernoResults per page (default: 20, max: 100).
statusstringnoFilter by status: pending, confirmed, cancelled, completed.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/hotel/booking/list

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/hotel/booking/list' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"page":1,"per_page":20}'

Cancel Booking

POST /v1/hotel/booking/cancel

Cancel a booking. Returns cancellation policy details including any applicable fees and the expected refund timeline.

FieldTypeRequiredDescription
booking_idstringyesBooking identifier to cancel.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/hotel/booking/cancel

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/hotel/booking/cancel' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"booking_id":"book_example"}'

Booking Object

Booking detail responses (from Get Booking Details / List Bookings) were enriched with structured guest, hotel-profile, and payer/payee fields. Every field below is nullable — treat any as absent if the supplier or catalogue did not provide it.

FieldTypeDescription
guest_detailsarrayStructured guests on the booking: [{ full_name, phone_number? }]. Defaults to an empty array when no guest data is available.
guest_namestringLead guest display name.
guest_emailstringLead guest email.
duration_nightsintegerNumber of nights for the stay.
occupancyobjectOccupancy breakdown for the booked room(s).
room_detailsobjectRoom-level detail as returned by the supplier.
rate_planobjectRate-plan detail (board type, refundability, etc.).
cancellation_policyobjectCancellation terms, deadlines, and any fees.
property_rulesobjectProperty rules (check-in/out times, house policies).
hotel_profileobjectStatic hotel profile enriched from the internal catalogue: { property_type?, star_rating?, contact_phone?, email_address?, website_url? }. Omitted entirely when no matching hotel record exists.
hotel_addressobjectStructured hotel address.
hotel_contactobjectHotel contact details.
traveller_infoobjectTraveller information attached to the booking.
payer_namestringName of the member who paid.
payer_emailstringEmail of the member who paid.
payer_membership_idstring (uuid)Membership that funded the booking.
payee_idstring (uuid)Membership designated as the payee (group / circle bookings).
allocated_membersarrayFor circle/group bookings, the members allocated to each room.