Fortrip
HTTP APIReference

Create order

Creates an unpaid order from one offer, with the guests and a contact. Nothing is charged: the order waits for the user to pay it, on the page its payment link opens.

What the model reads (tool description)

Create an unpaid order for one offer from get_hotel_offers. It takes items, one item with the offer's offerId inside it (nowhere else in the arguments) and hotel.rooms, and contact. The answer is the order, awaiting payment: its reference, the total, the stay and its terms, and a payment link, a Fortrip page to pay on. Nothing is charged until the order is paid, on that page or with pay_order; anyone holding the link can pay. Send the contact and, for each room of the offer, at least one guest. If the price or terms changed since the offer, the answer is offer_changed with every change and a new offer: show the changes and ask the user again before ordering it. Sending the same details again returns the same order. An offer is ordered once: another order of the stay (another party, or a corrected guest name or contact) takes a new offer. cancel_order cancels or closes an order; for changes, or a cancellation it can't make, the user emails info@fortrip.ai with the order's reference.

POST
/v1/orders

Authorization

bearerAuth
headerAuthorizationBearer <token>

A Fortrip OAuth access token of the signed-in user. How to get one: Authentication.

Request Body

application/json
  1. body
items*array<>

What to order: exactly one item, which holds the offer's offerId and what its hotel needs to know. The offerId goes inside the item, not beside items.

Items1 <= items <= 1
contact*

Who the hotel and the confirmation reach.

Response Body

Create order

application/json
  1. response
orderId*string
Match^ord_[0-9A-Za-z]{20}$
reference*string
Match^FT-[2-9A-HJ-NP-Z]{6}$
status*|

awaiting_payment: not paid yet (a payment just made may still be settling); payable until payment.expiresAt. expired: not paid, and nothing charged; the time to pay ran out. closed: not paid, and nothing charged; closed at the caller's request. confirming: paid or held, the booking is with the hotel. confirmed: the hotel confirmed and the payment is charged. failed: no stay was booked; failure says why and payment.status what became of the money. cancelling, then cancelled: a cancellation under the terms; cancelled says what it kept and returned. needs_attention: a person at Fortrip has to resolve it.

createdAt*string
Match^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?Z$
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?Z$
contact*|

Who the hotel and the confirmation reach, as given when ordering. null when none is on record yet: an order started on the Fortrip website gives it at checkout.

items*array<|>
Items1 <= items
total*

The whole stay for all rooms: what paying charges, or once paid what was charged. In USD or CNY, the currency of the offer the order was made from; an order made on the Fortrip website may be in another currency. Fees payable at the property are not in it.

payment*
cancel*

What cancel_order can do to the order now: cancel it for a penalty and a refund, close it, or neither.

cancelled*|

What a cancellation kept and returned. null unless status is cancelled, and on a cancelled order whose figures are not on record.

failure*|

Why no stay was booked: always set on a failed order, its reason unknown when not on record. null unless status is failed.

manageUrl*string
Example Request
cURL
curl -X POST "https://api.fortrip.ai/v1/orders" \  -H "Authorization: Bearer $FORTRIP_TOKEN" \  -H "Content-Type: application/json" \  -d '{  "contact": {    "name": "Ada Lovelace",    "email": "ada@example.com",    "phone": "+14155550132"  },  "items": [    {      "offerId": "off_Bz6yN1cD5fGh8JkM2pQs",      "hotel": {        "rooms": [          {            "guests": [              {                "firstName": "Ada",                "lastName": "Lovelace"              },              {                "firstName": "Charles",                "lastName": "Babbage"              }            ]          }        ]      }    }  ]}'
Example Response
{  "orderId": "ord_Wr4tY7uI0oPa3SdF6gHj",  "reference": "FT-8KQ2MX",  "status": "awaiting_payment",  "createdAt": "2027-02-20T08:04:12Z",  "updatedAt": "2027-02-20T08:04:12Z",  "contact": {    "name": "Wei Wang",    "email": "wei.wang@example.com",    "phone": "+86 138 0013 8000"  },  "items": [    {      "type": "hotel",      "hotel": {        "hotelId": "htl_Qm3xK9vT2pLw7Hn4Rb8Z",        "name": "Kamo Lantern Hotel",        "names": {          "en": "Kamo Lantern Hotel",          "zh": "鸭川灯笼酒店"        },        "checkIn": "2027-03-10",        "checkOut": "2027-03-12",        "timeZone": "Asia/Tokyo",        "rooms": [          {            "adults": 2,            "childrenAges": [],            "guests": [              {                "firstName": "Wei",                "lastName": "Wang"              },              {                "firstName": "Jun",                "lastName": "Wang"              }            ],            "roomType": {              "name": {                "text": "Standard Double Room",                "locale": null              },              "beds": {                "text": "1 double bed",                "locale": null              },              "areaSqm": {                "min": 18,                "max": 18              },              "maxOccupancy": 2,              "window": "yes"            },            "meals": {              "known": true,              "included": [],              "unspecifiedMainMeals": 0,              "allInclusive": false,              "guestsCoveredPerRoom": null,              "label": {                "text": "Room only",                "locale": "en"              }            }          }        ],        "specialRequests": null,        "cancellation": {          "status": "free",          "readAt": "2027-02-20T08:04:12Z",          "freeCancellationEndsAt": "2027-03-08T15:00:00Z",          "penalties": [            {              "startsAt": "2027-03-08T15:00:00Z",              "amount": {                "amount": "66.20",                "currency": "USD"              }            }          ],          "timeZone": "Asia/Tokyo"        },        "confirmation": {          "mode": "instant",          "withinMinutes": null        },        "payAtProperty": {          "disclosure": "complete",          "items": [            {              "kind": "tax",              "amount": {                "amount": "200",                "currency": "JPY"              },              "mandatory": true,              "basis": "per_person_per_night"            }          ]        },        "confirmationNumber": null      }    }  ],  "total": {    "amount": "132.40",    "currency": "USD"  },  "payment": {    "status": "unpaid",    "url": "https://fortrip.ai/pay/ord_Wr4tY7uI0oPa3SdF6gHj?s=cs_live_b1Q9xT4mK7pW2rZ8vN3c",    "requiresSignIn": false,    "expiresAt": "2027-02-20T11:49:12Z",    "localCurrencyAtCheckout": true,    "localCharge": null,    "tokenRequest": {      "handler": {        "id": "stripe_payments",        "type": "com.stripe.payments",        "version": "2026-06-25",        "spec": "https://docs.stripe.com/agentic-commerce/ucp/stripe-payments-handler",        "schema": "https://ucp.stripe.com/payments/2026-06-25/schema.json",        "available_instruments": [          {            "type": "card"          },          {            "type": "link",            "config": {              "business_profile": "profile_61TqZ3vWbXk8RmNc4Hd2"            }          }        ],        "config": {          "environment": "livemode",          "business_profile": "profile_61TqZ3vWbXk8RmNc4Hd2"        }      },      "usageLimits": {        "max_amount": 13240,        "currency": "usd",        "expires_at": 1803124152      }    }  },  "cancel": {    "action": "close",    "blockedBy": null,    "penalty": null,    "refund": null  },  "cancelled": null,  "failure": null,  "manageUrl": "https://fortrip.ai/orders/ord_Wr4tY7uI0oPa3SdF6gHj"}