BetaYou're exploring an early version of tPay365. Features and content may change as we refine the experience.

Error Codes

All API errors follow a consistent format. Use the error code and request ID for debugging and support requests.

Error Response Format

Error response
json
{
  "error": "validation_error",
  "message": "Field 'gross_pay' must be a positive integer.",
  "request_id": "req_abc123def456",
  "details": [
    { "field": "gross_pay", "code": "invalid_type", "expected": "integer" }
  ]
}

HTTP Status Codes

StatusCodeDescription
400bad_requestInvalid JSON, missing fields, or malformed request
401unauthorizedInvalid API key or expired token
403forbiddenAPI key lacks required scope or permission
404not_foundResource does not exist
409conflictResource already exists or state conflict
422validation_errorRequest body fails schema validation
429rate_limitedRate limit exceeded, check headers
500internal_errorServer error — contact support with request_id

Common Errors

Invalid API Key

Ensure your key starts with the correct prefix for your environment.

json
{
  "error": "unauthorized",
  "message": "Invalid or expired API key.",
  "request_id": "req_xyz789"
}

Missing Scope

Your API key or token lacks the required scope for this endpoint.

json
{
  "error": "forbidden",
  "message": "Missing required scope: write:vault",
  "request_id": "req_def456"
}