Selling

Sell a hotel's rooms from your own site, booking tool or chat bot. Quendoo prices them exactly as the hotel's booking engine does, holds the price, writes the booking and gives you the page where the guest pays.

Building a whole booking page? Build a booking engine walks the flow end to end, with a diagram.

GET  /properties/{id}/booking_buttons          which booking module sells
GET  /properties/{id}/booking_offers           priced offers + search_token
POST /properties/{id}/bookings/preview         the summary: lines, total, payment plan
POST /properties/{id}/bookings/from_search     the booking + payment_url

1. The booking module

Offers are sold through a booking module: it decides which rate plans, currency, extras and payment rules apply.

{ "selected_booking_button_id": null,
  "booking_buttons": [ { "id": 1546, "name": "My booking site", "is_active": true,
                         "currency_code": "EUR", "rate_plan_ids": ["4e5633fb-…"] } ] }

The hotelier can choose, in the dashboard, which module partners sell. Then selected_booking_button_id names it, it is the only one listed, and you can leave booking_button_id out of searches. With none chosen, pass booking_button_id; without it the search answers 422 errors.qc.booking_module_required.

Create a module with POST …/booking_buttons, and choose its plans with POST …/booking_buttons/{id}/rate_plans. rate_plan_ids lists the module's plans that are on your connection. The module may also sell plans you detached or never connected; those are not listed, so an empty rate_plan_ids does not mean the module sells nothing.

2. Search

GET …/booking_offers?booking_button_id=1546&checkin=2026-12-05&checkout=2026-12-07
    &rooms[0][adults]=2&rooms[1][adults]=2&rooms[1][children_ages][]=7

1 to 90 nights, 1 to 10 rooms. Optional: promo_code, currency, lng, and your visitor's guest_ip and guest_user_agent β€” some rates are sold only in some countries, some promotions only on mobile. Needs inventory.read. The search token keeps the two, so a booking made from it is priced for the same visitor β€” send them with the search, not the booking.

{ "booking_offers": [ { "room_name": "Double Room", "rate_name": "Bed & Breakfast",
      "price": 240, "currency": "EUR",
      "accommodation_name": "2 adult on regular bed …",
      "room_type_id": "0640b76f-…", "rate_plan_id": "4e5633fb-…",
      "offer_id": "5295|10479:2:",
      "payment_plan": { "currency": "EUR", "instalments": [
        { "position": 1, "amount": 240, "due_date": "2026-12-05", "auto_cancel_after": null } ] } } ],
  "search_token": "v1.H4sIAAAA…", "expires_at": "2026-10-11T00:09:00+03:00" }

3. The search token

search_token holds the prices you were shown for 30 minutes (expires_at). A booking made with it is taken at those prices. It is bound to your client and to this property, and it books once β€” search again for the next booking.

4. Preview

Before the guest gives their name, show what they will book:

POST …/bookings/preview
{ "search_token": "v1.H4sIAAAA…",
  "items": [ { "offer_id": "5295|10479:2:", "extras": [ { "service_id": 55, "qty": 1 } ] } ] }

It answers the lines, total_amount, the payment_plan of the whole booking and payment_methods β€” what the guest can pay with, as the hotel's booking engine shows them at checkout (name, type, is_online…), each with the plan it gives. Several rooms merge their plans by due date, so never add up the offers' plans yourself. Nothing is written; the token is not spent. Needs bookings.write.

5. Book

POST …/bookings/from_search
{ "search_token": "v1.H4sIAAAA…",
  "partner_reference": "DOCS-SELL-1",
  "client": { "first_name": "Ivan", "last_name": "Petrov",
              "email": "[email protected]", "phone": "+359888123456" },
  "items": [ { "offer_id": "5295|10479:2:",
               "guests": [ { "first_name": "Ivan", "last_name": "Petrov", "adult": true },
                           { "first_name": "Maria", "last_name": "Petrova", "adult": true } ] } ] }
{ "status": "ok", "message": "created",
  "data": { "id": "Z7JJ5YQW", "total_amount": 240, "currency": "EUR", "status": "CREATED",
            "reference": "QCN-DOCSPARTNER-DOCS-SELL-1", "partner_reference": "DOCS-SELL-1",
            "payment_url": "https://…/payment/?…",
            "payment_plan": [ { "position": 1, "amount": 240, "due_date": "2026-12-05",
                                "is_paid": false, "auto_cancel_after": null, "payment_url": "https://…" } ],
            "dry": false } }

