Vat
Magento\Customer\Model\Vat
What it does
This class handles VAT (Value Added Tax) validation and customer group assignment based on VAT numbers in Magento 2.
Developers use this class when implementing EU VAT number validation, automatically assigning customers to appropriate tax groups (domestic, intra-union, invalid, or error), or checking if a country is part of the EU.
It integrates with the European Commission's VIES service to validate VAT numbers in real-time.
Public Methods
- getMerchantCountryCode()
- getMerchantVatNumber()
- getCustomerGroupIdBasedOnVatNumber()
- checkVatNumber()
- canCheckVatNumber()
- getCustomerVatClass()
- isCountryInEU()