Error handling
This section provides an overview of common errors encountered when working with the API, their possible causes, and how to address them effectively.
Error code | Error description | Possible reason | How to handle |
---|---|---|---|
400 | Access token is invalid | The access token provided is missing, malformed, or invalid. | Verify that the access token is correctly formatted and valid. Obtain a new token if necessary. |
400 | Public key is invalid | The public key is missing or invalid. | Ensure the public key is correctly formatted and valid. |
400 | Refresh token is invalid | The refresh token is missing, invalid, or expired. | Obtain a new refresh token by re-authenticating. |
400 | Invalid request parameters | Missing or malformed parameters in the request. | Double-check the request parameters for completeness and correctness. |
400 | Use only valid currency | Invalid currency specified in the request. | Use valid currency codes as per the API documentation. |
400 | Exchange direction unavailable | The requested exchange direction is not currently supported. | Retry later or use an available exchange direction. |
401 | Access token expired | The provided access token has expired. | Refresh the access token using a valid refresh token or re-authenticate. |
401 | Authentication required | Authentication is required but was not provided. | Include a valid access token in the Authorization header. |
401 | Refresh token expired | The refresh token provided has expired. | Re-authenticate to obtain a new refresh token. |
401 | Access token revoked | The access token has been revoked or is invalid. | Obtain a new access token. |
403 | Merchant account is blocked | The merchant account is inactive or blocked. | Contact support to resolve account status issues. |
403 | Project associated is blocked | The project associated with the merchant account is inactive or blocked. | Verify the project status and resolve any blocking issues with support. |
403 | Merchant account not found | The merchant account could not be located in the system. | Confirm the account ID and credentials used in the request. |
404 | Credentials not found | The account associated with the provided credentials could not be located. | Verify the credentials provided and ensure they are correct. |
404 | Public key not found | The public key associated with the credentials could not be located. | Ensure the public key matches the expected format and is correctly linked to the account. |
409 | Deal already exists | A deal with the same invoice ID already exists. | Use a unique invoice ID for each new deal to avoid conflicts. |
Updated 8 months ago