Billing
Overview
Billing endpoints expose billing-related information for the authenticated partner.
Authentication and access control
All Public API billing endpoints require an OAuth2 bearer token:
Authorization: Bearer <your_api_key>
Important: External partners can only access their own data. If you attempt to query another partner’s data, the API will return 403 Forbidden.
Get Available Balance
What it does
Returns the partner’s available balance, calculated as the sum of transaction amounts.
This is commonly used to display a “current available balance” and to check whether you have enough balance before starting work.
Endpoint
GET /api/v1/billing/{partnerUUID}/balance
Path parameter
partnerUUID(required): Your partner UUID.
Example request
curl -X GET "https://sandboxapi.efica.co.za/api/v1/billing/123e4567-e89b-12d3-a456-426614174000/balance" \
-H "Authorization: Bearer <your_api_key>"
Example response (200)
{
"balance": 1234.56
}
Common error responses
- 401 Unauthorized: Missing or invalid API key / token.
- 403 Forbidden: The
partnerUUIDdoes not match the partner linked to your API key / token. - 404 Not Found: The partner UUID does not exist.