Error handling

The API uses standard HTTP response codes to indicate the status of requests:

  • 2xx codes indicate successful operations
  • 4xx codes indicate endpoint-specific errors
  • 5xx codes indicate server-side errors

HTTP Status Codes

HTTP CodeStatusDescription
200OKRequest processed successfully
201CreatedResource created successfully
400Bad RequestInvalid request format in headers, query parameters, or body
401UnauthorizedAuthentication required or failed
403ForbiddenAuthentication successful but access denied
404Not FoundRequested resource doesn't exist (e.g. requesting data on an account that does not exist)
412Precondition FailedConcurrency token in If-Match header is invalid
413Payload Too LargeRequest or response size exceeds limits
415Unsupported Media TypeInvalid content type in Accept header
500Internal Server ErrorUnexpected server-side error

Error Response Format

When a 400 - Bad request error occurs, the API returns a structured error response. The format varies depending on the type of operation:

Standard Operations (e.g. single payment initiation)

For most API operations, error responses include:

{
  "propertyName": "string",     // Name of the field causing the error (if applicable)
  "errorCode": "string",        // Unique error identifier
  "errorDescription": "string"  // Human-readable error message
}

Bulk Operations (e.g. bulk payment initiation)

For operations involving multiple items (e.g., bulk file processing), error responses provide additional context:

{
  "fieldIndex": "number",       // Index of the field in error
  "elementIndex": "number",     // Index of the element in the collection (1-based)
  "errorCode": "string",        // Unique error identifier
  "errorDescription": "string"  // Human-readable error message
}

Example: In a bulk payment file, fieldIndex would indicate which field failed validation, and elementIndex would indicate which record in the file contained the error.

Note: The first item in a list is number 1, and empty lines are not counted


What’s Next