Error Codes
All machine readable error codes returned by the Access API, grouped by category.
Every API error response includes a code field that identifies the specific failure. Use it to handle errors programmatically without parsing the message string.
{
"error": {
"type": "invalid_request_error",
"code": "not_found",
"message": "Customer not found.",
"doc_url": "https://docs.tryaccess.xyz/docs/errors/not_found"
}
}The doc_url in every error response links directly to the page for that code.
Input / Validation
Errors caused by malformed or missing request fields.
| Code | HTTP | Description |
|---|---|---|
parameter_missing | 400 | A required field was not provided |
parameter_invalid | 400 | A field value failed validation |
parameter_unknown | 400 | An unrecognised field was sent |
invalid_psp | 400 | The specified PSP is not recognised |
Resource State
Errors caused by the current state of a resource.
| Code | HTTP | Description |
|---|---|---|
not_found | 404 | The requested resource does not exist |
duplicate | 409 | A resource with the same identifier already exists |
invalid_state | 400 | The action is not allowed in the current resource state |
already_paid | 400 | The invoice is already marked as paid |
already_voided | 400 | The invoice has already been voided |
subscription_already_canceled | 400 | The subscription is already canceled or scheduled to cancel |
Auth
Errors related to API key authentication and permissions.
| Code | HTTP | Description |
|---|---|---|
unauthorized | 401 | API key is missing or invalid |
forbidden | 403 | API key does not have permission for this action |
key_generation_failed | 500 | Failed to generate an API key |
Verification Pipeline
Errors from the payment receipt verification pipeline.
| Code | HTTP | Description |
|---|---|---|
verification_failed | 400 | Payment could not be verified |
tx_ref_not_found | 404 | Transaction reference not found at the PSP |
image_fetch_failed | 400 | Could not retrieve the receipt image |
image_extraction_failed | 400 | Could not extract data from the receipt image |
extraction_failed | 400 | Data extraction from the receipt failed |
date_parse_failed | 400 | Could not parse the date from the receipt |
empty_input | 400 | No input was provided for verification |
Upstream / PSP
Errors from bank or PSP integrations.
| Code | HTTP | Description |
|---|---|---|
bank_fetch_failed | 502 | Failed to fetch transaction data from the bank or PSP |
bank_url_build_failed | 500 | Could not construct the request URL for the PSP |
unsupported_psp | 400 | The specified PSP is not supported |
Upstream / Crypto
Errors from crypto payment and payout operations.
| Code | HTTP | Description |
|---|---|---|
crypto_payment_failed | 502 | A crypto payment operation could not be completed |
crypto_payout_failed | 502 | A crypto payout could not be processed |
crypto_currency_unavailable | 502 | The requested crypto currency is not available |
crypto_estimate_failed | 502 | The conversion estimate could not be calculated |
crypto_ipn_invalid | 400 | The crypto payment webhook signature is invalid |
Database
| Code | HTTP | Description |
|---|---|---|
db_error | 500 | A database operation failed |
Fallback
| Code | HTTP | Description |
|---|---|---|
internal_error | 500 | An unexpected internal error occurred |
How is this guide?