Overview
The FINEXA API allows developers to programmatically access and manage payroll, accounting, HR, and compliance data. Built with REST principles, it returns JSON responses and uses standard HTTP methods.
Base URL: https://api.finexa.co.za/v1/
Version: v1 (latest)
Data Format: JSON
Authentication
All API requests require an API key. You can obtain your API key from the FINEXA dashboard under Settings → API Keys.
Headers:
Content-Type: application/json
Body:
{
"api_key": "your_api_key_here"
}
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600
}
Include the access token in subsequent requests:
Base URL
All endpoints are relative to:
Example full URL: https://api.finexa.co.za/v1/companies
Rate Limiting
API requests are limited to 100 requests per minute per API key. If exceeded, you will receive a 429 Too Many Requests response.
Response headers include:
X-RateLimit-Limit– requests allowed per minuteX-RateLimit-Remaining– remaining requests in current windowX-RateLimit-Reset– time until limit resets (UTC epoch seconds)
Error Handling
FINEXA API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request – missing or invalid parameters |
| 401 | Unauthorized – invalid or missing API key/token |
| 403 | Forbidden – insufficient permissions |
| 404 | Not Found |
| 429 | Too Many Requests – rate limit exceeded |
| 500 | Internal Server Error |
Error responses include a JSON body with details:
"error": {
"code": "invalid_parameter",
"message": "The 'email' field must be a valid email address."
}
}
API Endpoints
Companies
/companies – List all companies
/companies/{id} – Get a specific company
/companies – Create a new company
/companies/{id} – Update a company
/companies/{id} – Delete a company
Example Request (Create Company):
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Acme (Pty) Ltd",
"tax_id": "1234567890",
"vat_number": "ZA1234567890",
"email": "finance@acme.co.za",
"phone": "011 123 4567",
"address": "123 Main Street, Sandton"
}
Employees
/companies/{company_id}/employees – List employees
/companies/{company_id}/employees – Add employee
/employees/{id} – Update employee
Invoices (Accounting)
/companies/{company_id}/invoices – List invoices
/companies/{company_id}/invoices – Create invoice
/invoices/{id}/pay – Record payment
Payroll
/companies/{company_id}/payroll/runs – List payroll runs
/companies/{company_id}/payroll/process – Run payroll
/employees/{id}/payslips – Get payslips for employee
Banking
/companies/{company_id}/bank-accounts – List bank accounts
/companies/{company_id}/transactions – Add transaction
Webhooks
FINEXA can send real‑time notifications to your server when events occur (e.g., invoice paid, payroll completed).
Register a webhook URL via the dashboard. We will send a POST request with a JSON payload.
Example payload (invoice.paid):
"event": "invoice.paid",
"timestamp": "2025-04-20T10:30:00Z",
"data": {
"invoice_id": 12345,
"customer_name": "ABC Corp",
"amount": 15000.00
}
}
To verify authenticity, FINEXA includes a signature header: X-FINEXA-Signature. Validate using your webhook secret.
SDKs & Libraries
Official SDKs are available for popular languages:
- PHP:
composer require finexa/api-php - Python:
pip install finexa-api - Node.js:
npm install finexa-sdk - Java: Maven central –
com.finexa:api-client
Example using PHP SDK:
$company = $finexa->companies()->create([
'name' => 'Acme (Pty) Ltd',
'tax_id' => '1234567890'
]);
Support
Need help integrating? Contact our developer support team:
- Email: api@finexa.co.za
- Developer Portal: developers.finexa.co.za
- Status Page: status.finexa.co.za