stdnum-js icon indicating copy to clipboard operation
stdnum-js copied to clipboard

Missing support for tax numbers

Open koblas opened this issue 3 years ago • 4 comments

  • AF - Afganistan
  • AG - Antigua and Barbuda
  • AI - Anguilla https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Anguilla-TIN.pdf
  • AM - Armenia
  • AO - Angola https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Anguilla-TIN.pdf
  • AW - Aruba https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Aruba-TIN.pdf
  • BA - Bosnia and Herzegovina
  • BB - Barbados https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Barbados-TIN.pdf
  • BH - Bahrain https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Bahrain-TIN.pdf
  • CK - Cook Islands https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Cook-Islands-TIN.pdf
  • CW - Curacao https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Curacao-TIN.pdf
  • FJ - Fiji (9 or 10 digits) https://www.frcs.org.fj/wp-content/uploads/2019/11/Tax-Talk-ammended.pdf
  • GA - Georgia https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Georgia-TIN.pdf
  • GD - Grenada https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Grenada-TIN.pdf
  • KI - Kiribati
  • SC - Seychelles https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Seychelles-TIN.pdf

koblas avatar Jun 29 '22 09:06 koblas

Netherland TIN (tax identification number) https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Netherlands-TIN.pdf

However, I am confused if its the same as Netherland BSN. They seem to be different validation methods though.

teebu avatar Apr 04 '23 19:04 teebu

@teebu When I look at the NL BSN and the PDF they appear to be the same. Both have the same 9,8,7,6,5,4,3,2 sum factor validation. I did also find that BSN on the government of NL website indicates that it's used for tax purposes along with this document.

https://expatax.nl/bsn-citizen-service-number-your-dutch-tax-identification-number/

koblas avatar Apr 05 '23 07:04 koblas

The BSN uses something called Elfproef is Dutch for 11-proof, while the TIN uses the checksum with weights.

The elfproef uses mod 11 and checks if its 0. While the checksum method uses the checkdigit for validation.

Something I found here: https://www.npmjs.com/package/elfproef, https://github.com/MrLuit/elfproef/blob/master/src/index.ts

They both seem to produce same results but are different methods to get there. I don't understand how that works.

https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Netherlands-TIN.pdf

Microsoft has them both 9 digits, except BSN is with space format, and TIN no spaces https://learn.microsoft.com/en-us/microsoft-365/compliance/sit-defn-netherlands-tax-identification-number?view=o365-worldwide https://learn.microsoft.com/en-us/microsoft-365/compliance/sit-defn-netherlands-citizens-service-number?view=o365-worldwide

teebu avatar Apr 06 '23 18:04 teebu

Fliping this around. What are you looking for, the "problem" with OECD is that it only lists the identification number (BSN) for individuals. I think you're fishing for the entity (corporation) tax identifier. This article might help.

https://business.gov.nl/starting-your-business/registering-your-business/lei-rsin-vat-and-kvk-number-which-is-which/

It might be that you're looking for the RSIN Rechtspersonen en Samenwerkingsverbanden Identificatie Nummer.

koblas avatar Apr 23 '23 09:04 koblas