AfroVAT API

VAT/GST calculation for all 54 African countries. Add VAT to a net amount or extract VAT from a gross amount.

Overview

The AfroVAT API calculates Value Added Tax (VAT) and Goods & Services Tax (GST) based on each country's current rates. It supports both adding VAT to a net amount and extracting the VAT component from a VAT-inclusive amount.

Calculation Modes

ModeDescription
addAdd VAT to a net (VAT-exclusive) amount. Returns gross amount and VAT component.
extractExtract VAT from a gross (VAT-inclusive) amount. Returns net amount and VAT component.

Key Features

  • 54 Countries — All African nations with their current VAT/GST rates
  • Add & Extract — Add VAT to net amounts or extract from inclusive prices
  • Multiple Rates — Standard, reduced, and zero rates per country
  • Category Support — Food, medical, education, digital, and export categories
  • Auto-updated — Rates updated within 30 days of legislative changes

Sample VAT Rates

CountryStandard Rate
Nigeria (NG)7.5%
Kenya (KE)16.0%
South Africa (ZA)15.0%
Ghana (GH)15.0%
Egypt (EG)14.0%
Tanzania (TZ)18.0%
Morocco (MA)20.0%
Ethiopia (ET)15.0%

Endpoints

Base URL
https://afrotools.com/api/vat

Quick Example — Add Mode
# Add VAT to 100,000 NGN curl -X POST https://afrotools.com/api/vat \ -H "x-api-key: afro_test_abc123" \ -H "Content-Type: application/json" \ -d '{ "country": "NG", "amount": 100000, "mode": "add" }'

Response — Add Mode
{ "success": true, "data": { "country": "NG", "country_name": "Nigeria", "currency": "NGN", "mode": "add", "net_amount": 100000, "vat_rate": 7.5, "vat_amount": 7500, "gross_amount": 107500, "rate_type": "standard", "updated": "2026-01-01" } }

Quick Example — Extract Mode
# Extract VAT from 107,500 NGN curl -X POST https://afrotools.com/api/vat \ -H "x-api-key: afro_test_abc123" \ -H "Content-Type: application/json" \ -d '{ "country": "NG", "amount": 107500, "mode": "extract" }'
{ "success": true, "data": { "country": "NG", "country_name": "Nigeria", "currency": "NGN", "mode": "extract", "net_amount": 100000, "vat_rate": 7.5, "vat_amount": 7500, "gross_amount": 107500, "rate_type": "standard", "updated": "2026-01-01" } }