How to register for UK VAT
The Easy Digital Downloads EU VAT plugin integrates with Vatsense to validate UK VAT numbers. To allow customers to validate their UK VAT numbers during checkout, you must register for UK VAT and obtain a Vatsense API key.
Full instructions are provided below.
Step 1: Register for UK VAT
Register for UK VAT so that you can submit tax returns and make payments for the tax that you collect from UK customers. This will give you a UK VAT number which you can enter in the Easy Digital Downloads EU VAT plugin settings so that it appears on invoices.
Step 2: Get Your Vatsense API Key
To enable VAT number validation on your checkout page, you need to connect your site to the Vatsense API. Follow the steps below:
Create a Vatsense Account
- Go to Vatsense and create an account.
- Once logged in, navigate to your account dashboard.
Generate Your API Key
- In your Vatsense dashboard, find the section with the API key.
- Copy the API key and keep it safe.
Step 3: Enter Your API Key in WordPress
- In your WordPress admin panel, go to: Downloads → Extensions → EU VAT → UK VAT
- Enter your Vatsense API Key in the designated field.
- Save your settings.
Once the Vatsense API key is saved, your checkout will be able to validate UK VAT numbers in real time using the Vatsense service.
Optional: Define Your API Key via wp-config.php
If you prefer to keep your API key out of the database entirely, you can define it as a constant in your wp-config.php file. Open the file and add the following line above the /* That's all, stop editing! */ comment:
define( 'EUVAT_VATSENSE_API_KEY', 'your-api-key-here' );
Replace your-api-key-here with the API key you copied from your Vatsense dashboard. When this constant is defined, the plugin will use it automatically and ignore any value saved in the settings page. This is the most secure option as the key is never stored in the database.