Hotel booking API
Book on the hotel’s own engine.
Book an offer on the hotel's own engine. The guest pays the property; booking is free.
Step through it: click a status, drag along the line, or use the arrow keys.
- Taken, with its Idempotency-Key, so a retry never books twice.
requires_credentialcard_entry: waiting for the guest’s payment credential
- The offer is checked again to the cent: revalidation.price_changed says if it moved.
requires_user_actionhandoff: the guest finishes on a hosted page
- The guest pays the property through a hosted checkout link. The payee is always the hotel.
expiredthe link ran outcanceledyou canceled before submission
- Paid, and back on the hotel’s engine to finish the reservation.
submittedcard_entry: the card was entered, the engine is answeringrequires_actioncard_entry: the guest approves 3-D Secure in their bank appconfirmation_pendingsubmitted, no confirmation seen yetunknownthe outcome couldn’t be read; never retried blindlyfailedit couldn’t be completed
- The engine’s own confirmation code comes back.
RX48213
booking.updatedstatus queuedbooking.updatedstatus processingbooking.updatedstatus requires_paymentbooking.updatedstatus processingbooking.updatedstatus confirmed
Checkout payment is in preview; handoff and external modes cover the engines it can’t reach.
Book any offer_id from hotel detail or rates. We re-check the price first, so revalidation.price_changed tells you if it moved.
Live booking is in early access: request it from [email protected]; until then creates with a live key answer 403 forbidden with details.reason: "not_yet_available". Any test key (vl_test_), Free included, runs the whole booking flow in the sandbox at no charge.
Booking is free, and VistaLink never holds the guest's money: with checkout the guest pays the property directly. On commissionable stays the commission is split with you; the split is on the Billing page.
Pick a payment mode: checkout, handoff or external. checkout (preview) returns a Stripe Checkout link for your user. handoff gives the guest a hosted page to finish on. external prefills the engine's own page and doesn't track payment.
Once switched on, bookings need Build or above; on Free a create answers 403 forbidden with details.reason: "tier_required" and details.required_tier: "build".
Send an Idempotency-Key with every create; it's required, so a retry can never book twice. offer, timeline and the payment amount and currency stay empty until we know them. A booking you cancel ends canceled; you can cancel until we've submitted it to the hotel.
/v2/bookings/v2/bookings/{booking_id}/confirm/v2/payment_credentials/v2/bookings/{booking_id}/v2/bookings/{booking_id}/cancelCreate a booking
/v2/bookingsAnswers 202 with the Booking, which then moves on its own: poll GET /v2/bookings/{booking_id} or subscribe to booking.updated. Needs the booking scope and an Idempotency-Key; bookings are free and billing is always null. Live booking is in early access (request it from [email protected]; until then live keys answer 403 not_yet_available) and then needs the Build plan. Any vl_test_ key, Free included, gets the full booking sandbox: it simulates every outcome and never contacts a hotel or charges a card. Payment mode is checkout (a hosted checkout link in payment.checkout_url, where the guest pays the property directly), handoff (a hosted session for the guest) or external (the booking engine's own prefilled page). card_entry answers 403 not_yet_available for a live key until it is enabled for the account (test keys run it in the sandbox): it needs payment_method and mandate, answers requires_credential, and nothing touches the hotel until POST /v2/bookings/{booking_id}/confirm.
Free. On commissionable hotels the commission is split with you; see Billing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-KeyREQUIRED | header | string | Required. Any unique string. Same key and same body returns the original response; same key and a different body is a 409. |
Request body
| Field | Type | Description |
|---|---|---|
hotel_idREQUIRED | string (uuid) | The hotel being booked; must be the hotel the offer belongs to. |
offer_idREQUIRED | string | An offer_id this key received from search, hotel detail, rates or chat in the last 30 minutes. |
stayREQUIRED | Stay | Dates and rooms of a stay, up to 30 nights and 9 rooms. |
guestsREQUIRED | BookingGuests[] | One entry per room in stay.rooms, each with its lead guest. At most 9. |
guests[].roomREQUIRED | integer | Zero-based index into stay.rooms; every room needs exactly one entry. 0–8. |
guests[].leadREQUIRED | object | The room's lead guest, whose name, email and phone go on the reservation. |
guests[].lead.first_nameREQUIRED | string | Lead guest's first name as it should appear on the reservation. |
guests[].lead.last_nameREQUIRED | string | Lead guest's last name as it should appear on the reservation. |
guests[].lead.emailREQUIRED | string (email) | Lead guest's email address; the hotel's engine needs it for every reservation. |
guests[].lead.phoneREQUIRED | string | Lead guest's phone number, international format recommended; the hotel's engine needs it for every reservation. |
guests[].occupants | Occupant[] | Other guests in the room, up to 16; kept with the booking but not sent to the engine. |
guests[].occupants[].first_name | string | null | Guest's first name. |
guests[].occupants[].last_name | string | null | Guest's last name. |
guests[].occupants[].age | integer | null | Guest's age in years, 0 to 120. |
paymentREQUIRED | object | How the guest will pay. |
payment.modeREQUIRED | string | checkout returns a hosted checkout link for pay-now offers, handoff returns a hosted browser session in which the guest completes the booking, external returns the booking engine's own prefilled page. card_entry (403 not_yet_available for a live key until enabled for the account; test keys run it in the sandbox) types the guest's card into the hotel's own checkout from a one-booking credential: send payment_method and mandate, then call POST /v2/bookings/{booking_id}/confirm. The hotel stays merchant of record. One of checkout, handoff, external, card_entry. |
payment.return_url | string (uri) | null | checkout only: the https page the guest lands on after paying (with booking_id appended) or abandoning; a VistaLink page when null. |
payment.locale | string | null | checkout only: language of the hosted checkout page as a language tag; pt-BR reads as pt, and unsupported languages fall back to the guest's browser. |
payment_method | object | null | Required with payment.mode card_entry, refused otherwise. |
payment_method.typeREQUIRED | string | Always card in this version. Always card. |
payment_method.credential_id | string | null | A cred_ id from POST /v2/payment_credentials, bound to this booking at create. Omit it to send it with POST /v2/bookings/{booking_id}/confirm instead. |
mandate | object | null | Required with payment.mode card_entry, refused otherwise. |
mandate.accepted_totalREQUIRED | string | The total the guest saw and accepted, a decimal string; must equal the offer's total to the cent. A higher engine total fails the booking with price_changed before the card is typed; a lower one goes ahead. |
mandate.currencyREQUIRED | string | ISO 4217 currency of accepted_total; must be the offer's. |
mandate.consentREQUIRED | object | The guest's approval of this booking. |
mandate.consent.obtained_atREQUIRED | string (date-time) | When the guest approved the summary (hotel, room, rate, dates, party, total and cancellation terms), RFC 3339; at most 15 minutes before the create call. |
mandate.consent.methodREQUIRED | string | explicit_ui_confirmation (a button on a screen showing the summary) or explicit_chat_confirmation (an agent turn that showed the summary and got a yes in that same turn). One of explicit_ui_confirmation, explicit_chat_confirmation. |
mandate.consent.cardholder_authorizedREQUIRED | boolean | Must be true: you attest that the guest is the cardholder, or is authorised to use the card, for this booking. Always true. |
mandate.consent.display_hash | string | null | Optional sha256: hash of the canonical JSON you showed the guest; stored as evidence. |
mandate.consent.user_ref | string | null | Optional opaque id of the guest in your system; stored as evidence, never echoed. |
special_requests | string | null | Free-text requests from the guest, up to 2,000 characters; stored with the booking but not sent to the engine today. |
webhook_url | string (uri) | null | An https URL stored with the booking; booking.updated events are delivered only to webhooks created with POST /v2/webhooks, not here. |
Example
curl -X POST 'https://api.vistalink.com/v2/bookings' \
-H "Authorization: Bearer $VISTALINK_API_KEY" \
-H 'Idempotency-Key: 4f1c2b8e-booking-ada-rossi' \
-H "Content-Type: application/json" \
-d '{
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"stay": {
"check_in": "2026-11-14",
"check_out": "2026-11-16",
"rooms": [
{
"adults": 2,
"children_ages": []
}
]
},
"guests": [
{
"room": 0,
"lead": {
"first_name": "Ada",
"last_name": "Rossi",
"email": "ada@example.com",
"phone": "+390600000000"
},
"occupants": []
}
],
"payment": {
"mode": "handoff",
"locale": "en"
},
"special_requests": "Late arrival"
}'vistalink bookings create \
--idempotency-key 4f1c2b8e-booking-ada-rossi \
--hotel-id 43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19 \
--offer-id off_t3c8e1a9b4f2d7e6a5c0b \
--stay '{"check_in":"2026-11-14","check_out":"2026-11-16","rooms":[{"adults":2,"children_ages":[]}]}' \
--guests '[{"room":0,"lead":{"first_name":"Ada","last_name":"Rossi","email":"ada@example.com","phone":"+390600000000"},"occupants":[]}]' \
--payment '{"mode":"handoff","locale":"en"}' \
--special-requests 'Late arrival'const res = await fetch("https://api.vistalink.com/v2/bookings", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VISTALINK_API_KEY}`,
"Idempotency-Key": "4f1c2b8e-booking-ada-rossi",
"Content-Type": "application/json",
},
body: JSON.stringify({
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"stay": {
"check_in": "2026-11-14",
"check_out": "2026-11-16",
"rooms": [
{
"adults": 2,
"children_ages": []
}
]
},
"guests": [
{
"room": 0,
"lead": {
"first_name": "Ada",
"last_name": "Rossi",
"email": "ada@example.com",
"phone": "+390600000000"
},
"occupants": []
}
],
"payment": {
"mode": "handoff",
"locale": "en"
},
"special_requests": "Late arrival"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import os
import requests
resp = requests.post(
"https://api.vistalink.com/v2/bookings",
headers={"Authorization": f"Bearer {os.environ['VISTALINK_API_KEY']}", "Idempotency-Key": "4f1c2b8e-booking-ada-rossi"},
json={
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"stay": {
"check_in": "2026-11-14",
"check_out": "2026-11-16",
"rooms": [
{
"adults": 2,
"children_ages": [],
},
],
},
"guests": [
{
"room": 0,
"lead": {
"first_name": "Ada",
"last_name": "Rossi",
"email": "ada@example.com",
"phone": "+390600000000",
},
"occupants": [],
},
],
"payment": {
"mode": "handoff",
"locale": "en",
},
"special_requests": "Late arrival",
},
)
resp.raise_for_status()
data = resp.json(){
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"handoff": {
"expires_at": "2026-10-07T10:00:00Z",
"url": "https://bookings.vistalink.com/s/Hn4q8Zr2Wc7Lp1Xt"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_user_action",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
}
]
}{
"booking_id": "bk_A7m3Rq8Zt5Hn2Wd6",
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment": {
"amount": "962.00",
"checkout_url": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4",
"currency": "EUR",
"expires_at": "2026-10-07T10:01:38Z",
"mode": "checkout",
"payee": "property",
"status": "pending"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_payment",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:38Z",
"state": "requires_payment"
}
]
}{
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:36:12Z",
"code": "RX48213",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
},
{
"at": "2026-10-07T09:36:12Z",
"state": "confirmed"
}
]
}{
"booking_id": "bk_C4r9Dn2Ty7Ek5Pw1",
"charges": {
"amount": "962.00",
"currency": "EUR",
"mismatch": false
},
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:31:20Z",
"code": "RX48219",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"mandate": {
"accepted_total": "962.00",
"consent_at": "2026-10-07T09:29:12Z",
"currency": "EUR",
"expires_at": "2026-10-07T09:59:30Z",
"max_total": "962.00"
},
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment_method": {
"brand": "visa",
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
"credential_status": "deleted",
"exp_month": 12,
"exp_year": 2028,
"last4": "4242",
"type": "card"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:05Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"submitted_at": "2026-10-07T09:31:02Z",
"timeline": [
{
"at": "2026-10-07T09:29:30Z",
"state": "requires_credential"
},
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:01Z",
"state": "processing"
},
{
"at": "2026-10-07T09:31:02Z",
"state": "submitted"
},
{
"at": "2026-10-07T09:31:20Z",
"state": "confirmed"
}
],
"version": 6
}Response 202
Successful Response
| Field | Type | Description |
|---|---|---|
request_id | string | null | Id of the request that returned this booking; set on create, null on get, cancel and webhook payloads. |
booking_idREQUIRED | string | Booking id, bk_ followed by 16 letters and digits. |
statusREQUIRED | string | Where the booking is: queued, processing, requires_payment (show payment.checkout_url), requires_user_action (send the guest to handoff.url), then confirmed, confirmation_pending (submitted, confirmation not yet seen), failed, expired or canceled. Only card_entry bookings also use requires_credential (waiting for confirm), submitted (the hotel's pay button was pressed), requires_action (see next_action) and unknown (submitted, outcome not yet provable: tell the guest not to book again and to check their email from the hotel). One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
hotel_idREQUIRED | string (uuid) | The hotel being booked. |
offer | Offer | null | One bookable price for one room and rate, as observed on a channel. |
revalidation | object | null | The result of re-checking the offer on the engine; null until that check has an outcome. |
revalidation.price_changedREQUIRED | boolean | True when the engine's total or currency differs from the offer by any amount, in which case the booking fails with price_changed; false otherwise, including when the room sold out. |
revalidation.total | string | null | Total the engine quoted for the same room and rate, a decimal string in currency; null when the room or rate is no longer offered. |
revalidation.currency | string | null | ISO 4217 currency of total. |
revalidation.checked_at | string (date-time) | null | When the engine was checked, RFC 3339 UTC. |
handoff | object | null | Where the guest finishes the booking in handoff and external modes; null in checkout mode and before the engine step. |
handoff.urlREQUIRED | string (uri) | In handoff mode, the hosted browser session for the guest; in external mode, the booking engine's own prefilled page. |
handoff.expires_at | string (date-time) | null | When the hosted session stops accepting the guest (20 minutes after it is issued); null in external mode. |
confirmation | object | null | The hotel's confirmation; null until status is confirmed. |
confirmation.code | string | null | The hotel's confirmation number; null when the engine confirmed without showing one. |
confirmation.evidenceREQUIRED | string | How the confirmation was established; engine_confirmation_signal (the engine's own confirmation page or code) is the only value produced today. One of engine_confirmation_signal, email, manual. |
confirmation.at | string (date-time) | null | When the booking was confirmed, RFC 3339 UTC. |
payment | BookingPayment | null | The guest's payment. Null for external mode, and for checkout until the link is issued. |
failure | object | null | Why the booking failed or expired; null otherwise. |
failure.reasonREQUIRED | string | Stable failure code: sold_out, price_changed (revalidation, or with card_entry the hotel's checkout total was above the accepted total; nothing was typed), price_changed_at_payment (the engine charged a different total after checkout), engine_blocked, handoff_expired (the guest left the session), payment_expired, payment_failed, unsupported_engine (the engine or offer cannot be booked in this mode), payment_unavailable (hosted checkout is not available; use handoff). card_entry only: card_declined (the hotel's checkout declined the card; create a new booking with a new credential), three_d_secure_failed, card_entry_failed (stopped before the pay button; nothing was charged), card_entry_unavailable (card entry is not available for this engine right now), and mandate_expired on expired (not confirmed within 30 minutes). One of sold_out, price_changed, price_changed_at_payment, engine_blocked, handoff_expired, payment_expired, payment_failed, unsupported_engine, payment_unavailable, card_declined, three_d_secure_failed, card_entry_failed, card_entry_unavailable, mandate_expired. |
failure.message | string | null | One English sentence explaining the failure. |
commission | object | null | Commission terms once the booking is confirmed; null before that. |
commission.commissionableREQUIRED | boolean | True when the hotel has an active commission contract covering today. |
commission.rate | string | null | Commission as a decimal fraction string of the booking total, for example "0.10" for 10%; null when not commissionable or the contract has no rate. |
commission.partner_share | string | null | Your share of the commission as a decimal fraction string, for example "0.50"; null when not commissionable. |
timeline | TimelineEntry[] | Every status the booking has been in, oldest first, starting with queued (requires_credential for card_entry). |
timeline[].atREQUIRED | string (date-time) | When the booking entered state, RFC 3339 UTC. |
timeline[].stateREQUIRED | string | The status the booking moved to. One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
billing | null | Always null: bookings are free. |
version | integer | null | card_entry only: goes up by one on every change; apply a booking.updated event only when its data.version is higher than the last one you saw. |
mandate | object | null | card_entry only: what the guest approved. |
mandate.accepted_totalREQUIRED | string | The total the guest accepted, in currency. |
mandate.currencyREQUIRED | string | ISO 4217 currency. |
mandate.max_totalREQUIRED | string | The most the hotel's checkout may show before the card is typed; equals accepted_total. |
mandate.consent_atREQUIRED | string (date-time) | When the guest approved, as you sent it. |
mandate.expires_atREQUIRED | string (date-time) | The mandate's deadline: confirm before it, 30 minutes after create. |
payment_method | object | null | card_entry only: the card's brand, last four and expiry. |
payment_method.typeREQUIRED | string | Always card. Always card. |
payment_method.credential_id | string | null | The cred_ id; null until bound. |
payment_method.brand | string | null | Card brand, for example visa. |
payment_method.last4 | string | null | Last four digits. |
payment_method.exp_month | integer | null | Expiry month. |
payment_method.exp_year | integer | null | Expiry year. |
payment_method.credential_status | string | null | The credential's status; see PaymentCredential.status. One of active, bound, consumed, deleted. |
next_action | object | null | card_entry only: set exactly when status is requires_action. |
next_action.typeREQUIRED | string | three_d_secure_app: tell the guest to approve the payment in their banking app; call nothing. three_d_secure_otp: the bank's challenge asks for a code the guest received; the challenge is watched until expires_at (a relay endpoint is not available yet). One of three_d_secure_app, three_d_secure_otp. |
next_action.expires_at | string (date-time) | null | The bank's deadline, RFC 3339 UTC. |
next_action.cancelable | boolean | Always false: the card was already submitted. Default false. |
charges | object | null | card_entry only: the total the hotel's checkout showed. |
charges.amount | string | null | The engine's total, a decimal string. |
charges.currency | string | null | ISO 4217 currency of amount. |
charges.mismatch | boolean | null | True when the engine reported a charge above mandate.max_total after submit; ops is alerted. |
submitted_at | string (date-time) | null | card_entry only: when the hotel's pay button was pressed. Once set, the booking is never resubmitted and cannot be canceled. |
expires_at | string (date-time) | null | card_entry only: in requires_credential, the deadline to confirm; null otherwise. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Validation errors carry details.fields[]. |
| 401 | unauthorized | No key, or the key is unknown or revoked. |
| 403 | forbidden | Missing scope, or details.reason tier_required: this needs the Build plan or higher; on Free, details.free_trial says what a test key may try. |
| 404 | not_found | Offer unknown or expired. |
| 409 | conflict | The Idempotency-Key was reused with a different body, or the resource is in a state that forbids the change. |
| 429 | rate_limited | Over the team's per-minute limit (wait Retry-After seconds), or over its daily allowance of different hotels (details.reason: "daily_hotel_cap"; Retry-After runs to 00:00 UTC). |
| 503 | unavailable | We're temporarily unable to serve the call. Retry with backoff. |
Confirm a card-entry booking
/v2/bookings/{booking_id}/confirmAnswers 403 not_yet_available for a live key until card entry is enabled for the account (test keys run it in the sandbox). card_entry only: attaches the credential (or uses the one bound at create) and starts the booking on the hotel's own checkout, where the card is typed and the hotel charges it as merchant of record. Answers 202 with the Booking in queued; follow it with GET /v2/bookings/{booking_id} or booking.updated. Accepted only in requires_credential and only once: any other status, including submitted and unknown, is 409 booking_not_confirmable. Needs the booking scope, the Build plan or higher and an Idempotency-Key. Test keys get a simulated outcome chosen by the credential's test token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
booking_idREQUIRED | path | string | The booking_id returned by POST /v2/bookings. |
Idempotency-KeyREQUIRED | header | string | Required. Any unique string. Same key and same body returns the original response; same key and a different body is a 409. |
Request body
| Field | Type | Description |
|---|---|---|
credential_id | string | null | The cred_ id to charge; omit it when it was sent as payment_method.credential_id at create. Must be active, unexpired, yours and not bound to another booking. |
Example
curl -X POST 'https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/confirm' \
-H "Authorization: Bearer $VISTALINK_API_KEY" \
-H 'Idempotency-Key: 4f1c2b8e-booking-ada-rossi' \
-H "Content-Type: application/json" \
-d '{
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1"
}'vistalink bookings confirm bk_P2w9Xc4Rt1Lm8Qz3 \
--idempotency-key 4f1c2b8e-booking-ada-rossi \
--credential-id cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1const res = await fetch("https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/confirm", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VISTALINK_API_KEY}`,
"Idempotency-Key": "4f1c2b8e-booking-ada-rossi",
"Content-Type": "application/json",
},
body: JSON.stringify({
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import os
import requests
resp = requests.post(
"https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/confirm",
headers={"Authorization": f"Bearer {os.environ['VISTALINK_API_KEY']}", "Idempotency-Key": "4f1c2b8e-booking-ada-rossi"},
json={
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
},
)
resp.raise_for_status()
data = resp.json(){
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"handoff": {
"expires_at": "2026-10-07T10:00:00Z",
"url": "https://bookings.vistalink.com/s/Hn4q8Zr2Wc7Lp1Xt"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_user_action",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
}
]
}{
"booking_id": "bk_A7m3Rq8Zt5Hn2Wd6",
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment": {
"amount": "962.00",
"checkout_url": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4",
"currency": "EUR",
"expires_at": "2026-10-07T10:01:38Z",
"mode": "checkout",
"payee": "property",
"status": "pending"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_payment",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:38Z",
"state": "requires_payment"
}
]
}{
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:36:12Z",
"code": "RX48213",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
},
{
"at": "2026-10-07T09:36:12Z",
"state": "confirmed"
}
]
}{
"booking_id": "bk_C4r9Dn2Ty7Ek5Pw1",
"charges": {
"amount": "962.00",
"currency": "EUR",
"mismatch": false
},
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:31:20Z",
"code": "RX48219",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"mandate": {
"accepted_total": "962.00",
"consent_at": "2026-10-07T09:29:12Z",
"currency": "EUR",
"expires_at": "2026-10-07T09:59:30Z",
"max_total": "962.00"
},
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment_method": {
"brand": "visa",
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
"credential_status": "deleted",
"exp_month": 12,
"exp_year": 2028,
"last4": "4242",
"type": "card"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:05Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"submitted_at": "2026-10-07T09:31:02Z",
"timeline": [
{
"at": "2026-10-07T09:29:30Z",
"state": "requires_credential"
},
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:01Z",
"state": "processing"
},
{
"at": "2026-10-07T09:31:02Z",
"state": "submitted"
},
{
"at": "2026-10-07T09:31:20Z",
"state": "confirmed"
}
],
"version": 6
}Response 202
Successful Response
| Field | Type | Description |
|---|---|---|
request_id | string | null | Id of the request that returned this booking; set on create, null on get, cancel and webhook payloads. |
booking_idREQUIRED | string | Booking id, bk_ followed by 16 letters and digits. |
statusREQUIRED | string | Where the booking is: queued, processing, requires_payment (show payment.checkout_url), requires_user_action (send the guest to handoff.url), then confirmed, confirmation_pending (submitted, confirmation not yet seen), failed, expired or canceled. Only card_entry bookings also use requires_credential (waiting for confirm), submitted (the hotel's pay button was pressed), requires_action (see next_action) and unknown (submitted, outcome not yet provable: tell the guest not to book again and to check their email from the hotel). One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
hotel_idREQUIRED | string (uuid) | The hotel being booked. |
offer | Offer | null | One bookable price for one room and rate, as observed on a channel. |
revalidation | object | null | The result of re-checking the offer on the engine; null until that check has an outcome. |
revalidation.price_changedREQUIRED | boolean | True when the engine's total or currency differs from the offer by any amount, in which case the booking fails with price_changed; false otherwise, including when the room sold out. |
revalidation.total | string | null | Total the engine quoted for the same room and rate, a decimal string in currency; null when the room or rate is no longer offered. |
revalidation.currency | string | null | ISO 4217 currency of total. |
revalidation.checked_at | string (date-time) | null | When the engine was checked, RFC 3339 UTC. |
handoff | object | null | Where the guest finishes the booking in handoff and external modes; null in checkout mode and before the engine step. |
handoff.urlREQUIRED | string (uri) | In handoff mode, the hosted browser session for the guest; in external mode, the booking engine's own prefilled page. |
handoff.expires_at | string (date-time) | null | When the hosted session stops accepting the guest (20 minutes after it is issued); null in external mode. |
confirmation | object | null | The hotel's confirmation; null until status is confirmed. |
confirmation.code | string | null | The hotel's confirmation number; null when the engine confirmed without showing one. |
confirmation.evidenceREQUIRED | string | How the confirmation was established; engine_confirmation_signal (the engine's own confirmation page or code) is the only value produced today. One of engine_confirmation_signal, email, manual. |
confirmation.at | string (date-time) | null | When the booking was confirmed, RFC 3339 UTC. |
payment | BookingPayment | null | The guest's payment. Null for external mode, and for checkout until the link is issued. |
failure | object | null | Why the booking failed or expired; null otherwise. |
failure.reasonREQUIRED | string | Stable failure code: sold_out, price_changed (revalidation, or with card_entry the hotel's checkout total was above the accepted total; nothing was typed), price_changed_at_payment (the engine charged a different total after checkout), engine_blocked, handoff_expired (the guest left the session), payment_expired, payment_failed, unsupported_engine (the engine or offer cannot be booked in this mode), payment_unavailable (hosted checkout is not available; use handoff). card_entry only: card_declined (the hotel's checkout declined the card; create a new booking with a new credential), three_d_secure_failed, card_entry_failed (stopped before the pay button; nothing was charged), card_entry_unavailable (card entry is not available for this engine right now), and mandate_expired on expired (not confirmed within 30 minutes). One of sold_out, price_changed, price_changed_at_payment, engine_blocked, handoff_expired, payment_expired, payment_failed, unsupported_engine, payment_unavailable, card_declined, three_d_secure_failed, card_entry_failed, card_entry_unavailable, mandate_expired. |
failure.message | string | null | One English sentence explaining the failure. |
commission | object | null | Commission terms once the booking is confirmed; null before that. |
commission.commissionableREQUIRED | boolean | True when the hotel has an active commission contract covering today. |
commission.rate | string | null | Commission as a decimal fraction string of the booking total, for example "0.10" for 10%; null when not commissionable or the contract has no rate. |
commission.partner_share | string | null | Your share of the commission as a decimal fraction string, for example "0.50"; null when not commissionable. |
timeline | TimelineEntry[] | Every status the booking has been in, oldest first, starting with queued (requires_credential for card_entry). |
timeline[].atREQUIRED | string (date-time) | When the booking entered state, RFC 3339 UTC. |
timeline[].stateREQUIRED | string | The status the booking moved to. One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
billing | null | Always null: bookings are free. |
version | integer | null | card_entry only: goes up by one on every change; apply a booking.updated event only when its data.version is higher than the last one you saw. |
mandate | object | null | card_entry only: what the guest approved. |
mandate.accepted_totalREQUIRED | string | The total the guest accepted, in currency. |
mandate.currencyREQUIRED | string | ISO 4217 currency. |
mandate.max_totalREQUIRED | string | The most the hotel's checkout may show before the card is typed; equals accepted_total. |
mandate.consent_atREQUIRED | string (date-time) | When the guest approved, as you sent it. |
mandate.expires_atREQUIRED | string (date-time) | The mandate's deadline: confirm before it, 30 minutes after create. |
payment_method | object | null | card_entry only: the card's brand, last four and expiry. |
payment_method.typeREQUIRED | string | Always card. Always card. |
payment_method.credential_id | string | null | The cred_ id; null until bound. |
payment_method.brand | string | null | Card brand, for example visa. |
payment_method.last4 | string | null | Last four digits. |
payment_method.exp_month | integer | null | Expiry month. |
payment_method.exp_year | integer | null | Expiry year. |
payment_method.credential_status | string | null | The credential's status; see PaymentCredential.status. One of active, bound, consumed, deleted. |
next_action | object | null | card_entry only: set exactly when status is requires_action. |
next_action.typeREQUIRED | string | three_d_secure_app: tell the guest to approve the payment in their banking app; call nothing. three_d_secure_otp: the bank's challenge asks for a code the guest received; the challenge is watched until expires_at (a relay endpoint is not available yet). One of three_d_secure_app, three_d_secure_otp. |
next_action.expires_at | string (date-time) | null | The bank's deadline, RFC 3339 UTC. |
next_action.cancelable | boolean | Always false: the card was already submitted. Default false. |
charges | object | null | card_entry only: the total the hotel's checkout showed. |
charges.amount | string | null | The engine's total, a decimal string. |
charges.currency | string | null | ISO 4217 currency of amount. |
charges.mismatch | boolean | null | True when the engine reported a charge above mandate.max_total after submit; ops is alerted. |
submitted_at | string (date-time) | null | card_entry only: when the hotel's pay button was pressed. Once set, the booking is never resubmitted and cannot be canceled. |
expires_at | string (date-time) | null | card_entry only: in requires_credential, the deadline to confirm; null otherwise. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Validation errors carry details.fields[]. |
| 401 | unauthorized | No key, or the key is unknown or revoked. |
| 403 | forbidden | Missing scope, or details.reason tier_required: this needs the Build plan or higher; on Free, details.free_trial says what a test key may try. |
| 404 | not_found | The hotel, offer, booking, job or webhook doesn't exist for this key. |
| 409 | conflict | Details.reason booking_not_confirmable, mandate_expired, credential_expired, credential_consumed, credential_deleted or credential_booking_mismatch. |
| 429 | rate_limited | Over the team's per-minute limit (wait Retry-After seconds), or over its daily allowance of different hotels (details.reason: "daily_hotel_cap"; Retry-After runs to 00:00 UTC). |
| 503 | unavailable | We're temporarily unable to serve the call. Retry with backoff. |
Register a payment credential
/v2/payment_credentialsAnswers 403 not_yet_available for a live key until card entry is enabled for the account (test keys run it in the sandbox). Turns a Basis Theory card token you created with VistaLink's public key into a one-booking cred_ credential for payment.mode card_entry. The card number never reaches VistaLink: we read the token masked and keep only brand, last four and expiry. A credential lasts 30 minutes (or less, with the token), pays for one booking, and its vault token is deleted once that booking is submitted or ends. Needs the booking scope and the Build plan or higher; Idempotency-Key is optional.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Any unique string. Same key and same body returns the original response; same key and a different body is a 409. |
Request body
| Field | Type | Description |
|---|---|---|
bt_token_idREQUIRED | string | The id of a Basis Theory card token you created with VistaLink's public key (type card, expires_at at most 60 minutes ahead, a fresh token per booking). The card number never reaches VistaLink. Test keys accept only tok_test_confirmed, tok_test_requires_action, tok_test_card_declined, tok_test_unknown and tok_test_price_changed. |
Example
curl -X POST 'https://api.vistalink.com/v2/payment_credentials' \
-H "Authorization: Bearer $VISTALINK_API_KEY" \
-H 'Idempotency-Key: 4f1c2b8e-booking-ada-rossi' \
-H "Content-Type: application/json" \
-d '{
"bt_token_id": "2b8f4c1e-6d3a-4e7b-9c0f-5a1d8e2b7c64"
}'vistalink credentials create \
--idempotency-key 4f1c2b8e-booking-ada-rossi \
--bt-token-id 2b8f4c1e-6d3a-4e7b-9c0f-5a1d8e2b7c64const res = await fetch("https://api.vistalink.com/v2/payment_credentials", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VISTALINK_API_KEY}`,
"Idempotency-Key": "4f1c2b8e-booking-ada-rossi",
"Content-Type": "application/json",
},
body: JSON.stringify({
"bt_token_id": "2b8f4c1e-6d3a-4e7b-9c0f-5a1d8e2b7c64"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import os
import requests
resp = requests.post(
"https://api.vistalink.com/v2/payment_credentials",
headers={"Authorization": f"Bearer {os.environ['VISTALINK_API_KEY']}", "Idempotency-Key": "4f1c2b8e-booking-ada-rossi"},
json={
"bt_token_id": "2b8f4c1e-6d3a-4e7b-9c0f-5a1d8e2b7c64",
},
)
resp.raise_for_status()
data = resp.json(){
"brand": "visa",
"created_at": "2026-10-07T09:29:00Z",
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
"exp_month": 12,
"exp_year": 2028,
"expires_at": "2026-10-07T09:59:00Z",
"last4": "4242",
"request_id": "req_8f2c1a9b3d4e5f60",
"status": "active"
}Response 201
Successful Response
| Field | Type | Description |
|---|---|---|
request_idREQUIRED | string | Opaque id of this request, also sent as the X-Request-Id header; quote it when contacting support. |
billing | Billing | null | What a billed call cost. Present on every billed response; billing is null on free ones. |
credential_idREQUIRED | string | Credential id, cred_ plus 24 letters and digits. |
statusREQUIRED | string | active (unused), bound (attached to booking_id), consumed (handed to the hotel's checkout) or deleted (the vault token was deleted). One of active, bound, consumed, deleted. |
booking_id | string | null | The booking it is bound to; null until then. |
brand | string | null | Card brand, for example visa; null when unknown. |
last4 | string | null | Last four digits of the card. |
exp_month | integer | null | Card expiry month, 1 to 12. |
exp_year | integer | null | Card expiry year, four digits. |
expires_atREQUIRED | string (date-time) | When the credential stops being usable: 30 minutes after creation, or the token's own expiry if sooner. |
created_atREQUIRED | string (date-time) | When the credential was created, RFC 3339 UTC. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Validation errors carry details.fields[]. |
| 401 | unauthorized | No key, or the key is unknown or revoked. |
| 403 | forbidden | Missing scope, or details.reason tier_required: this needs the Build plan or higher; on Free, details.free_trial says what a test key may try. |
| 409 | conflict | Details.reason credential_reused. |
| 429 | rate_limited | Over the team's per-minute limit (wait Retry-After seconds), or over its daily allowance of different hotels (details.reason: "daily_hotel_cap"; Retry-After runs to 00:00 UTC). |
| 503 | unavailable | We're temporarily unable to serve the call. Retry with backoff. |
Get a booking
/v2/bookings/{booking_id}Synchronous and free; needs the booking scope. Returns the booking's current status, payment, confirmation and timeline.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
booking_idREQUIRED | path | string | The booking_id returned by POST /v2/bookings. |
Example
curl 'https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3' \
-H "Authorization: Bearer $VISTALINK_API_KEY"vistalink bookings get bk_P2w9Xc4Rt1Lm8Qz3const res = await fetch("https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.VISTALINK_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import os
import requests
resp = requests.get(
"https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3",
headers={"Authorization": f"Bearer {os.environ['VISTALINK_API_KEY']}"},
)
resp.raise_for_status()
data = resp.json(){
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"handoff": {
"expires_at": "2026-10-07T10:00:00Z",
"url": "https://bookings.vistalink.com/s/Hn4q8Zr2Wc7Lp1Xt"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_user_action",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
}
]
}{
"booking_id": "bk_A7m3Rq8Zt5Hn2Wd6",
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment": {
"amount": "962.00",
"checkout_url": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4",
"currency": "EUR",
"expires_at": "2026-10-07T10:01:38Z",
"mode": "checkout",
"payee": "property",
"status": "pending"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_payment",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:38Z",
"state": "requires_payment"
}
]
}{
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:36:12Z",
"code": "RX48213",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
},
{
"at": "2026-10-07T09:36:12Z",
"state": "confirmed"
}
]
}{
"booking_id": "bk_C4r9Dn2Ty7Ek5Pw1",
"charges": {
"amount": "962.00",
"currency": "EUR",
"mismatch": false
},
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:31:20Z",
"code": "RX48219",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"mandate": {
"accepted_total": "962.00",
"consent_at": "2026-10-07T09:29:12Z",
"currency": "EUR",
"expires_at": "2026-10-07T09:59:30Z",
"max_total": "962.00"
},
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment_method": {
"brand": "visa",
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
"credential_status": "deleted",
"exp_month": 12,
"exp_year": 2028,
"last4": "4242",
"type": "card"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:05Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"submitted_at": "2026-10-07T09:31:02Z",
"timeline": [
{
"at": "2026-10-07T09:29:30Z",
"state": "requires_credential"
},
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:01Z",
"state": "processing"
},
{
"at": "2026-10-07T09:31:02Z",
"state": "submitted"
},
{
"at": "2026-10-07T09:31:20Z",
"state": "confirmed"
}
],
"version": 6
}Response 200
Successful Response
| Field | Type | Description |
|---|---|---|
request_id | string | null | Id of the request that returned this booking; set on create, null on get, cancel and webhook payloads. |
booking_idREQUIRED | string | Booking id, bk_ followed by 16 letters and digits. |
statusREQUIRED | string | Where the booking is: queued, processing, requires_payment (show payment.checkout_url), requires_user_action (send the guest to handoff.url), then confirmed, confirmation_pending (submitted, confirmation not yet seen), failed, expired or canceled. Only card_entry bookings also use requires_credential (waiting for confirm), submitted (the hotel's pay button was pressed), requires_action (see next_action) and unknown (submitted, outcome not yet provable: tell the guest not to book again and to check their email from the hotel). One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
hotel_idREQUIRED | string (uuid) | The hotel being booked. |
offer | Offer | null | One bookable price for one room and rate, as observed on a channel. |
revalidation | object | null | The result of re-checking the offer on the engine; null until that check has an outcome. |
revalidation.price_changedREQUIRED | boolean | True when the engine's total or currency differs from the offer by any amount, in which case the booking fails with price_changed; false otherwise, including when the room sold out. |
revalidation.total | string | null | Total the engine quoted for the same room and rate, a decimal string in currency; null when the room or rate is no longer offered. |
revalidation.currency | string | null | ISO 4217 currency of total. |
revalidation.checked_at | string (date-time) | null | When the engine was checked, RFC 3339 UTC. |
handoff | object | null | Where the guest finishes the booking in handoff and external modes; null in checkout mode and before the engine step. |
handoff.urlREQUIRED | string (uri) | In handoff mode, the hosted browser session for the guest; in external mode, the booking engine's own prefilled page. |
handoff.expires_at | string (date-time) | null | When the hosted session stops accepting the guest (20 minutes after it is issued); null in external mode. |
confirmation | object | null | The hotel's confirmation; null until status is confirmed. |
confirmation.code | string | null | The hotel's confirmation number; null when the engine confirmed without showing one. |
confirmation.evidenceREQUIRED | string | How the confirmation was established; engine_confirmation_signal (the engine's own confirmation page or code) is the only value produced today. One of engine_confirmation_signal, email, manual. |
confirmation.at | string (date-time) | null | When the booking was confirmed, RFC 3339 UTC. |
payment | BookingPayment | null | The guest's payment. Null for external mode, and for checkout until the link is issued. |
failure | object | null | Why the booking failed or expired; null otherwise. |
failure.reasonREQUIRED | string | Stable failure code: sold_out, price_changed (revalidation, or with card_entry the hotel's checkout total was above the accepted total; nothing was typed), price_changed_at_payment (the engine charged a different total after checkout), engine_blocked, handoff_expired (the guest left the session), payment_expired, payment_failed, unsupported_engine (the engine or offer cannot be booked in this mode), payment_unavailable (hosted checkout is not available; use handoff). card_entry only: card_declined (the hotel's checkout declined the card; create a new booking with a new credential), three_d_secure_failed, card_entry_failed (stopped before the pay button; nothing was charged), card_entry_unavailable (card entry is not available for this engine right now), and mandate_expired on expired (not confirmed within 30 minutes). One of sold_out, price_changed, price_changed_at_payment, engine_blocked, handoff_expired, payment_expired, payment_failed, unsupported_engine, payment_unavailable, card_declined, three_d_secure_failed, card_entry_failed, card_entry_unavailable, mandate_expired. |
failure.message | string | null | One English sentence explaining the failure. |
commission | object | null | Commission terms once the booking is confirmed; null before that. |
commission.commissionableREQUIRED | boolean | True when the hotel has an active commission contract covering today. |
commission.rate | string | null | Commission as a decimal fraction string of the booking total, for example "0.10" for 10%; null when not commissionable or the contract has no rate. |
commission.partner_share | string | null | Your share of the commission as a decimal fraction string, for example "0.50"; null when not commissionable. |
timeline | TimelineEntry[] | Every status the booking has been in, oldest first, starting with queued (requires_credential for card_entry). |
timeline[].atREQUIRED | string (date-time) | When the booking entered state, RFC 3339 UTC. |
timeline[].stateREQUIRED | string | The status the booking moved to. One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
billing | null | Always null: bookings are free. |
version | integer | null | card_entry only: goes up by one on every change; apply a booking.updated event only when its data.version is higher than the last one you saw. |
mandate | object | null | card_entry only: what the guest approved. |
mandate.accepted_totalREQUIRED | string | The total the guest accepted, in currency. |
mandate.currencyREQUIRED | string | ISO 4217 currency. |
mandate.max_totalREQUIRED | string | The most the hotel's checkout may show before the card is typed; equals accepted_total. |
mandate.consent_atREQUIRED | string (date-time) | When the guest approved, as you sent it. |
mandate.expires_atREQUIRED | string (date-time) | The mandate's deadline: confirm before it, 30 minutes after create. |
payment_method | object | null | card_entry only: the card's brand, last four and expiry. |
payment_method.typeREQUIRED | string | Always card. Always card. |
payment_method.credential_id | string | null | The cred_ id; null until bound. |
payment_method.brand | string | null | Card brand, for example visa. |
payment_method.last4 | string | null | Last four digits. |
payment_method.exp_month | integer | null | Expiry month. |
payment_method.exp_year | integer | null | Expiry year. |
payment_method.credential_status | string | null | The credential's status; see PaymentCredential.status. One of active, bound, consumed, deleted. |
next_action | object | null | card_entry only: set exactly when status is requires_action. |
next_action.typeREQUIRED | string | three_d_secure_app: tell the guest to approve the payment in their banking app; call nothing. three_d_secure_otp: the bank's challenge asks for a code the guest received; the challenge is watched until expires_at (a relay endpoint is not available yet). One of three_d_secure_app, three_d_secure_otp. |
next_action.expires_at | string (date-time) | null | The bank's deadline, RFC 3339 UTC. |
next_action.cancelable | boolean | Always false: the card was already submitted. Default false. |
charges | object | null | card_entry only: the total the hotel's checkout showed. |
charges.amount | string | null | The engine's total, a decimal string. |
charges.currency | string | null | ISO 4217 currency of amount. |
charges.mismatch | boolean | null | True when the engine reported a charge above mandate.max_total after submit; ops is alerted. |
submitted_at | string (date-time) | null | card_entry only: when the hotel's pay button was pressed. Once set, the booking is never resubmitted and cannot be canceled. |
expires_at | string (date-time) | null | card_entry only: in requires_credential, the deadline to confirm; null otherwise. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Validation errors carry details.fields[]. |
| 401 | unauthorized | No key, or the key is unknown or revoked. |
| 403 | forbidden | Missing scope. |
| 404 | not_found | The hotel, offer, booking, job or webhook doesn't exist for this key. |
| 429 | rate_limited | Over the team's per-minute limit (wait Retry-After seconds), or over its daily allowance of different hotels (details.reason: "daily_hotel_cap"; Retry-After runs to 00:00 UTC). |
| 503 | unavailable | We're temporarily unable to serve the call. Retry with backoff. |
Cancel a booking
/v2/bookings/{booking_id}/cancelSynchronous and free; needs the booking scope. Allowed while the booking is queued, requires_payment, requires_user_action or requires_credential, and while processing only before the engine submit step; after that the cancel is refused with 409 conflict. Canceling after a completed checkout payment sets payment.refund_required: true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
booking_idREQUIRED | path | string | The booking_id returned by POST /v2/bookings. |
Example
curl -X POST 'https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/cancel' \
-H "Authorization: Bearer $VISTALINK_API_KEY"vistalink bookings cancel bk_P2w9Xc4Rt1Lm8Qz3const res = await fetch("https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VISTALINK_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import os
import requests
resp = requests.post(
"https://api.vistalink.com/v2/bookings/bk_P2w9Xc4Rt1Lm8Qz3/cancel",
headers={"Authorization": f"Bearer {os.environ['VISTALINK_API_KEY']}"},
)
resp.raise_for_status()
data = resp.json(){
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"handoff": {
"expires_at": "2026-10-07T10:00:00Z",
"url": "https://bookings.vistalink.com/s/Hn4q8Zr2Wc7Lp1Xt"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_user_action",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
}
]
}{
"booking_id": "bk_A7m3Rq8Zt5Hn2Wd6",
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment": {
"amount": "962.00",
"checkout_url": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4",
"currency": "EUR",
"expires_at": "2026-10-07T10:01:38Z",
"mode": "checkout",
"payee": "property",
"status": "pending"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "requires_payment",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:38Z",
"state": "requires_payment"
}
]
}{
"booking_id": "bk_P2w9Xc4Rt1Lm8Qz3",
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:36:12Z",
"code": "RX48213",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:00Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"timeline": [
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:02Z",
"state": "processing"
},
{
"at": "2026-10-07T09:30:41Z",
"state": "requires_user_action"
},
{
"at": "2026-10-07T09:36:12Z",
"state": "confirmed"
}
]
}{
"booking_id": "bk_C4r9Dn2Ty7Ek5Pw1",
"charges": {
"amount": "962.00",
"currency": "EUR",
"mismatch": false
},
"commission": {
"commissionable": true,
"partner_share": "0.50",
"rate": "0.10"
},
"confirmation": {
"at": "2026-10-07T09:31:20Z",
"code": "RX48219",
"evidence": "engine_confirmation_signal"
},
"hotel_id": "43d0be71-5f3c-4c8e-9a52-1d7e2b6f0a19",
"mandate": {
"accepted_total": "962.00",
"consent_at": "2026-10-07T09:29:12Z",
"currency": "EUR",
"expires_at": "2026-10-07T09:59:30Z",
"max_total": "962.00"
},
"offer": {
"availability": "available",
"board": "breakfast",
"channel": "direct",
"currency": "EUR",
"engine": "SYNXIS",
"excluded_charges": [],
"free_cancellation": false,
"includes_taxes": true,
"listing_key": "engine_room:1234567",
"member_rate": false,
"nightly_avg": "481.00",
"observed_at": "2026-10-07T09:30:00Z",
"occupancy": {
"adults": 2,
"children_ages": []
},
"offer_id": "off_t3c8e1a9b4f2d7e6a5c0b",
"rate_name": "Non-refundable, breakfast included",
"room_id": "5b1e2f3a-0c4d-4e5f-8a9b-1c2d3e4f5a6b",
"room_name": "Superior Room",
"total": "962.00",
"url": "https://umilta36.com/book?checkin=2026-11-14&checkout=2026-11-16"
},
"payment_method": {
"brand": "visa",
"credential_id": "cred_Hk2v9Qx0aL7mN3pZr5Tb8Wd1",
"credential_status": "deleted",
"exp_month": 12,
"exp_year": 2028,
"last4": "4242",
"type": "card"
},
"revalidation": {
"checked_at": "2026-10-07T09:30:05Z",
"currency": "EUR",
"price_changed": false,
"total": "962.00"
},
"status": "confirmed",
"submitted_at": "2026-10-07T09:31:02Z",
"timeline": [
{
"at": "2026-10-07T09:29:30Z",
"state": "requires_credential"
},
{
"at": "2026-10-07T09:30:00Z",
"state": "queued"
},
{
"at": "2026-10-07T09:30:01Z",
"state": "processing"
},
{
"at": "2026-10-07T09:31:02Z",
"state": "submitted"
},
{
"at": "2026-10-07T09:31:20Z",
"state": "confirmed"
}
],
"version": 6
}Response 200
Successful Response
| Field | Type | Description |
|---|---|---|
request_id | string | null | Id of the request that returned this booking; set on create, null on get, cancel and webhook payloads. |
booking_idREQUIRED | string | Booking id, bk_ followed by 16 letters and digits. |
statusREQUIRED | string | Where the booking is: queued, processing, requires_payment (show payment.checkout_url), requires_user_action (send the guest to handoff.url), then confirmed, confirmation_pending (submitted, confirmation not yet seen), failed, expired or canceled. Only card_entry bookings also use requires_credential (waiting for confirm), submitted (the hotel's pay button was pressed), requires_action (see next_action) and unknown (submitted, outcome not yet provable: tell the guest not to book again and to check their email from the hotel). One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
hotel_idREQUIRED | string (uuid) | The hotel being booked. |
offer | Offer | null | One bookable price for one room and rate, as observed on a channel. |
revalidation | object | null | The result of re-checking the offer on the engine; null until that check has an outcome. |
revalidation.price_changedREQUIRED | boolean | True when the engine's total or currency differs from the offer by any amount, in which case the booking fails with price_changed; false otherwise, including when the room sold out. |
revalidation.total | string | null | Total the engine quoted for the same room and rate, a decimal string in currency; null when the room or rate is no longer offered. |
revalidation.currency | string | null | ISO 4217 currency of total. |
revalidation.checked_at | string (date-time) | null | When the engine was checked, RFC 3339 UTC. |
handoff | object | null | Where the guest finishes the booking in handoff and external modes; null in checkout mode and before the engine step. |
handoff.urlREQUIRED | string (uri) | In handoff mode, the hosted browser session for the guest; in external mode, the booking engine's own prefilled page. |
handoff.expires_at | string (date-time) | null | When the hosted session stops accepting the guest (20 minutes after it is issued); null in external mode. |
confirmation | object | null | The hotel's confirmation; null until status is confirmed. |
confirmation.code | string | null | The hotel's confirmation number; null when the engine confirmed without showing one. |
confirmation.evidenceREQUIRED | string | How the confirmation was established; engine_confirmation_signal (the engine's own confirmation page or code) is the only value produced today. One of engine_confirmation_signal, email, manual. |
confirmation.at | string (date-time) | null | When the booking was confirmed, RFC 3339 UTC. |
payment | BookingPayment | null | The guest's payment. Null for external mode, and for checkout until the link is issued. |
failure | object | null | Why the booking failed or expired; null otherwise. |
failure.reasonREQUIRED | string | Stable failure code: sold_out, price_changed (revalidation, or with card_entry the hotel's checkout total was above the accepted total; nothing was typed), price_changed_at_payment (the engine charged a different total after checkout), engine_blocked, handoff_expired (the guest left the session), payment_expired, payment_failed, unsupported_engine (the engine or offer cannot be booked in this mode), payment_unavailable (hosted checkout is not available; use handoff). card_entry only: card_declined (the hotel's checkout declined the card; create a new booking with a new credential), three_d_secure_failed, card_entry_failed (stopped before the pay button; nothing was charged), card_entry_unavailable (card entry is not available for this engine right now), and mandate_expired on expired (not confirmed within 30 minutes). One of sold_out, price_changed, price_changed_at_payment, engine_blocked, handoff_expired, payment_expired, payment_failed, unsupported_engine, payment_unavailable, card_declined, three_d_secure_failed, card_entry_failed, card_entry_unavailable, mandate_expired. |
failure.message | string | null | One English sentence explaining the failure. |
commission | object | null | Commission terms once the booking is confirmed; null before that. |
commission.commissionableREQUIRED | boolean | True when the hotel has an active commission contract covering today. |
commission.rate | string | null | Commission as a decimal fraction string of the booking total, for example "0.10" for 10%; null when not commissionable or the contract has no rate. |
commission.partner_share | string | null | Your share of the commission as a decimal fraction string, for example "0.50"; null when not commissionable. |
timeline | TimelineEntry[] | Every status the booking has been in, oldest first, starting with queued (requires_credential for card_entry). |
timeline[].atREQUIRED | string (date-time) | When the booking entered state, RFC 3339 UTC. |
timeline[].stateREQUIRED | string | The status the booking moved to. One of queued, processing, requires_payment, requires_user_action, confirmed, confirmation_pending, failed, expired, canceled, requires_credential, submitted, requires_action, unknown. |
billing | null | Always null: bookings are free. |
version | integer | null | card_entry only: goes up by one on every change; apply a booking.updated event only when its data.version is higher than the last one you saw. |
mandate | object | null | card_entry only: what the guest approved. |
mandate.accepted_totalREQUIRED | string | The total the guest accepted, in currency. |
mandate.currencyREQUIRED | string | ISO 4217 currency. |
mandate.max_totalREQUIRED | string | The most the hotel's checkout may show before the card is typed; equals accepted_total. |
mandate.consent_atREQUIRED | string (date-time) | When the guest approved, as you sent it. |
mandate.expires_atREQUIRED | string (date-time) | The mandate's deadline: confirm before it, 30 minutes after create. |
payment_method | object | null | card_entry only: the card's brand, last four and expiry. |
payment_method.typeREQUIRED | string | Always card. Always card. |
payment_method.credential_id | string | null | The cred_ id; null until bound. |
payment_method.brand | string | null | Card brand, for example visa. |
payment_method.last4 | string | null | Last four digits. |
payment_method.exp_month | integer | null | Expiry month. |
payment_method.exp_year | integer | null | Expiry year. |
payment_method.credential_status | string | null | The credential's status; see PaymentCredential.status. One of active, bound, consumed, deleted. |
next_action | object | null | card_entry only: set exactly when status is requires_action. |
next_action.typeREQUIRED | string | three_d_secure_app: tell the guest to approve the payment in their banking app; call nothing. three_d_secure_otp: the bank's challenge asks for a code the guest received; the challenge is watched until expires_at (a relay endpoint is not available yet). One of three_d_secure_app, three_d_secure_otp. |
next_action.expires_at | string (date-time) | null | The bank's deadline, RFC 3339 UTC. |
next_action.cancelable | boolean | Always false: the card was already submitted. Default false. |
charges | object | null | card_entry only: the total the hotel's checkout showed. |
charges.amount | string | null | The engine's total, a decimal string. |
charges.currency | string | null | ISO 4217 currency of amount. |
charges.mismatch | boolean | null | True when the engine reported a charge above mandate.max_total after submit; ops is alerted. |
submitted_at | string (date-time) | null | card_entry only: when the hotel's pay button was pressed. Once set, the booking is never resubmitted and cannot be canceled. |
expires_at | string (date-time) | null | card_entry only: in requires_credential, the deadline to confirm; null otherwise. |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | Validation errors carry details.fields[]. |
| 401 | unauthorized | No key, or the key is unknown or revoked. |
| 403 | forbidden | Missing scope. |
| 404 | not_found | The hotel, offer, booking, job or webhook doesn't exist for this key. |
| 409 | conflict | Too late to cancel. |
| 429 | rate_limited | Over the team's per-minute limit (wait Retry-After seconds), or over its daily allowance of different hotels (details.reason: "daily_hotel_cap"; Retry-After runs to 00:00 UTC). |
| 503 | unavailable | We're temporarily unable to serve the call. Retry with backoff. |
How checkout payment works (preview)
- 01Create the booking with
payment.mode: "checkout"and areturn_url. It answers202with the bookingqueued. - 02We re-check the price to the cent. The booking moves to
requires_paymentwithpayment.checkout_url, a Stripe Checkout link that expires after 30 minutes. - 03The guest pays the property. Show them the link; the money goes to the hotel, and
payment.payeeis alwaysproperty. When it completes,payment.statusiscompletedand the booking isprocessing. - 04We finish the reservation on the hotel's own booking engine. If the engine total no longer matches the quote, the booking fails with
price_changed_at_paymentand the guest's payment is reversed. - 05The hotel confirms and the booking is
confirmed, with the hotel's code inconfirmation. Every step firesbooking.updated.
VistaLink never holds the guest's money at any step: Checkout collects it for the property.
Eligibility: pay-now offers on engines where we can reach the hotel's payment form. Anything else fails straight away with unsupported_engine; use handoff for those. While checkout is in preview it may be switched off for your account; then a checkout booking fails at once with payment_unavailable, and handoff still works.
Shared objects.
Objects that appear in more than one place. Billing is on the Billing page and ErrorBody under Errors & limits.
Stay
Dates and rooms of a stay, up to 30 nights and 9 rooms.
| Field | Type | Description |
|---|---|---|
check_inREQUIRED | string (date) | Arrival date, YYYY-MM-DD. |
check_outREQUIRED | string (date) | Departure date, YYYY-MM-DD, after check_in and at most 30 nights later. |
rooms | RoomOccupancy[] | One entry per room, 1 to 9; defaults to one room for two adults. At most 9. |
rooms[].adults | integer | Adults in this room, 1 to 16. Default 2. |
rooms[].children_ages | integer[] | Age of each child in this room, 0 to 17, one entry per child; empty for adults only. At most 8. |
Offer
One bookable price for one room and rate, as observed on a channel.
| Field | Type | Description |
|---|---|---|
offer_idREQUIRED | string | Offer id, off_t plus 20 hex characters, specific to your account; book it with POST /v2/bookings within 30 minutes of receiving it. |
channelREQUIRED | string | Where the price was observed: direct for the hotel's own booking engine, third_party for the Enterprise third-party channel. One of direct, third_party, expedia. |
engine | string | null | Code of the hotel's booking engine for direct offers, for example SYNXIS; null on the third-party channel. |
room_id | string (uuid) | null | Catalogue room this offer is for, matching rooms[].room_id on hotel detail; null when the source names the room only by its own code or name. |
room_name | string | null | Room name as the source shows it; null when the source does not name the room. |
listing_key | string | null | The source's own key for the room, such as engine_room:SUP or room_type:1234567; null when the source has none. |
rate_name | string | null | Rate plan name as the source shows it, or one built from the cancellation terms and board, such as Free cancellation, breakfast included. |
totalREQUIRED | string | Price for the whole stay and the whole party, a decimal string in currency; taxes the source quoted separately are added in when their amount is known. "0" when sold out. |
currencyREQUIRED | string | ISO 4217 currency the price was observed in; never converted. |
nightly_avg | string | null | total divided by the number of nights, for the whole party rather than per room; null when sold out. |
includes_taxes | boolean | null | True when total includes taxes and fees, false when some are listed in excluded_charges, null when the source does not say. |
excluded_charges | ExcludedCharge[] | Charges payable on top of total; usually empty. |
excluded_charges[].kindREQUIRED | string | What the charge is; taxes_and_fees (taxes and fees the source quoted separately) is the only kind produced today. |
excluded_charges[].amountREQUIRED | string | Amount of the charge, a decimal string in currency. |
excluded_charges[].currencyREQUIRED | string | ISO 4217 currency of amount. |
excluded_charges[].per | string | null | What amount is charged per: stay (once for the whole stay, the only basis produced today), night, person or person_night. One of night, stay, person, person_night. |
excluded_charges[].note | string | null | Short note on how the charge is applied, for example quoted on top of the total. |
board | string | null | Meals included: none, breakfast, half (breakfast and dinner), full (all meals) or all_inclusive; null when the source does not say. One of none, breakfast, half, full, all_inclusive. |
free_cancellation | boolean | null | True when the rate can be canceled free of charge, false when it is non-refundable, null when unknown. |
member_rate | boolean | null | True when the price is a member or loyalty rate that needs the guest signed in to the hotel's programme, false for a public rate, null when the source does not say. Member rates are listed so you see the hotel's full offer list; within a room they sort after public rates, and POST /v2/bookings accepts public rates only. |
cancellation_deadline | string (date-time) | null | Last moment to cancel free of charge, RFC 3339; set only on offers read live, null otherwise. |
payment | string | null | When the guest pays: prepay at booking or pay_at_hotel at the property; null when the source does not say. One of prepay, pay_at_hotel. |
occupancy | object | null | The party this price is for, totalled across all rooms. |
occupancy.adultsREQUIRED | integer | Adults in the room. |
occupancy.children_ages | integer[] | Age of each child in the room; empty for adults only. |
availability | string | available when the room can be booked at this price, sold_out when the source showed it as unavailable, unknown when it did not say. One of available, sold_out, unknown. Default unknown. |
observed_at | string (date-time) | null | When this price was observed, RFC 3339 UTC. |
url | string (uri) | null | Page on the source where this price was observed; null when the source has no linkable page. |
BookingPayment
The guest's payment. Null for external mode, and for checkout until the link is issued.
| Field | Type | Description |
|---|---|---|
modeREQUIRED | string | The payment mode the booking was created with. One of checkout, handoff, external. |
statusREQUIRED | string | pending until the guest pays, then completed, expired (link or session timed out, or the booking was canceled first) or failed; it never changes after leaving pending. One of pending, completed, expired, failed. |
checkout_url | string (uri) | null | checkout only: the hosted checkout link to show the guest; null in handoff mode. |
expires_at | string (date-time) | null | checkout only: when the checkout link stops working, about 30 minutes after it is issued; null in handoff mode. |
amount | string | null | What the guest pays, the offer's total as a decimal string in currency. |
currency | string | null | ISO 4217 currency of amount. |
payee | string | Who receives the money; always property. Always property. |
completed_at | string (date-time) | null | When the payment completed, RFC 3339 UTC; null until then. |
refund_required | boolean | null | True when the guest's checkout payment completed and the booking will not be made, so the payment must be reversed by the checkout provider: canceled before the engine step, failed with price_changed_at_payment, or the amount paid did not match the booking (payment_failed); null otherwise. |