Airline-Itinerary Data
Overview
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 requirements
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 Fields
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_type | string |
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_date | string |
The flight's arrival date. The field can accept date objects and will be interpreted as UTC dates. |
data.country_code | string |
The country code. Maximum 3 characters for PayPal transactions. Required for PayPal transactions. |
data.customer_code | string |
The customer code. Maximum 17 characters for PayPal transactions. |
data.date_of_birth | string |
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_amount | decimal |
The fare amount. This value can't be negative. |
data.fee_amount | decimal |
The fee amount. This value can't be negative. |
data.issued_date | date |
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_code | string |
The ticket issuer's IATA code. Maximum 4 characters for PayPal transactions. Required for PayPal and card transactions. |
data.legs.arrival_airport_code | string |
The arrival airport's IATA code. Maximum 3 characters for PayPal transactions. Required for PayPal and card transactions. |
data.legs.arrival_time | string |
The arrival time, in military notation (e.g. 1715 denotes 5:15 PM). |
data.legs.carrier_code | string |
The carrier's IATA code. Maximum 2 characters for PayPal transactions. Required for PayPal and card transactions. |
data.legs.conjunction_ticket | string |
The conjunction ticket. Maximum 14 characters. Required for Discover transactions. |
data.legs.coupon_number | string |
The coupon number. Maximum 1 character. |
data.legs.departure_airport_code | string |
The departure aiport's IATA code. Maximum 3 characters for PayPal transactions. Required for PayPal and card transactions. |
data.legs.departure_date | date |
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_time | string |
The departure time, in military notation (e.g. 1715 denotes 5:15 PM). Required for PayPal and card transactions. |
data.legs.endorsement_or_restrictions | string |
The notes or notations about endorsements or restrictions. |
data.legs.exchange_ticket | string |
The ticket number issued when the ticket was exchanged. Maximum 15 characters. |
data.legs.fare_amount | decimal |
The fare amount. This value can't be negative. Required for Discover transactions. |
data.legs.fare_basis_code | string |
The fare basis code. Maximum 15 characters. Required for PayPal and card transactions. |
data.legs.fee_amount | decimal |
The fee amount. This value can't be negative. |
data.legs.flight_number | string |
The flight number. Maximum 5 characters required for card transactions. Required for PayPal transactions. |
data.legs.service_class | string |
The class of service's IATA code. Maximum 2 characters for PayPal transactions. Required for PayPal and card transactions. |
data.legs.stopover_permitted | boolean |
Indicates whether a stopover is permitted. Required for PayPal and card transactions. |
data.legs.tax_amount | decimal |
The tax amount. This value can't be negative. |
data.passenger_first_name | string |
The passenger's first name. Required for PayPal and card transactions. |
data.passenger_last_name | string |
The passenger's last name. Required for PayPal transactions. |
data.passenger_middle_initial | string |
The passenger's middle initial. Maximum 1 character. |
data.passenger_title | string |
The passenger's title. |
data.restricted_ticket | boolean |
Indicates if the ticket is restricted. |
data.tax_amount | decimal |
The tax amount. This value can't be negative. |
data.ticket_issuer_address | string |
The address of the agency issuing the ticket. Maximum 16 characters required for Discover transactions. |
data.ticket_number | string |
The primary ticket number. Maximum 15 characters for PayPal transactions. Required for PayPal and card transactions. |
data.travel_agency_code | string |
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_name | string |
The travel agency's name. Required for PayPal transactions. |
Examples
Sale
Below is a full example of passing airline data on Transaction: Sale
.
- 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"
}
]
}
}
)
AS1 (2 Step Transaction)
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
- 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 errors
Transaction
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 data
Code | Text | Explanation |
---|---|---|
93401 | Industry type is invalid. | Industry type is invalid. |
93414 | Travel and Flight data is empty. | Travel and Flight data is empty. |
93415 | Data fields are unknown. | Data fields are unknown. |
93416 | Customer code is too long. | Customer code can't be longer than 17 characters. |
93417 | Fare amount cannot be negative. | Fare amount can't be less than zero. |
93418 | Fare 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. |
93419 | Fare amount is too large. | Fare amount can't be longer than 9 digits. |
93420 | Fee amount cannot be negative. | Fare amount can't be less than zero. |
93421 | Fee 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. |
93422 | Fee amount is too large. | Fee amount can't be longer than 9 digits. |
93423 | Issued date is an invalid format. | Issued date is an invalid format. |
93424 | Issuing carrier code is too long. | Issuing carrier code can't be longer than 4 characters. |
93425 | Passenger middle initial is too long. | Passenger middle initial can't be longer than 1 character. |
93426 | Restricted ticket is required. | You must specify if the ticket is restricted. |
93427 | Tax amount cannot be negative. | Tax amount can't be less than zero. |
93428 | Tax 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. |
93429 | Tax amount is too large. | Tax amount can't be longer than 9 digits. |
93430 | Ticket number is too long. | Ticket number can't be longer than 15 characters. |
93431 | Expected a collection of legs but none provided. | Expected a collection of legs but unrecognized data provided. |
93432 | Too many legs. | A maximum of 12 legs can be provided. |
93443 | Country code is too long. | Country code can't be longer than 3 characters. |
93444 | Date of birth is an invalid format. | Date of birth is an invalid format. |
Airline-itinerary data legs
Code | Text | Explanation |
---|---|---|
96301 | Arrival airport code is too long. | Arrival airport code can't be longer than 3 characters. |
96302 | Arrival time is an invalid format. | Arrival time must be formatted like '08:00'. |
96303 | Carrier code is too long. | Carrier code can't be longer than 2 characters. |
96304 | Conjunction ticket is too long. | Conjunction ticket can't be longer than 14 characters. |
96305 | Coupon number is too long. | Coupon number can't be longer than 1 character. |
96306 | Departure airport code is too long. | Departure airport code can't be longer than 3 characters. |
96307 | Departure time is an invalid format. | Departure time must be formatted like '08:00'. |
96308 | Exchange ticket is too long. | Exchange ticket can't be longer than 15 characters. |
96309 | Fare amount cannot be negative. | Fare amount can't be less than zero. |
96310 | Fare 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. |
96311 | Fare amount is too large. | Fare amount can't be longer than 9 digits. |
96312 | Fare basis code is too long. | Fare basis code can't be longer than 15 characters. |
96313 | Fee amount cannot be negative. | Fee amount can't be less than zero. |
96314 | Fee 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. |
96315 | Fee amount is too large. | Fee amount can't be longer than 9 digits. |
96316 | Flight number is too long. | Flight number can't be longer than 5 characters. |
96317 | Service class is too long. | Service class can't be longer than 2 characters. |
96318 | Tax amount cannot be negative. | Tax amount can't be less than zero. |
96319 | Tax 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. |
96320 | Tax amount is too large. | Tax amount can't be longer than 9 digits. |
963996 | Required attribute is missing | The missing attribute is provided in the error message. |
963997 | Attribute is not in the required format | The attribute and the expected format are provided in the error message. |
963998 | Attribute is not in the list of expected values | The attribute and the expected values are provided in the error message. |
963999 | Attribute is the wrong type | The attribute and the expected types are provided in the error message. |