VAT Numbers
Author
Discussion

Doofus

Original Poster:

34,636 posts

204 months

Friday 21st October 2011
quotequote all
I thought I knew the trick to validating VAT numbers. If I say '97', hopefully somebody will know what I mean.

I've just come across a number which doesn't fit the rule, but it is correct, apparently. So there's another rule I don't know.

What is it?

bigandclever

14,418 posts

269 months

Friday 21st October 2011
quotequote all
Is it a recent(ish) VAT number? A new system was introduced a couple of years ago, known as 9755.

ETA snipped from Wiki

wiki said:
The current modulus-97 series is expected to run out during 2010, so a parallel series of numbers is being introduced from November 2009 for new registrations, restarting at 100 nnnn nn and following the same format but with the last two digits derived from an alternative algorithm known as "9755". The algorithm is identical to the one for the established series except that 55 is subtracted to give the check number (modulus 97), so the check number is either 55 less than or (if this would be negative) 42 greater than the check number that a VAT number in the established series would have if it were identical in the first seven digits. The details of the 97−55 check algorithm were to be secret but are now available from HMRC on request.
Edited by bigandclever on Friday 21st October 22:03

Steffan

10,362 posts

259 months

Friday 21st October 2011
quotequote all
bigandclever said:
Is it a recent(ish) VAT number? A new system was introduced a couple of years ago, known as 9755.

ETA snipped from Wiki

wiki said:
The current modulus-97 series is expected to run out during 2010, so a parallel series of numbers is being introduced from November 2009 for new registrations, restarting at 100 nnnn nn and following the same format but with the last two digits derived from an alternative algorithm known as "9755". The algorithm is identical to the one for the established series except that 55 is subtracted to give the check number (modulus 97), so the check number is either 55 less than or (if this would be negative) 42 greater than the check number that a VAT number in the established series would have if it were identical in the first seven digits. The details of the 97−55 check algorithm were to be secret but are now available from HMRC on request.
Edited by bigandclever on Friday 21st October 22:03
We learn something ever day. Whether we want to or not.

As a matter of interest what proportion of unlawful numbers has the OP found?

I would have though dodgy VAT numbers were a pretty rare event.

Naive maybe?

TurricanII

1,516 posts

229 months

Friday 21st October 2011
quotequote all
I have just twigged that you are probably after a programmatic way to validate them. I'll post my useful link for validating individual VAT numbers any way: http://ec.europa.eu/taxation_customs/vies/

I would try looking at the source code for Zencart or some of the free plugins to get the some hints as to vat number validation

Doofus

Original Poster:

34,636 posts

204 months

Friday 21st October 2011
quotequote all
bigandclever said:
Edited by bigandclever on Friday 21st October 22:03
Now why is that all that cam eup when I quoted you?

Yes, it's a recent number, yes it starts in the 100's, and yes, the minus 55 thing works. Thanks thumbup

I always thought the 'secret' was a genuine secret. I learned it over twenty years ago, and I have never found another person who knew it.

Edited by Doofus on Friday 21st October 22:54

Doofus

Original Poster:

34,636 posts

204 months

Friday 21st October 2011
quotequote all
Steffan said:
As a matter of interest what proportion of unlawful numbers has the OP found?
I don't check 'em all - I'm not that sad!

But when something looks fishy, I tend to, and I've probably come across a couple of dozen or so. Not much of a return rate, I know...

Edited by Doofus on Friday 21st October 22:54

Doofus

Original Poster:

34,636 posts

204 months

Friday 21st October 2011
quotequote all
TurricanII said:
I have just twigged that you are probably after a programmatic way to validate them. I'll post my useful link for validating individual VAT numbers any way: http://ec.europa.eu/taxation_customs/vies/

I would try looking at the source code for Zencart or some of the free plugins to get the some hints as to vat number validation
I know how to validate them already - or I did until this one. But now I'm back on track again.

iansumuk

31 posts

230 months

Thursday 19th June 2014
quotequote all
This is doing my head in, as the formula doesn't work for me.

178268955 is a valid number, it checks out on VIES.

1782689 results in 84 -- no match on the old formulae.

deduct 55 gives 29, subtract from 97 gives 68. No match. Formula says it's invalid but it isn't!

What's going on?

-- sorry to reincarnate an old thread! Just that's there's a lot of sites discussing this and I don't have accounts on them to reply! I do have a PH account though!

iansumuk

31 posts

230 months

Thursday 19th June 2014
quotequote all
iansumuk said:
This is doing my head in, as the formula doesn't work for me.

178268955 is a valid number, it checks out on VIES.

1782689 results in 84 -- no match on the old formulae.

deduct 55 gives 29, subtract from 97 gives 68. No match. Formula says it's invalid but it isn't!

What's going on?

-- sorry to reincarnate an old thread! Just that's there's a lot of sites discussing this and I don't have accounts on them to reply! I do have a PH account though!
Ah, I see my mistake. I'm using mod 97, but i need to deduct another 97, so 84-97 = -13 so the answer is 13. 13+42 = 55. Now I see it. Sorry for confusion caused!