How do I validate organisationsnummer for B2B customers?
Categories:
Magento Developer Sweden
Organisationsnummer (org-no) is the 10-digit Swedish company-registration number issued by Bolagsverket. It’s the core identifier for B2B trade-account onboarding — without a valid one, you can’t reverse-charge VAT for cross-border EU B2B or apply Net-30 invoice terms.
Three layers of validation in Magento:
- Format check — 10 digits, with checksum (Luhn-like algorithm). We add a custom
customer_addressattribute with regex + checksum validator. - Bolagsverket lookup (free + paid APIs available) — verify the org-no matches an active Swedish company name. Vainu, Roaring, Creditsafe APIs.
- VIES VAT-number lookup — for cross-border EU B2B reverse charge, Magento checks the VAT-equivalent SE-prefixed number via VIES.
Standard pattern: gate the trade-account registration form behind org-no validation, then auto-apply Net-30 + customer-segment pricing on approval. BankID adds a fourth layer of identity proof for the contract signer.
Was this helpful?