Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ecrypt.com/llms.txt

Use this file to discover all available pages before exploring further.

Error codes indicate whether an API request succeeded or failed. When a payment flow fails, the error code tells you what went wrong and helps you resolve the issue.

HTTP Error Codes

CodeStatusDescription
200OKThe request succeeded.
400Bad RequestThe request was unacceptable, often due to a missing or invalid parameter.
401UnauthorizedNo valid API key was provided.
402Request FailedThe parameters were valid but the request failed.
403ForbiddenThe API key does not have permission to perform this request.
404Not FoundThe requested resource does not exist.
409ConflictThe request conflicts with another request, such as a duplicate idempotency key.
429Too Many RequestsToo many requests were sent in a short period. Use exponential backoff when retrying.
500, 502, 503, 504Server ErrorSomething went wrong on ECRYPT’s end. These are rare. If the issue persists, contact support.

Error Objects

When a request fails, the response body includes an errors array with details about what went wrong.
{
  "requestId": "abc123",
  "errors": [
    {
      "type": "VALIDATION",
      "message": "The amount field is required."
    }
  ]
}
FieldTypeDescription
requestIdstringA unique identifier for the request. Include this when contacting support.
errors[].typestringThe category of error.
errors[].messagestringA description of what went wrong.

Errors Handling Guidelines

400 errors are caused by your request. Check that all required fields are present and that values match the expected types and formats. 401 and 403 errors indicate an authentication or permissions issue. Verify that you are using the correct API key for the environment and that the key has the necessary access level. 429 errors mean you have exceeded the rate limit. Implement exponential backoff so your retry attempts increase in wait time with each failed attempt rather than hammering the API repeatedly. 5xx errors originate on ECRYPT’s servers. Retry the request using exponential backoff. If the issue persists, contact ECRYPT support.