AkiliPay
Errors & Status Codes

Structured Error Catalog

AkiliPay returns predictable, machine-readable JSON envelopes with RFC-compliant HTTP status codes.

Standard Error Envelope

Every failed request returns a JSON response containing a unique code, human-readable message, and an audit requestId to facilitate debugging.

Client Handling Rule:

Check the error.code rather than parsing HTTP message strings, as codes remain stable across API versions.

Error Response Structure
json
{
  "status": "error",
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The amountMinor must be a positive integer in pesewas.",
    "details": [
      {
        "field": "amountMinor",
        "issue": "Expected integer >= 1"
      }
    ]
  },
  "meta": {
    "requestId": "req_01928a81f3",
    "timestamp": "2026-11-19T10:00:00.000Z"
  }
}
Uniform across all endpoints.

Standard Error Code Reference

Error CodeHTTP StatusMeaning / CauseSuggested Remediation
INVALID_REQUEST400Validation failed or missing required fields.Inspect error.details array and fix parameters.
UNAUTHORIZED401Missing or invalid Bearer secret API key.Verify Authorization header and environment key.
FORBIDDEN403API key is missing the required permission scope.Update key permissions in API Keys dashboard.
RESOURCE_NOT_FOUND404The requested entity ID was not found.Check transaction or payment ID spelling.
IDEMPOTENCY_CONFLICT409Re-used Idempotency-Key with different payload parameters.Generate a unique key per distinct operation.
INSUFFICIENT_FUNDS422Customer wallet balance too low to complete charge.Prompt customer to fund wallet or use another method.
PROVIDER_UNAVAILABLE502Upstream payment rail (telco/bank) is temporarily down.Retry safely with exponential backoff.
RATE_LIMITED429Exceeded API request threshold.Throttle client requests and implement backoff.