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 Code | Status | Description |
---|---|---|
200 | OK | Request processed successfully |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid request format in headers, query parameters, or body |
401 | Unauthorized | Authentication required or failed |
403 | Forbidden | Authentication successful but access denied |
404 | Not Found | Requested resource doesn't exist (e.g. requesting data on an account that does not exist) |
412 | Precondition Failed | Concurrency token in If-Match header is invalid |
413 | Payload Too Large | Request or response size exceeds limits |
415 | Unsupported Media Type | Invalid content type in Accept header |
500 | Internal Server Error | Unexpected 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, andelementIndex
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
Updated 3 months ago
What’s Next