Go Back  FlyerTalk Forums > Miles&Points > Information Desk
Reload this Page >

Ticket number decoded

Community
Wiki Posts
Search

Ticket number decoded

Thread Tools
 
Search this Thread
 
Old Jan 3, 2020 | 3:09 pm
  #1  
Original Poster
 
Join Date: Jan 2020
Posts: 1
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
2020_flyer is offline  
Old Jan 3, 2020 | 5:22 pm
  #2  
Suspended
 
Join Date: Mar 2002
Location: Canada, USA, Europe
Programs: UA 1K
Posts: 31,439
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!
LondonElite is offline  
Old Jan 3, 2020 | 11:53 pm
  #3  
FlyerTalk Evangelist
Community Builder
All eyes on you!
20 Years on Site
 
Join Date: Nov 2004
Location: Denmark
Programs: TK Elite
Posts: 13,921
Originally Posted by 2020_flyer
...I was wondering if the ticket number can be deconstructed to identify refunds, full trip costs, etc.
To my knowledge No.
JDiver likes this.
SK AAR is online now  
Old Jan 4, 2020 | 8:52 am
  #4  
FlyerTalk Evangelist
40 Countries Visited
3M
All eyes on you!
25 Years on Site
 
Join Date: May 1998
Location: Massachusetts, USA; AA 2.996MM & Plat Pro, DL 1MM, GM & Flying Colonel
Posts: 25,036
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 doesnt, 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 arent 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.
Credit card numbers also always include check digits. One of the criticisms of U.S. Social Security numbers is that they do not; if you make a mistake in entering yours, you will probably have entered a valid number that belongs to someone else. (When SSNs were introduced in the 1930s, nobody worried about that sort of thing.) Most more recent national identifiers include one.
JDiver and writerguyfl like this.
Efrem is offline  
Old Jan 4, 2020 | 10:09 am
  #5  
Suspended
 
Join Date: Mar 2002
Location: Canada, USA, Europe
Programs: UA 1K
Posts: 31,439
Luhn algorithm I believe, at least on credit cards.
LondonElite is offline  
Old Jan 4, 2020 | 5:32 pm
  #6  
FlyerTalk Evangelist
40 Countries Visited
3M
All eyes on you!
25 Years on Site
 
Join Date: May 1998
Location: Massachusetts, USA; AA 2.996MM & Plat Pro, DL 1MM, GM & Flying Colonel
Posts: 25,036
Originally Posted by LondonElite
Luhn algorithm I believe, at least on credit cards.
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.
Efrem is offline  
Old Jan 4, 2020 | 5:37 pm
  #7  
Suspended
 
Join Date: Mar 2002
Location: Canada, USA, Europe
Programs: UA 1K
Posts: 31,439
Originally Posted by Efrem
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.
Interesting. I did not know this, will research. Thanks!
LondonElite is offline  
Old Jan 6, 2020 | 4:18 am
  #8  
100 Countries Visited
All eyes on you!
15 Years on Site
 
Join Date: Mar 2008
Location: used to be PER, now it's nowhere/eveywhere
Programs: QFF NB, AA GLD
Posts: 3,687
Originally Posted by Efrem
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.
Mmm
I just looked at some my past ticket numbers - plenty of them end in digits greater than 6

Last edited by pandaperth; Jan 6, 2020 at 5:49 am Reason: typo
pandaperth is offline  
Old Jan 6, 2020 | 5:32 am
  #9  
:D!
1M
50 Countries Visited
100 Nights
10 Years on Site
 
Join Date: Sep 2012
Location: NW London and NW Sydney
Programs: BA Diamond, Hilton Bronze, A3 Diamond, IHG *G
Posts: 7,145
Originally Posted by pandaperth
Mmm
I just looked at some my passed ticket numbers - plenty of them end in digits greater than 6
Same here. So if they were evenly distributed you'd expect 30% of numbers to be 7, 8 or 9.

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.
:D! is offline  
Old Jan 6, 2020 | 8:00 am
  #10  
FlyerTalk Evangelist
40 Countries Visited
3M
All eyes on you!
25 Years on Site
 
Join Date: May 1998
Location: Massachusetts, USA; AA 2.996MM & Plat Pro, DL 1MM, GM & Flying Colonel
Posts: 25,036
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.
Efrem is offline  
Old Jan 11, 2020 | 4:31 am
  #11  
FlyerTalk Evangelist
 
Join Date: Oct 2014
Posts: 10,906
Originally Posted by Efrem
Most errors involve pressing a key next to the correct one or transposing adjacent digits. Check digits can protect against 100% of those.
They can...

Originally Posted by Efrem
But not on airline tickets. I didn't want to get technical, but they use the remainder modulo 7.
But they don't

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
R.O. likes this.
VegasGambler is offline  
Old Jan 11, 2020 | 7:15 am
  #12  
FlyerTalk Evangelist
40 Countries Visited
3M
All eyes on you!
25 Years on Site
 
Join Date: May 1998
Location: Massachusetts, USA; AA 2.996MM & Plat Pro, DL 1MM, GM & Flying Colonel
Posts: 25,036
Originally Posted by VegasGambler
They can...

But they don't

If you transpose two digits with a difference of 7, the remainder mod 7 doesn't change.
That's EXACTLY why I wrote "check digits can," not "the check digit algorithm used on airline tickets does."
Efrem is offline  
Old Jan 13, 2020 | 12:43 am
  #13  
A FlyerTalk Posting Legend
40 Countries Visited
60 Nights
5M
15 Years on Site
 
Join Date: Sep 2009
Location: Minneapolis: DL DM charter 2.3MM
Programs: A3*Gold, SPG Plat, HyattDiamond, MarriottPP, LHW exAccess, ICI, Raffles Amb, NW PE MM, TWA Gold MM
Posts: 102,617
Ages ago, some banks in Europe had a two digit "check digit" that was used for bank transfers.
MSPeconomist is offline  
Old Jan 13, 2020 | 1:39 pm
  #14  
FlyerTalk Evangelist
Community Builder
All eyes on you!
15 Years on Site
 
Join Date: Mar 2008
Location: Netherlands
Programs: KL Platinum; A3 Gold; LH Senator
Posts: 30,598
Originally Posted by Efrem
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.
Here, I assume you mean the 14th digit (which is not always, in fact rarely, shown)
irishguy28 is offline  
Old Jan 16, 2020 | 1:55 pm
  #15  
10 Countries Visited
20 Countries Visited
30 Countries Visited
15 Years on Site
 
Join Date: Oct 2010
Location: ZRH
Programs: AC SE 100K
Posts: 984
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.
pandaperth likes this.
zrh2yvr is offline  


Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

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.