Flight e-ticket

The itinerary receipt your booking system sends after ticketing

Download template

Sample data

Template
DOCX
Export as
PDF, DOCX, ODT, HTML, PNG +25 more
Carbone
5.0+

Generate e-ticket receipts from your travel booking system

Airlines, travel agencies and online booking platforms send an itinerary receipt to the passenger as soon as a ticket is issued. IATA Resolution 722f makes it part of the electronic ticket. It shows the e-ticket number, the booking reference, every flight coupon with its fare basis, baggage allowance and validity dates, the fare and the taxes by code, and the notices the passenger must receive, such as the liability advice of the Montreal Convention. Your airline ticketing system or travel booking system sends the ticket to the Carbone API as JSON and gets the PDF back, ready to attach to the confirmation email.

In this example, Halvane Airways, a fictional airline, issues a round trip from Lyon to Boston with a connection in Lisbon each way: four flight coupons on one ticket. Its airline code QA and its ticket prefix 953 do not appear in IATA's public airline lists, the header carries a specimen tag, and the card number is masked.

In this example, you will:

  • Repeat each journey, then each flight inside it, with a nested loop
  • Shorten the long tags of the loop with aliases
  • Print "+1" when a flight lands the next day, and remove the lines that do not apply
  • Print local dates and times, and airline dates such as 11FEB27
  • List the taxes by code and add them up with :aggSum
  • Draw a QR code that opens the booking

What the itinerary receipt contains

Part Content What Carbone does
Ticket Passenger name in airline format, e-ticket number (3-digit airline prefix and 10-digit serial), booking reference, date and place of issue, issuing office Prints the fields, splits the ticket number with :substr
Flight coupons Flight number, operating carrier, airports and terminals, local times, cabin and booking class, status, coupon status, fare basis, baggage allowance, not valid before and after One block per journey, one group of rows per coupon
Fare and payment Fare, taxes, fees and charges by IATA code, total, form of payment, endorsements, fare calculation One row per tax, :aggSum for the subtotal
Notices Conditions of carriage, Montreal Convention advice, liability limits, passenger rights, dangerous goods Fixed text of the template

Halvane Airways is an EU airline, so the notices give the liability limits required by Regulation (EC) No 889/2002, at the amounts revised by ICAO on 28 December 2024, and the passenger rights text of Regulation (EC) No 261/2004, Article 14.

How to build the e-ticket template

1. Fill in the ticket

  • Insert Carbone tags where the data goes: {d.booking.pnr}, {d.passenger.name}, {d.ticket.issueDate:formatD('D MMM YYYY')}.
  • The ticket number arrives as 13 digits. {d.ticket.number:substr(0, 3)} {d.ticket.number:substr(3)} sets the airline prefix apart with :substr: 953 2418637405.
  • {o.lang=en-gb}, next to the first title, sets the language of the dates and numbers for the whole document. See the in-template options.

2. Generate the QR code

Insert a temporary image next to the title, right-click it, select View Alt Text and write:

{d.booking.manageUrl:barcode(qrcode, scale:4)}

The :barcode formatter replaces the image with a QR code that opens the booking. An itinerary receipt is not a boarding pass, so it carries no boarding barcode.

3. Repeat the journeys and their flights

  • In the Itinerary title, two aliases shorten the tags of the loop: {#trip = d.journeys[i]}{#seg = d.journeys[i].segments[i]}. Carbone reads {$seg.depTime} as {d.journeys[i].segments[i].depTime}.
  • The journey title prints {$trip.label} and {$trip.date:formatD('dddd D MMMM YYYY')}, the flights table follows, and a paragraph with {d.journeys[i+1]} after the table closes the loop over the journeys.
  • In the flights table, each coupon takes three rows: the times and airports, the strip with the coupon details, and the connection. A last row with {d.journeys[i].segments[i+1]} closes the nested loop. Carbone removes both closing markers.

4. Print local times and drop what does not apply

  • Airline systems send the local date and time of each airport: "arrDate": "2027-02-22" and "arrTime": "08:40". A date without a time is never converted to another time zone, so {$seg.arrDate:formatD('ddd D MMM')} prints Mon 22 Feb wherever the document is generated.
  • {$seg.arrDate:ifNE(.depDate):show(' +1'):elseShow('')} prints +1 next to an arrival on the next day. .depDate is a dynamic parameter: the departure date of the same flight.
  • Operated by{$seg.operatedBy:ifEM:drop(p, 2)} removes the two "Operated by" lines when Halvane Airways operates the flight itself, and {$seg.connection:ifEM:drop(row)} removes the connection row after the last flight of a journey. See :drop.
  • {$seg.notValidBefore:formatD('DDMMMYY'):upperCase} prints the airline date format 22FEB27.

5. List the fare and the taxes

  • One row per tax: {d.taxes[i].code}, {d.taxes[i].label} and {d.taxes[i].amount:formatN(2)}, then {d.taxes[i+1].code} in the next row.
  • The subtotal adds them up with :aggSum: {d.taxes[].amount:aggSum:formatN(2)} prints 337.81.
  • Airline receipts print the ISO currency code before the amount: {d.fare.currency} {d.payment.total:formatN(2)} prints EUR 949.81 with :formatN.

Save the DOCX template, send it with the JSON of the ticket, and Carbone returns the itinerary receipt as a PDF.

Check out these similar templates to learn more:

Trusted by 800+ paid customers in 40+ countries

Finance
Healthcare
Insurance
Legal
Public
Retail
Energy
Software
Telecom
Dior
Thales
Younited
Danfoss
CMA CGM
Illumina
KparK
Scalingo
French Ministry of the Armed Forces
BMW
Telus
Bestseller
Flagship Biosciences
Insly
Ninox
Sodexo