> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/modules/stays/hotelston.md).

# Hotelston

Hotelston hotel API for PHPTRAVELS: what you need from Hotelston, where to add your credentials in the admin, how to test bookings and fix common errors.

### What Hotelston is

Hotelston is a B2B hotel supplier that gives travel companies hotel rates and availability through an API. In PHPTRAVELS it is one supplier inside the **Stays** module, so Hotelston rooms appear in the same hotel search as your own contracted hotels and other bedbanks such as Hotelbeds or RateHawk, each with its own markup.

### What you need before you start

* A signed partner agreement with Hotelston and API access for your company. PHPTRAVELS connects to your account; it does not supply Hotelston inventory or credentials.
* The API credentials Hotelston issues to you, first for the test environment and later for production. Ask your Hotelston account manager which values apply to your account.
* An installed and licensed PHPTRAVELS website with admin access.

### Add the credentials in PHPTRAVELS

1. Log in to your admin panel at `yourdomain.com/admin`.
2. Go to **Settings > Modules** and open **Hotelston** from the list.
3. On the **General** tab, enable the module and keep **Dev mode** on development while you test.
4. On the **Credentials** tab, paste the values from Hotelston into the labelled fields, click **Test** if the button is shown, then save.
5. On the **Markup** tab, set your B2C and B2B markup.

### Test before going live

* Search a city where Hotelston has inventory, for dates a few weeks ahead.
* Open a room, check the price and cancellation policy, and complete a test booking.
* Confirm the booking shows the Hotelston reference in the admin and the voucher reaches your inbox.
* Cancel the test booking and check that the status updates.

Switch **Dev mode** to production and replace the test credentials only after these checks pass.

### Common errors

* **No Hotelston results** -- the module is disabled, the credentials belong to the other environment, or the destination has no Hotelston hotels.
* **Authentication failed** -- copy the credentials again without spaces and confirm with Hotelston that the account is active.
* **Price changed at checkout** -- the supplier re-priced the room; search again and rebook.

Need help? [Submit a ticket](https://docs.phptravels.com/support/submit-ticket) with your Order ID and the exact error message.
