Airline-Itinerary Dataanchor

Overviewanchor

Airline Industry Data helps you qualify for lower interchange rates when sent along with Pay with PayPal, card, and Apple Pay/Google Pay transactions made with Visa, Mastercard, and Discover card transactions.

To qualify for Airline Industry Data processing (AID), you need to pass additional information when creating a sale or capturing transactions. Braintree passes these details to the card networks which assess a transaction fee based on Airline Industry Data interchange rates.

Merchant requirementsanchor

Airline Industry Data (AID) is available globally when the payment method is PayPal and US when the payment method is card or Apple Pay/Google Pay. These merchants who are recognized as airline merchants by card schemes can pass AID on sale or submit-for-settlement transactions when the payment method is PayPal, card, or Apple Pay/Google Pay.

Required Fieldsanchor

To qualify for interchange rates from AID, you need to include the below fields in the Transaction: Sale or Transaction: Submit For Settlement call:

Field Type Explanation
industry_typestring The industry type. Currently, the only value option is travel_flight. Information for only one industry type may be sent per transaction. Required for PayPal and card transactions including Apple Pay or Google Pay.
data.arrival_datestring The flight's arrival date. The field can accept date objects and will be interpreted as UTC dates.
data.country_codestring The country code. Maximum 3 characters for PayPal transactions. Required for PayPal transactions.
data.customer_codestring The customer code. Maximum 17 characters for PayPal transactions.
data.date_of_birthstring The passenger's date of birth. The field can accept date objects and will be interpreted as UTC dates. Required for PayPal transactions.
data.fare_amountdecimal The fare amount. This value can't be negative.
data.fee_amountdecimal The fee amount. This value can't be negative.
data.issued_datedate The day on which the tickets were issued. The field can accept date objects and will be interpreted as UTC dates. Required for PayPal and Discover transactions.
data.issuing_carrier_codestring The ticket issuer's IATA code. Maximum 4 characters for PayPal transactions. Required for PayPal and card transactions.
data.legs.arrival_airport_codestring The arrival airport's IATA code. Maximum 3 characters for PayPal transactions. Required for PayPal and card transactions.
data.legs.arrival_timestring The arrival time, in military notation (e.g. 1715 denotes 5:15 PM).
data.legs.carrier_codestring The carrier's IATA code. Maximum 2 characters for PayPal transactions. Required for PayPal and card transactions.
data.legs.conjunction_ticketstring The conjunction ticket. Maximum 14 characters. Required for Discover transactions.
data.legs.coupon_numberstring The coupon number. Maximum 1 character.
data.legs.departure_airport_codestring The departure aiport's IATA code. Maximum 3 characters for PayPal transactions. Required for PayPal and card transactions.
data.legs.departure_datedate The day of departure. The field can accept date objects and will be interpreted as UTC dates. Required for PayPal and card transactions.
data.legs.departure_timestring The departure time, in military notation (e.g. 1715 denotes 5:15 PM). Required for PayPal and card transactions.
data.legs.endorsement_or_restrictionsstring The notes or notations about endorsements or restrictions.
data.legs.exchange_ticketstring The ticket number issued when the ticket was exchanged. Maximum 15 characters.
data.legs.fare_amountdecimal The fare amount. This value can't be negative. Required for Discover transactions.
data.legs.fare_basis_codestring The fare basis code. Maximum 15 characters. Required for PayPal and card transactions.
data.legs.fee_amountdecimal The fee amount. This value can't be negative.
data.legs.flight_numberstring The flight number. Maximum 5 characters required for card transactions. Required for PayPal transactions.
data.legs.service_classstring The class of service's IATA code. Maximum 2 characters for PayPal transactions. Required for PayPal and card transactions.
data.legs.stopover_permittedboolean Indicates whether a stopover is permitted. Required for PayPal and card transactions.
data.legs.tax_amountdecimal The tax amount. This value can't be negative.
data.passenger_first_namestring The passenger's first name. Required for PayPal and card transactions.
data.passenger_last_namestring The passenger's last name. Required for PayPal transactions.
data.passenger_middle_initialstring The passenger's middle initial. Maximum 1 character.
data.passenger_titlestring The passenger's title.
data.restricted_ticketboolean Indicates if the ticket is restricted.
data.tax_amountdecimal The tax amount. This value can't be negative.
data.ticket_issuer_addressstring The address of the agency issuing the ticket. Maximum 16 characters required for Discover transactions.
data.ticket_numberstring The primary ticket number. Maximum 15 characters for PayPal transactions. Required for PayPal and card transactions.
data.travel_agency_codestring The travel agency's IATA code. For direct airline integrations, leave this value blank. Maximum 8 characters. Required for PayPal and Discover transactions.
data.travel_agency_namestring The travel agency's name. Required for PayPal transactions.