6. Payment

Two ways: send the guest to the hotel's payment page, or build that page yourself. Either way the money goes to the hotel's own accounts.

The hotel's page

Send the guest to payment_url. It is the hotel's own payment page β€” its booking engine, in the guest's language β€” for the first unpaid instalment, not a form to embed. There the guest picks one of the hotel's methods (card, bank transfer, at the property…) and pays the hotel directly. After paying, the guest stays on the hotel's confirmation page; they are not sent back to your site β€” to bring them back, use pay_url and your own pages.

The guest picks the method with the booking

Show the preview's payment_methods and send the chosen one as payment_method_id with from-search. The booking is written with it β€” a method can move a due date β€” and the answer says where the guest pays:

Your own page

The same steps as the hotel's page, on your site, for a booking you made through Quendoo Connect:

GET  …/bookings/{id}/payment_options?position=1        the instalment and the hotel's methods
PUT  …/bookings/{id}/payment_plan/1/method              { "payment_method_id": 1899 }
POST …/bookings/{id}/payment_plan/1/paid                paid some other way
  1. Show the instalment β€” payment_options answers its amount and due date, whether it can be paid now (state: payable, or why not: already_paid, previous_unpaid, booking_cancelled, …) and methods: each with id, the hotel's own name, type and is_online.
  2. The guest picks one β€” PUT …/method. Then:
    • is_online: true β†’ send the guest to pay_url, the payment provider's page on the hotel's account. When they pay, the instalment is marked paid by itself. Where they land afterwards is pay_return β€” see below.
    • a transfer β†’ show bank_transfer: account, amount, due date and the payment_reference the hotel matches it by. The guest gets the same by e-mail.
    • at the property β†’ nothing to collect now.
  3. Paid some other way β€” through your own provider, at your office β€” POST …/paid marks the instalment paid as the hotel's reception does: payment_status moves on and the hotel's payment e-mails go out. Optional paid_at and payment_method_id (one of the property's methods). Earlier instalments first.

With more than one instalment, repeat for each position when it falls due.

Bringing the guest back to your site

Set your own two pages once β€” they apply to every booking your app writes:

PUT /v1/qc/payment_return
{ "success_url": "https://your.site/payment/done",
  "fail_url":    "https://your.site/payment/failed" }

After the bank, the guest is sent to one of them with the booking in the query β€” your own query and fragment are kept:

https://your.site/payment/done?booking=GD6SAQUC&position=1&status=paid&partner_reference=ORDER-55
https://your.site/payment/failed?booking=GD6SAQUC&position=1&status=failed

Which methods the guest will see. GET …/properties/{id}/payment_methods lists the hotel's methods; the page offers those with is_assigned: true that the rate's payment policy allows. In the preview each instalment's payment_method_ids names them β€” an empty list means the page will offer nothing to pay with, so tell the guest they pay as the policy says (often at arrival), or ask the hotel to switch a method on. The preview says so in notices (qc.no_payment_methods_offered, per instalment). A payment policy you create without available_pm_ids gets the methods switched on for the property at that moment (qc.payment_methods_filled in its answer); a method switched on later is not added until you update the policy.

Knowing that it was paid.

If an instalment is still unpaid after its auto_cancel_after, the booking is cancelled automatically β€” tell the guest.

On staging the payment page sits behind a team login, so the guest's step cannot be walked through there.

Several hotels, one guest

POST /bookings/batch books one guest at several hotels in one call β€” each entry is a from-search body with that hotel's own token β€” all or none. POST /bookings/batch/preview is its summary step. Each hotel takes its own payment; by_due_date in the answer shows them as one schedule.

What the booking is afterwards

It arrives on the booking feed like any other. The hotelier sees reference in the dashboard and can search by it. Refusals and their keys are in the error dictionary.