Errors
All API errors are returned in JSON format.
Special attribute code
contains a code with a business error if there is any.
When an error is generic or unexpected this attribute will contain a common code from a table in the next section.
Example Error
{
"status": 400,
"timestamp": "2022-02-04T18:08:53Z",
"code": "ExpiredAtInvalid",
"message": "The provided expiredAt timestamp points to the moment in the past"
}
Status codes
Here is a list of the different categories of status codes returned by the API. Use these to understand if a request was successful.
- Name
2xx
- Description
A 2xx status code indicates a successful response.
- Name
4xx
- Description
A 4xx status code indicates a client error.
- Name
5xx
- Description
A 5xx status code indicates a server error — hopefully you won't be seeing these.
Generic Errors
Generic errors can be returned from any endpoint.
Code | HTTP Code | Description |
---|---|---|
BadRequest | 400 | Problem with request data |
Unauthorized | 401 | Invalid credentials |
Forbidden | 403 | Access to a resource is forbidden |
NotFound | 404 | Resource not found |
TooManyRequests | 429 | Client is making too many requests |
ServiceUnavailable | 503 | Some service on a backend is not available |
PartnerApiKeyIsInvalid | 400 | Api Key is related to the wrong network type |
FeatureNotSupported | 400 | Requested feature is not supported or disabled |
UnsupportedNetwork | 400 | Provided Network code is not known or network is disabled by a merchant |
AssetNotSupported | 400 | Provided token code is not known or the network is disabled by a merchant |
InvalidDltAddress | 400 | Blockchain address provided has incorrect format |
TransactionHashNotFound | 400 | The transaction hash provided is not found in the blockchain |
BlockchainNotAvailable | 400 | The blockchain network is not available or a timeout on the RPC call occurred |
BlockchainError | 400 | The blockchain interaction has failed for some reason, retry the call |
InvalidDestination | 400 | Merhant wallet smart contract has an invalid address, contact support |
Payments Errors
Code | HTTP Code | Description |
---|---|---|
PaymentExpiresAtInvalid | 400 | The Payment expire date is invalid |
PaymentAmountInvalid | 400 | The payment amount cannot be parsed due to the value or token code error |
PaymentDuplicateAmounts | 400 | Aux amounts has duplicates values |
PaymentAmountNotSupported | 400 | Provided token code is not known or the network is disabled by a merchant |
PaymentInconsistentAsset | 400 | Aux amounts attribute has token codes from the different networks |
PaymentNotFound | 400 | Payment not found |
PaymentMetadataSizeExceeded | 400 | Metadata attribute is too big |
CompensationDisabled | 400 | The gas compensation feature is disabled by a merchant |