vat: Norway business needs a validated number, fill the EU table #117

Stängd
öppnade 2026-10-08 21:12:28 +00:00 av supernaut · 0 kommentarer
Ägare

What

resolveVat in src/vat.ts is inconsistent for Norway and incomplete for the EU.

Why

  • EU countries need vatNumberValidated for reverse charge. Norway does not.
  • EU_VAT_RATES has 5 of 27 states. Any other throws Unsupported country.
  • Norway's 25% is a literal 2500, separate from SE_RATE_BPS.

Only Sweden is reachable today. This blocks selling anywhere else.

Failing case

resolveVat({country: "NO", isBusiness: true, vatNumberValidated: false}) returns 0% reverse charge. Only the validated case is tested.

Fix

  • Require isBusiness && vatNumberValidated for Norway reverse charge. Otherwise treat as B2C.
  • Name a Norway rate constant.
  • Add the other EU rates once the rates are confirmed.

Done when

  • An unvalidated Norwegian business gets the VOEC rate, with a test.
  • The table lists all 27 states, with a test that each resolves.
## What `resolveVat` in `src/vat.ts` is inconsistent for Norway and incomplete for the EU. ## Why - EU countries need `vatNumberValidated` for reverse charge. Norway does not. - `EU_VAT_RATES` has 5 of 27 states. Any other throws `Unsupported country`. - Norway's 25% is a literal `2500`, separate from `SE_RATE_BPS`. Only Sweden is reachable today. This blocks selling anywhere else. ## Failing case `resolveVat({country: "NO", isBusiness: true, vatNumberValidated: false})` returns 0% reverse charge. Only the validated case is tested. ## Fix - Require `isBusiness && vatNumberValidated` for Norway reverse charge. Otherwise treat as B2C. - Name a Norway rate constant. - Add the other EU rates once the rates are confirmed. ## Done when - [ ] An unvalidated Norwegian business gets the VOEC rate, with a test. - [ ] The table lists all 27 states, with a test that each resolves.
supernaut lade till detta till projektet Bitborg Payment 2026-10-08 21:14:09 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment#117
Ingen beskrivning angiven.