![]() |
Ticket number decoded
Hi everyone,
I've been able to piece together some information based on threads here and the good ol' google search, but still need a bit more. I am working on a project that has me working with ticket purchases transactions, the data comes from the credit card company and I was wondering if the ticket number can be deconstructed to identify refunds, full trip costs, etc. I have Hawaiian and Southwest airline data. I know the following: - first 3 digits identify the airline - next 9 or 10 are the unique ticket identifier I have tickets that are 13 and 14 digit long. if you can shed some light I'd greatly appreciate it! Happy new year |
As far as I know, all IATA ticket numbers are 13 digits long. The first three identify the airline, the remainder are sequential. Some airlines don't have ticket numbers. Welcome to FT!
|
Originally Posted by 2020_flyer
(Post 31905669)
...I was wondering if the ticket number can be deconstructed to identify refunds, full trip costs, etc.
|
The last digit of a ticket number is a check digit. To quote something I wrote for a different audience:
A check digit is a digit that is calculated from the other digits of a number. When the entire number, including the check digit, is entered, a computer repeats the calculation. If it comes up with the same check digit, processing can proceed. If it doesn’t, it informs the user of a data entry error. One might think random check digits will be correct one time in ten. However, human errors aren’t random. Most errors involve pressing a key next to the correct one or transposing adjacent digits. Check digits can protect against 100% of those. Since other errors are rare, check digits are effective overall. |
Luhn algorithm I believe, at least on credit cards.
|
Originally Posted by LondonElite
(Post 31908283)
Luhn algorithm I believe, at least on credit cards.
|
Originally Posted by Efrem
(Post 31909572)
But not on airline tickets. I didn't want to get technical, but they use the remainder modulo 7. That's why the last digit of a ticket number is never greater than 6.
|
Originally Posted by Efrem
(Post 31909572)
But not on airline tickets. I didn't want to get technical, but they use the remainder modulo 7. That's why the last digit of a ticket number is never greater than 6.
I just looked at some my past ticket numbers - plenty of them end in digits greater than 6 :confused: |
Originally Posted by pandaperth
(Post 31914237)
Mmm
I just looked at some my passed ticket numbers - plenty of them end in digits greater than 6 :confused: My sample size is probably not big enough but about 15% of the ticket numbers in my saved emails ended in 7-9, airlines include BA, QF, SK and one airberlin ticket. |
It's possible that different airlines use different check digit algorithms. The sources I checked all said they use Mod 7, but I don't think anyone can speak for all airlines and a given airline can change its formula at any time.
|
Originally Posted by Efrem
(Post 31908117)
Most errors involve pressing a key next to the correct one or transposing adjacent digits. Check digits can protect against 100% of those.
Originally Posted by Efrem
(Post 31909572)
But not on airline tickets. I didn't want to get technical, but they use the remainder modulo 7.
If you transpose two digits with a difference of 7, the remainder mod 7 doesn't change. Eg 81 = 18 = 4 (mod 7) So it only protects against 84/90 = 93.3333...% of transpositions :( |
Originally Posted by VegasGambler
(Post 31936346)
They can...
But they don't :( If you transpose two digits with a difference of 7, the remainder mod 7 doesn't change. |
Ages ago, some banks in Europe had a two digit "check digit" that was used for bank transfers.
|
Originally Posted by Efrem
(Post 31909572)
But not on airline tickets. I didn't want to get technical, but they use the remainder modulo 7. That's why the last digit of a ticket number is never greater than 6.
|
The ticket number is split into 3 parts.
First 3 numbers - IATA Plate . . Next 3 numbers - Virtual block allocation . Not sure what else to call it - it's a carry over from the paper ticket days. It was like you would get a ticket series 2442 then issue the rest sequentially from the pre-printed paper sequence you have such as 100001 through 100999. One IATA agent will have a series of tickets issued which this number is always the same - it's like your block but without a plate - such that the plate is assigned when the ticket is "printed". Remember e-tickets exactly work like a virtual paper ticket. Next 6 - Sequentially issued ticket numbers- Here - they are sequential from 000001 to 999999. When an agent plates a ticket, the sequence of the 2nd and 3rd blocks are consecutive with only the Plate number changing. i.e. An agent might be issued all tickets in block 2190 and sequence 100001-199999. If the first ticket they issue is on Air Canada it would be 014 2190 100001 If the second ticket was on Swiss it would be 724 2190 100002 and so on. All the airlines in the world are sharing the 4 numbers in the middle such that no matter what you don't get a duplicate. However I believe some series are reserved for airline issue. I know when AC started e-tickets around 1996 I think they had the block 2190 assigned to themselves. But I think perhaps all the airlines could also use 2190 because they would never plate for someone else - only an IATA agent would plate for many. Not sure if that makes sense or not. i.e both AC and AA could have series 2190 because they would never plate for each other. i.e. 014 2190 100001 or 001 2910 100001 - - however - an IATA agent is given their sequence that is split between all the agents in the world. This sequencing needs to somehow be coordinated across all the airlines so you don't get duplicate ticket numbers issued. |
| All times are GMT -6. The time now is 12:54 pm. |
This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.