hotel_search is already a live offer with an htl_* token you can drop straight into a trip.
The one-line version of the flow:
Prerequisites
- A Jinko account and an API key (
jnk_...). Get one. - For the SDK path: Node.js 20 or later, then
npm install @gojinko/api-client. - For the CLI path:
npm install -g @gojinko/cli && jinko auth login --key jnk_.... - For the MCP path: any MCP client connected to
https://mcp.builders.gojinko.com/mcp.
1) Search hotels
Search live inventory for the destination, dates, and occupancy. Hotel rates returned here are already priced and bookable.- SDK
- CLI
- MCP
destination field accepts five shapes (free-text query, city plus country code, lat/lng with optional radius, place ID, or a list of hotel IDs). Use whichever matches what you have.
2) Build the trip
Add the chosen rate to a trip and set travelers in one call. The hoteloffer_id (the htl_* token) goes into trip(add_item) exactly the same way a flight trip_item_token does.
- SDK
- CLI
- MCP
3) Checkout
Create the Stripe checkout session:- SDK
- CLI
- MCP
checkout_url points at app.gojinko.com/checkout, a Stripe-hosted page Jinko owns.
4) User pays
Send the user tocheckout_url. They:
- Confirm the hotel, dates, and room.
- Enter payment.
- Stripe holds the authorization.
5) Fulfillment is automatic
Once the user pays, Stripe webhooks trigger fulfillment on the API. No client-side confirm step is needed. Fulfillment states (get_trip → fulfillment.status):
| State | Meaning |
|---|---|
pending | Payment cleared, booking not yet attempted |
fulfilling | Calling the hotel provider (typically seconds) |
completed | Reservation confirmed, booking_ref populated |
failed | Provider rejected (rare). Refund is issued automatically. |
6) Watch the booking land
Pollget_trip until fulfillment.status is terminal:
- SDK
- CLI
- MCP
What’s next?
- Add a flight to the trip: see the Flight + Hotel guide for one trip with two items and one Stripe checkout.
- Flight-only booking: see the Flight booking guide.
- Search by location, chain, or amenities: the hotel_search tool reference covers every filter (star rating, hotel type, chain, facilities, geo radius).
- Lookup a booking after the fact: get_booking finds a booking by reference and last name without needing a login.
- Troubleshooting: Errors has the full status-code reference.
