UK VAT for Custom Online Stores 2026: Setup Guide
Whether you’ve built on Node.js, PHP, Django, Rails, or a headless CMS with a custom checkout, you have full control over your store — but you also have full responsibility for tax compliance. There’s no built-in VAT toggle to flip. You need to implement tax calculation, storage, and invoicing yourself (or integrate a service that does it). Here’s what you need to build.
1. Implement Tax Calculation at Checkout
Section titled “1. Implement Tax Calculation at Checkout”VAT must be calculated at the point of checkout for every order. The basics:
- Standard rate: 20% on most goods and services
- Zero rate: 0% on children’s clothing, most food, books, periodicals, and some medical products
- Exempt: Financial services, education, health — not relevant for most e-commerce
For a UK-only store, the simplest approach:
net_price = product_price_ex_vat
vat_amount = net_price * 0.20 # for standard-rated goods
total = net_price + vat_amount
If you offer VAT-inclusive pricing (where the listed price already includes VAT):
vat_amount = listed_price / 6 # VAT at 20% = 1/6 of the VAT-inclusive price
net_price = listed_price - vat_amount
Your checkout UI should show customers:
- Subtotal (net, excluding VAT)
- VAT amount (at what rate)
- Total (gross, including VAT)
Display your VAT registration number on the checkout page and on receipts.
2. Store VAT Data Per Order
Section titled “2. Store VAT Data Per Order”Every order in your database should record:
net_amount— the pre-VAT price of each line itemvat_rate— the rate applied (20%, 0%, or exempt)vat_amount— the actual VAT chargedgross_amount— the total the customer paidvat_number— your VAT registration number (for generating invoices)order_date— the tax point (when VAT liability arose)
Don’t just store the gross amount and try to reverse-calculate the VAT later. Rates change, products move between categories, and reverse-calculation introduces rounding errors. Store the components at the time of sale.
3. Display VAT on Receipts and Invoices
Section titled “3. Display VAT on Receipts and Invoices”Your order confirmation emails and receipts must show, at minimum (for simplified B2C receipts on orders under £250):
- Your business name and address
- Your VAT registration number
- The date
- Description of goods
- The VAT rate applied
- Total including VAT
For B2B orders and orders over £250, you need full VAT invoices with additional fields — see Step 5 of the checklist.
A simple receipt template (HTML):
<p>VAT Registration Number: GB123456789</p>
<table>
<tr><td>Net amount</td><td>£25.00</td></tr>
<tr><td>VAT (20%)</td><td>£5.00</td></tr>
<tr><td><strong>Total</strong></td><td><strong>£30.00</strong></td></tr>
</table>
4. Why a Tax API Is Better Than Hardcoding Rates
Section titled “4. Why a Tax API Is Better Than Hardcoding Rates”Hardcoding 0.20 works for a UK-only store — until:
- You start shipping to the EU (different rates per country, IOSS rules)
- The UK changes a VAT rate (it’s happened before)
- You need to apply reduced rates to specific product categories
- You need to handle place-of-supply rules for digital services
A tax calculation API handles all of this automatically. Options:
- GoodVat API — purpose-built for UK and EU VAT, lightweight
- Avalara AvaTax — enterprise-grade, handles global tax, expensive
- TaxJar — US-centric but has UK/EU support
- Stripe Tax — if you use Stripe for payments, this is the simplest add-on
The API integration is typically: send the product, customer country, and sale amount → receive back the applicable VAT rate and amount. The rate is always current. You don’t maintain a rate table.
5. Connect to MTD-Compatible Software
Section titled “5. Connect to MTD-Compatible Software”Your custom store won’t connect out-of-the-box to Xero, QuickBooks, or FreeAgent via a plugin — you’ll need to build the integration yourself, or export order data in a format your accounting software accepts.
Options:
- CSV export + manual import — low effort, works fine at low volume
- Accounting API integration — build a webhook that posts each order to Xero/QuickBooks as an invoice; both have REST APIs
- Google Sheets + Zapier/Make — no-code bridge that can pull orders and format them for accounting review
Whatever you use, make sure the VAT breakdown (net, VAT, gross) flows through to your accounting software — it needs those figures for your VAT return.
This is Step 4 of the UK VAT Setup Checklist. Continue to Step 5: set up invoicing →