API documentation
VAT Calculation API
A planned API that returns VAT-inclusive and VAT-exclusive values for amounts and invoice line items at the South African standard VAT rate. The API is in development; the documentation below is an illustrative example and may change before release.
In development. This API is not yet live. The documentation below is an illustrative example of the planned interface and may change before release.
Overview
- Status
- Coming Soon
- Version
- v1 (in development)
- Base URL
- https://api.letacom.co.za (planned)
Authentication
API key in the Authorization header (Bearer). Keys are issued after an access request is approved. Store keys on your server and never expose them in client-side code.
Authorization: Bearer YOUR_API_KEYPOST
/v1/vat/calculate
Calculate VAT for one amount.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| amount* | body | number | Amount in ZAR. |
| mode* | body | "inclusive" | "exclusive" | Whether the amount already includes VAT. |
curl -X POST https://api.letacom.co.za/v1/vat/calculate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": 1150.00, "mode": "inclusive" }'{
"currency": "ZAR",
"rate": 0.15,
"net": 1000.00,
"vat": 150.00,
"gross": 1150.00
}Usage requirements
- HTTPS only
- Rate limits and pricing will be published at release
- Do not send personal information to this API
{
"error": {
"code": "invalid_request",
"message": "amount must be a positive number"
}
}