Developer Documentation

Integrate TaxNaija API into your application

Quick Start

🔑

Get API Key

Register and create an API key in your developer dashboard

📡

Make Requests

Use REST API endpoints to calculate taxes and compare systems

🚀

Deploy

Integrate tax calculations into your app or service

Authentication

Authorization: Bearer YOUR_API_KEY

All API requests require an Authorization header with your API key.
Get your key at https://developer.taxnaija.org/dashboard

Include your API key in the Authorization header of every request. Keep your API key secure and never expose it in client-side code.

API Endpoints

POST
/api/calculate

Calculate tax for a given income

Parameters:

incomereliefsdeductions
GET
/api/rates

Get current tax rates and thresholds

Parameters:

year
POST
/api/compare

Compare old vs new tax system

Parameters:

income

Code Examples

Calculate Tax

const response = await fetch('https://api.taxnaija.org/api/calculate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    income: 2500000,
    reliefs: 500000,
    deductions: 0
  })
});

const data = await response.json();
console.log(data.taxableIncome, data.taxLiability);

Get Tax Rates

const response = await fetch(
  'https://api.taxnaija.org/api/rates?year=2026',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const rates = await response.json();
console.log(rates.threshold, rates.progressiveRates);

Compare Tax Systems

const response = await fetch('https://api.taxnaija.org/api/compare', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    income: 2500000
  })
});

const comparison = await response.json();
console.log(comparison.oldTax, comparison.newTax, comparison.savings);

Response Format

{
  "success": true,
  "data": {
    "grossIncome": 2500000,
    "taxableIncome": 1800000,
    "taxableAfterRelief": 1300000,
    "taxLiability": 195000,
    "netIncome": 2305000,
    "effectiveTaxRate": "7.8%"
  },
  "timestamp": "2025-11-02T10:30:00Z"
}

Developer FAQ

Need Help?

Check out our complete documentation or reach out to our developer support team.