Possible errors
How the API reports errors and how to handle them.
Errors are returned as JSON. Identify the error by the HTTP status together with error.code. The message field is for display and is localized by accept-language — do not rely on its text in code.
Error format
HTTP statuses and codes
| HTTP | Code | Description |
|---|---|---|
| 400 | VALIDATION_FAILED | Request parameters failed validation. |
| 400 | INVALID_JSON | Invalid JSON in the request body. |
| 400 | QUERY_TOO_COMPLEX | The query is too complex. |
| 400 | PROJECT_DELETED | The project is deleted. |
| 400 | INVOICE_ADDRESS_GENERATION_FAILED | Failed to generate the invoice address. |
| 400 | INVOICE_COIN_UNAVAILABLE | The coin is not available for invoices. |
| 400 | INVOICE_CANCELLATION_NOT_ALLOWED | The invoice cannot be cancelled. |
| 400 | INVOICE_DESCRIPTION_INVALID | Invalid invoice description. |
| 400 | INVOICE_AMOUNT_INVALID | Invalid invoice amount. |
| 400 | INVOICE_AMOUNT_BELOW_MINIMUM | The amount is below the minimum. |
| 400 | INVOICE_AMOUNT_ABOVE_MAXIMUM | The amount is above the maximum. |
| 400 | INVOICE_RATE_UNAVAILABLE | No rate available for the coin. |
| 400 | PROJECT_STATIC_WALLET_INVALID | Invalid static wallet. |
| 400 | PROJECT_STATIC_WALLET_ASSET_UNAVAILABLE | The asset is not available for static wallets. |
| 400 | PROJECT_STATIC_WALLET_LIMIT_EXCEEDED | Static wallet limit exceeded. |
| 400 | PROJECT_ACCEPTED_COINS_UNAVAILABLE | Project coins are unavailable. |
| 400 | PROJECT_DEPOSIT_ASSET_UNAVAILABLE | The deposit asset is unavailable. |
| 400 | WITHDRAWAL_ASSET_UNAVAILABLE | The withdrawal asset is unavailable. |
| 400 | WITHDRAWAL_DESTINATION_INVALID | Invalid destination address. |
| 400 | WITHDRAWAL_AMOUNT_INVALID | Invalid withdrawal amount. |
| 400 | WITHDRAWAL_AMOUNT_BELOW_MINIMUM | The withdrawal is below the minimum. |
| 400 | WITHDRAWAL_BALANCE_INSUFFICIENT | Insufficient balance. |
| 400 | WITHDRAWAL_QUOTE_INVALID_OR_EXPIRED | The quote is invalid or expired. |
| 400 | WITHDRAWAL_QUOTE_MISMATCH | Withdrawal parameters do not match the quote. |
| 400 | WITHDRAWAL_QUOTE_ALREADY_USED | The quote is already used. |
| 401 | MERCHANT_AUTH_REQUIRED | Valid API key authorization is required. |
| 403 | ACCOUNT_ACCESS_DENIED | Access to the operation is denied. |
| 404 | PROJECT_NOT_FOUND | Project not found. |
| 404 | INVOICE_NOT_FOUND | Invoice not found. |
| 404 | PAYMENT_TRANSACTION_NOT_FOUND | Transaction not found. |
| 404 | PROJECT_STATIC_WALLET_NOT_FOUND | Static wallet not found. |
| 404 | TOKEN_TARIFF_NOT_FOUND | Token tariff not found. |
| 404 | WITHDRAWAL_NOT_FOUND | Withdrawal not found. |
| 409 | INVOICE_EXTERNAL_ID_CONFLICT | orderId is already used with different invoice parameters. |
| 409 | PROJECT_STATIC_WALLET_EXTERNAL_ID_CONFLICT | orderId is already used with different wallet parameters. |
| 413 | PAYLOAD_TOO_LARGE | The request is too large. |
| 429 | INVOICE_CREATION_RATE_LIMITED | Invoice creation rate limit exceeded. |
| 429 | PROJECT_STATIC_WALLET_CREATION_RATE_LIMITED | Static wallet creation rate limit exceeded. |
| 500 | INTERNAL_SERVER_ERROR | Internal server error. The result of the original POST request may be unknown. |
| 503 | PROJECT_DEPOSIT_ADDRESS_UNAVAILABLE | The deposit address is temporarily unavailable. |
| 503 | PROJECT_WALLET_GENERATION_FAILED | Failed to generate the project wallet. |
Handling errors
- Combine the HTTP status with
error.code: for example,400+INVOICE_AMOUNT_BELOW_MINIMUMclearly means the invoice amount is too small. - For
409, check the conflicting parameters. - For
429, retry only after a delay. - Keep the
requestIdfrom the response and send it to support together with the HTTP status anderror.code.