Switch to dark mode

Booking Flows

The steps for booking tickets and rail passes, from search to issued tickets, for each payment method.

Ticket booking flow

  1. Search for journeys: Use journeys to find journeys between two locations, and pick one.
  2. Get offers: Use journeyOffer to price the journey for your passengers.
  3. Create a booking: Call createBooking with one or more offer ids, and optionally passengers.
  4. Add passenger details: Call updateBooking with each passenger's details. Exactly one passenger must be the contact person, with an email address and a phone number. createBooking only takes placeholders (type, age, travel cards), so this step is always needed.
  5. Create an order: Call createOrder to pre-book the tickets. This step is the same for every payment method.
  6. Finalize the order: Call finalizeOrder to complete a purchase paid by wallet or invoice. If your customer pays, pass the order's id to createPayment instead. The order is then finalized automatically when they have paid.
  7. Get the tickets: Tickets are issued automatically, most of them within 15 minutes. Poll the order with node until they appear.

Quick Start has an example of each step.

Round trips

Both directions of a round trip are priced in one call, so that operators with return fares can quote them. Steps 1 to 3 become:

  1. Search each direction: Run two journeys searches, the second with origin and destination swapped, and pick a journey from each.
  2. Price them together: Call combinedJourneyOffer with the two journey ids.
  3. Create one booking: Call createBooking with the offer ids from both directions in one offerIds list.

The rest of the flow is the same. Make one booking, not one per direction. A return fare is a single ticket priced across both directions, so its offers can only be booked together. See Round Trips.

Rail pass booking flow

  1. Find passes: Use getPassBundles to find passes for your passengers, and pick a product, class and number of travel days.
  2. Create a booking: Call createBooking with the pass bundle id.
  3. Add passenger details: Call updateBooking with each passenger's details. Exactly one passenger must be the contact person, with an email address and a phone number. This step is always needed.
  4. Create an order: Call createOrder to pre-book the pass. This step is the same for every payment method.
  5. Finalize the order: Call finalizeOrder to complete a purchase paid by wallet or invoice. If your customer pays, pass the order's id to createPayment instead. The order is then finalized automatically when they have paid.
  6. Get the pass codes: Pass codes are issued automatically, most of them within 15 minutes. Poll the order with node until they appear.

Payment methods

Every payment method starts with createOrder, which pre-books the tickets. The next step depends on how the order is paid:

Payment method After createOrder
Wallet Call finalizeOrder. The order total is deducted from your credits.
Invoice Call finalizeOrder. The order is added to your monthly invoice.
Payment gateway Call createPayment and redirect the customer to the payment URL it returns. The order is finalized when they have paid.

Tickets are issued once the order is finalized. See Payments for each method.

Seat reservations for passholders

A traveler who already holds an Interrail Pass books seat reservations through the ticket flow. Attach the pass to each passenger as a travel card when you get offers, and send the same passengers, with the pass's identifier, when you create the booking. The rest of the flow is the same. See Travel Cards.

Error handling

Any step can fail: a search finds nothing, an offer sells out, a booking expires. See Error Codes for what each error code means and how to handle it.

Next steps

Finding Journeys
Search for journeys between two places.
Booking Tickets
The complete booking guide, from offer to tickets.
Payments
How each payment method works.
Orders
Create, finalize and track orders.