API Documentation
Integrate TaxHQ tax calculations into your applications. Our API provides programmatic access to Nigerian tax calculations based on the Nigeria Tax Act 2025. All endpoints are free to use.
Base URL
https://staging.taxhq.ng/apiQuick Start
# Calculate PIT for ₦5,000,000 annual income
curl -X POST https://staging.taxhq.ng/api/tax/calculate/pit \
-H "Content-Type: application/json" \
-d '{"grossIncome": 5000000}'Endpoints
/tax/validate-tinValidate TIN
Validate Nigerian Tax Identification Number format
Parameters
tinstring (required) - TIN to validate (format: XXXXXXXX-XXXX)typestring (optional) - Type: 'individual' or 'company'Request Example
{
"tin": "12345678-0001",
"type": "company"
}Response Example
{
"valid": true,
"tin": "12345678-0001",
"type": "company",
"format": "Valid format for company TIN",
"checkDigitValid": true
}/tax/calculate/pitCalculate PIT
Calculate Personal Income Tax based on Nigeria Tax Act 2025
Parameters
grossIncomenumber (required) - Annual gross income in NairapensionContributionnumber (optional) - Annual pension contributionnhfContributionnumber (optional) - NHF contributionvoluntaryPensionnumber (optional) - Voluntary pension savingslifeInsurancenumber (optional) - Life insurance premiumRequest Example
{
"grossIncome": 5000000,
"pensionContribution": 400000,
"nhfContribution": 125000
}Response Example
{
"grossIncome": 5000000,
"consolidatedRelief": 1200000,
"pensionRelief": 400000,
"nhfRelief": 125000,
"totalReliefs": 1725000,
"taxableIncome": 3275000,
"taxPayable": 447000,
"effectiveRate": 8.94,
"netIncome": 4153000,
"brackets": [
{ "bracket": "First ₦800,000", "rate": 0, "tax": 0 },
{ "bracket": "Next ₦2,000,000", "rate": 15, "tax": 300000 },
{ "bracket": "Remaining ₦475,000", "rate": 18, "tax": 85500 }
]
}/tax/calculate/vatCalculate VAT
Calculate Value Added Tax at 7.5%
Parameters
amountnumber (required) - Amount to calculate VAT oninclusiveboolean (optional) - Whether amount includes VAT (default: false)Request Example
{
"amount": 100000,
"inclusive": false
}Response Example
{
"amount": 100000,
"vatRate": 7.5,
"vatAmount": 7500,
"totalWithVat": 107500,
"priceWithoutVat": 100000
}/tax/calculate/citCalculate CIT
Calculate Corporate Income Tax based on company size
Parameters
turnovernumber (required) - Annual turnover in Nairaprofitnumber (required) - Taxable profit in NairaRequest Example
{
"turnover": 80000000,
"profit": 15000000
}Response Example
{
"turnover": 80000000,
"profit": 15000000,
"companySize": "medium",
"citRate": 20,
"citAmount": 3000000,
"educationTax": 375000,
"totalTax": 3375000,
"effectiveRate": 22.5
}/tax/reliefsGet Tax Reliefs
Get list of all tax reliefs and exemptions
Parameters
categorystring (optional) - Filter by category (personal, business, investment, sector)Request Example
GET /api/tax/reliefs?category=personalResponse Example
{
"reliefs": [
{
"id": "cra",
"name": "Consolidated Relief Allowance",
"category": "personal",
"description": "20% of gross income + ₦200,000",
"eligibility": "All taxpayers",
"maxAmount": null
},
...
],
"total": 50
}/tax/deductionsGet Deductions
Get eligible deductions based on user profile
Parameters
incomenumber (required) - Annual incomehasChildrenboolean (optional) - Has dependent childrenhasDisabilityboolean (optional) - Has disabilityhasMortgageboolean (optional) - Paying mortgageRequest Example
GET /api/tax/deductions?income=5000000&hasChildren=trueResponse Example
{
"deductions": [
{
"name": "Child Education Allowance",
"amount": 200000,
"description": "Deduction for children's school fees"
},
...
],
"totalPotentialSavings": 450000
}B2B Automation APIs
Enterprise-grade APIs for automating payroll, WHT, and VAT compliance workflows.
/b2b/payrollPayroll API
Batch process PAYE calculations for multiple employees. Returns individual breakdowns and employer summary.
Available Actions
action: "calculate"Calculate Batch
Process PAYE for multiple employees at once
action: "payslips"Generate Payslips
Generate payslip data for employees
action: "paye-schedule"PAYE Schedule
Generate FIRS-ready PAYE schedule for filing
Request Example
{
"action": "calculate",
"employer": {
"name": "Your Company Ltd",
"tin": "12345678-0001"
},
"employees": [
{
"id": "EMP001",
"name": "John Doe",
"grossSalary": 500000,
"pensionContribution": 40000,
"nhfContribution": 12500
},
{
"id": "EMP002",
"name": "Jane Smith",
"grossSalary": 750000,
"pensionContribution": 60000,
"nhfContribution": 18750
}
],
"payPeriod": "2026-01"
}Response Example
{
"success": true,
"data": {
"employees": [
{
"id": "EMP001",
"name": "John Doe",
"grossSalary": 500000,
"paye": 41250,
"pension": 40000,
"nhf": 12500,
"netSalary": 406250
},
...
],
"summary": {
"totalGross": 1250000,
"totalPaye": 98750,
"totalPension": 100000,
"totalNhf": 31250,
"totalNet": 1020000,
"employeeCount": 2
}
}
}/b2b/whtWHT Automation
Automate Withholding Tax calculations, certificate generation, and FIRS schedule preparation
Available Actions
action: "process"Process Payments
Generate WHT certificates for batch payments
action: "firs-schedule"FIRS Schedule
Generate FIRS-ready WHT schedule for filing
action: "estimate"Estimate WHT
Estimate WHT amounts for budgeting
action: "validate-tin"Validate TIN
Validate vendor TIN format
Request Example
{
"action": "process",
"payer": {
"name": "Your Company Ltd",
"tin": "12345678-0001",
"address": "Lagos, Nigeria"
},
"payments": [
{
"id": "PAY-001",
"paymentDate": "2026-01-15",
"vendor": {
"name": "ABC Consultants",
"tin": "87654321-0001"
},
"invoice": {
"number": "INV-001",
"description": "Consulting services"
},
"category": "professional_fees",
"grossAmount": 500000,
"isNonResident": false
}
]
}Response Example
{
"success": true,
"data": {
"certificates": [...],
"summary": {
"totalGrossAmount": 500000,
"totalWhtAmount": 50000,
"totalNetAmount": 450000,
"paymentCount": 1
}
}
}WHT Categories & Rates
/b2b/vatVAT Compliance
Validate VAT invoices, check claimability, and prepare VAT returns
Available Actions
action: "validate"Validate Invoice
Validate a single VAT invoice for compliance
action: "validate-batch"Batch Validation
Validate multiple invoices at once
action: "prepare-return"Prepare Return
Prepare VAT return data for filing
action: "validate-tin"Validate TIN
Validate supplier TIN and VAT registration
Request Example
{
"action": "validate",
"invoice": {
"invoiceNumber": "INV-2026-001",
"invoiceDate": "2026-01-15",
"supplierName": "ABC Suppliers Ltd",
"supplierTin": "12345678-0001",
"buyerName": "Your Company Ltd",
"lineItems": [
{
"description": "Office supplies",
"quantity": 10,
"unitPrice": 5000
}
]
}
}Response Example
{
"success": true,
"data": {
"isValid": true,
"vatClaimable": true,
"calculations": {
"subtotal": 50000,
"vatAmount": 3750,
"total": 53750
},
"warnings": []
}
}VAT Information
Standard Rate: 7.5%
Exempt: Medical products, Basic food, Educational materials
Rate Limits & Usage
Free Tier
- - 1000 requests per day
- - No authentication required
- - All endpoints available
Response Format
- - All responses are JSON
- - Errors include message field
- - Amounts are in Naira (₦)
Error Handling
// Error Response Format
{
"error": true,
"message": "grossIncome is required",
"code": "VALIDATION_ERROR"
}
// HTTP Status Codes
// 200 - Success
// 400 - Bad Request (invalid parameters)
// 429 - Rate Limit Exceeded
// 500 - Server ErrorCode Examples
JavaScript / TypeScript
const response = await fetch(
'https://staging.taxhq.ng/api/tax/calculate/pit',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
grossIncome: 5000000,
pensionContribution: 400000,
}),
}
);
const result = await response.json();
console.log(result.taxPayable);Python
import requests
response = requests.post(
'https://staging.taxhq.ng/api/tax/calculate/pit',
json={
'grossIncome': 5000000,
'pensionContribution': 400000,
}
)
result = response.json()
print(result['taxPayable'])