Import boarding passes from flight reservation emails

As a developer or merchant, integrating Google Wallet with your flight reservation systems can significantly enhance the customer experience by ensuring that all boarding information is accessible. A key to achieving this seamless integration is through the use of structured markup in the emails you send to customers, particularly focusing on the ticketToken field.

Why Embed Markup?

Embedding markup into your flight confirmation emails allows the reservation details to be automatically recognized and imported into the customer's Google Wallet (if the feature is enabled). This process, facilitated by structured data in the Schema.org format, enhances the functionality of Google Wallet by automatically adding relevant flight information.

Key Field: ticketToken

The ticketToken field is crucial as it typically contains a secure code type and raw value that can be rendered directly as a scannable code. This field ensures that all the necessary boarding information is instantly available in the customer's Google Wallet. In addition, the raw value must conform with BCBP (Bar Coded Boarding Pass). You can use a decoder to decode the token value. The merchant needs to ensure the value in json is consistent with the decoded value.

Here are some supported code types:

  • barcode128
  • pdf417
  • qrCode
  • aztecCode

And here are some examples of valid ticketTokens:

barcode128:M1HANFENG/ZHU          EMWLPJ SFOAUSGG  123 350J25A 614a 10A1973966772
pdf417:M1HANFENG/ZHU          EMWLPJ SFOAUSGG  123 350J25A 614a 10A1973966772
qrCode:M1HANFENG/ZHU          EMWLPJ SFOAUSGG  123 350J25A 614a 10A1973966772
aztecCode:M1HANFENG/ZHU          EMWLPJ SFOAUSGG  123 350J25A 614a 10A1973966772

Here's how you can structure your email markup:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "FlightReservation",
  "reservationNumber": "RXJ34P",
  "reservationStatus": "http://schema.org/Confirmed",
  "underName": {
    "@type": "Person",
    "name": "HANFENG/ZHU"
  },
  "reservationFor": {
    "@type": "Flight",
    "flightNumber": "123",
    "airline": {
      "@type": "Airline",
      "name": "United",
      "iataCode": "GG"
    },
    "departureAirport": {
      "@type": "Airport",
      "name": "San Francisco Airport",
      "iataCode": "SFO"
    },
    "departureTime": "2027-03-04T20:15:00-08:00",
    "arrivalAirport": {
      "@type": "Airport",
      "name": "Austin-Bergstorm International Airport",
      "iataCode": "AUS"
    },
    "arrivalTime": "2027-03-05T06:30:00-05:00"
  },
  "airplaneSeat": "9A",
  "airplaneSeatClass": {
    "@type": "AirplaneSeatClass",
    "name": "Business"
  },
  "ticketToken": "qrCode:M1HANFENG/ZHU          EMWLPJ SFOAUSGG  123 350J25A 614a 10A1973966772"
}
</script>