Examplesanchor

Saleanchor

Below is a full example of passing airline data on Transaction: Sale.

  1. Ruby
result = gateway.transaction.sale(
    :amount => "100.00",
    :payment_method_nonce => nonce_from_the_client,
    :options => {
        :submit_for_settlement => true
    },
    :industry => {
        :industry_type => Braintree::Transaction::IndustryType::TravelAndFlight,
        :data => {
        :arrival_date => Date.new(2018, 1, 1),
        :country_code => "US",
        :customer_code => "customer-code",
        :date_of_birth => Date.new(2018, 1, 1),
        :fare_amount => "70.00",
        :fee_amount => "10.00",
        :issued_date => Date.new(2018, 1, 1),
        :issuing_carrier_code => "AA",
        :passenger_first_name => "John",
        :passenger_last_name => "Doe",
        :passenger_middle_initial => "M",
        :passenger_title => "Mr.",
        :restricted_ticket => false,
        :tax_amount => "20.00",
        :ticket_issuer_address => "ticketissueraddr",
        :ticket_number => "ticket-number",
        :travel_agency_code => "12345678",
        :travel_agency_name => "Expedia",
        :legs => [
            {
            :arrival_airport_code => "ATX",
            :arrival_time => "10:00",
            :carrier_code => "AA",
            :conjunction_ticket => "CJ0001",
            :coupon_number => "1",
            :departure_airport_code => "MDW",
            :departure_date => Date.new(2018, 1, 2),
            :departure_time => "08:00",
            :endorsement_or_restrictions => "NOT REFUNDABLE",
            :exchange_ticket => "ET0001",
            :fare_amount => "35.00",
            :fare_basis_code => "W",
            :fee_amount => "5.00",
            :flight_number => "AA100",
            :service_class => "Y",
            :stopover_permitted => false,
            :tax_amount => "10.00"
            },
            {
            :arrival_airport_code => "MDW",
            :arrival_time => "14:00",
            :carrier_code => "AA",
            :conjunction_ticket => "CJ0002",
            :coupon_number => "1",
            :departure_airport_code => "ATX",
            :departure_date => Date.new(2018, 1, 3),
            :departure_time => "12:00",
            :endorsement_or_restrictions => "NOT REFUNDABLE",
            :exchange_ticket => "ET0002",
            :fare_amount => "35.00",
            :fare_basis_code => "W",
            :fee_amount => "5.00",
            :flight_number => "AA200",
            :service_class => "Y",
            :stopover_permitted => false,
            :tax_amount => "10.00"
            }
        ]
        }
    }
    )

anchor

AS1 (2 Step Transaction)anchor

If available, pass lead passenger data on Transaction:Sale. If not available, pass passenger data on Transaction:SubmitForPartialSettlement for each passenger data. Below is a full example of passing airline data on Transaction: Submit For Partial Settlement

  1. Ruby
result = gateway.transaction.submit_for_partial_settlement(
      "the_parent_auth_transaction_id",
      "10.00",
      {
        :order_id => "order_id",
        :industry => {
          :industry_type => Braintree::Transaction::IndustryType::TravelAndFlight,
          :data => {
            :arrival_date => Date.new(2018, 1, 1),
            :country_code => "US",
            :customer_code => "customer-code",
            :date_of_birth => Date.new(2018, 1, 1),
            :fare_amount => "70.00",
            :fee_amount => "10.00",
            :issued_date => Date.new(2018, 1, 1),
            :issuing_carrier_code => "AA",
            :passenger_first_name => "John",
            :passenger_last_name => "Doe",
            :passenger_middle_initial => "M",
            :passenger_title => "Mr.",
            :restricted_ticket => false,
            :tax_amount => "20.00",
            :ticket_issuer_address => "ticketissueraddr",
            :ticket_number => "ticket-number",
            :travel_agency_code => "12345678",
            :travel_agency_name => "Expedia",
            :legs => [
              {
                :arrival_airport_code => "ATX",
                :arrival_time => "10:00",
                :carrier_code => "AA",
                :conjunction_ticket => "CJ0001",
                :coupon_number => "1",
                :departure_airport_code => "MDW",
                :departure_date => Date.new(2018, 1, 2),
                :departure_time => "08:00",
                :endorsement_or_restrictions => "NOT REFUNDABLE",
                :exchange_ticket => "ET0001",
                :fare_amount => "35.00",
                :fare_basis_code => "W",
                :fee_amount => "5.00",
                :flight_number => "AA100",
                :service_class => "Y",
                :stopover_permitted => false,
                :tax_amount => "10.00"
              },
              {
                :arrival_airport_code => "MDW",
                :arrival_time => "14:00",
                :carrier_code => "AA",
                :conjunction_ticket => "CJ0002",
                :coupon_number => "1",
                :departure_airport_code => "ATX",
                :departure_date => Date.new(2018, 1, 3),
                :departure_time => "12:00",
                :endorsement_or_restrictions => "NOT REFUNDABLE",
                :exchange_ticket => "ET0002",
                :fare_amount => "35.00",
                :fare_basis_code => "W",
                :fee_amount => "5.00",
                :flight_number => "AA200",
                :service_class => "Y",
                :stopover_permitted => false,
                :tax_amount => "10.00"
              }
            ]
          }
        }
      }
    )

Validation errorsanchor

Transactionanchor

Code Text Explanation
915182 For PayPal transactions with travel_flight industry data, submit_for_settlement is required and must be true. PayPal supports airline-itinerary data only when options.submit_for_settlement is true.

Airline-itinerary dataanchor

CodeTextExplanation
93401Industry type is invalid.Industry type is invalid.
93414Travel and Flight data is empty.Travel and Flight data is empty.
93415Data fields are unknown.Data fields are unknown.
93416Customer code is too long.Customer code can't be longer than 17 characters.
93417Fare amount cannot be negative.Fare amount can't be less than zero.
93418Fare amount is an invalid format.Fare amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the fare amount can't include decimal places.
93419Fare amount is too large.Fare amount can't be longer than 9 digits.
93420Fee amount cannot be negative.Fare amount can't be less than zero.
93421Fee amount is an invalid format.Fee amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the fee amount can't include decimal places.
93422Fee amount is too large.Fee amount can't be longer than 9 digits.
93423Issued date is an invalid format.Issued date is an invalid format.
93424Issuing carrier code is too long.Issuing carrier code can't be longer than 4 characters.
93425Passenger middle initial is too long.Passenger middle initial can't be longer than 1 character.
93426Restricted ticket is required.You must specify if the ticket is restricted.
93427Tax amount cannot be negative.Tax amount can't be less than zero.
93428Tax amount is an invalid format.Tax amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the tax amount can't include decimal places.
93429Tax amount is too large.Tax amount can't be longer than 9 digits.
93430Ticket number is too long.Ticket number can't be longer than 15 characters.
93431Expected a collection of legs but none provided.Expected a collection of legs but unrecognized data provided.
93432Too many legs.A maximum of 12 legs can be provided.
93443Country code is too long.Country code can't be longer than 3 characters.
93444Date of birth is an invalid format.Date of birth is an invalid format.

Airline-itinerary data legsanchor

Code Text Explanation
96301Arrival airport code is too long.

Arrival airport code can't be longer than 3 characters.

96302Arrival time is an invalid format.

Arrival time must be formatted like '08:00'.

96303Carrier code is too long.

Carrier code can't be longer than 2 characters.

96304Conjunction ticket is too long.

Conjunction ticket can't be longer than 14 characters.

96305Coupon number is too long.

Coupon number can't be longer than 1 character.

96306Departure airport code is too long.

Departure airport code can't be longer than 3 characters.

96307Departure time is an invalid format.

Departure time must be formatted like '08:00'.

96308Exchange ticket is too long.

Exchange ticket can't be longer than 15 characters.

96309Fare amount cannot be negative.

Fare amount can't be less than zero.

96310Fare amount is an invalid format.

Fare amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the fare amount can't include decimal places.

96311Fare amount is too large.

Fare amount can't be longer than 9 digits.

96312Fare basis code is too long.

Fare basis code can't be longer than 15 characters.

96313Fee amount cannot be negative.

Fee amount can't be less than zero.

96314Fee amount is an invalid format.

Fee amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the fee amount can't include decimal places.

96315Fee amount is too large.

Fee amount can't be longer than 9 digits.

96316Flight number is too long.

Flight number can't be longer than 5 characters.

96317Service class is too long.

Service class can't be longer than 2 characters.

96318Tax amount cannot be negative.

Tax amount can't be less than zero.

96319Tax amount is an invalid format.

Tax amount must be formatted like '10' or '10.00'. If the currency does not use decimal places, the tax amount can't include decimal places.

96320Tax amount is too large.

Tax amount can't be longer than 9 digits.

963996Required attribute is missing

The missing attribute is provided in the error message.

963997Attribute is not in the required format

The attribute and the expected format are provided in the error message.

963998Attribute is not in the list of expected values

The attribute and the expected values are provided in the error message.

963999Attribute is the wrong type

The attribute and the expected types are provided in the error message.