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 codeError descriptionPossible reasonHow to handle
400Access token is invalidThe access token provided is missing, malformed, or invalid.Verify that the access token is correctly formatted and valid. Obtain a new token if necessary.
400Public key is invalidThe public key is missing or invalid.Ensure the public key is correctly formatted and valid.
400Refresh token is invalidThe refresh token is missing, invalid, or expired.Obtain a new refresh token by re-authenticating.
400Invalid request parametersMissing or malformed parameters in the request.Double-check the request parameters for completeness and correctness.
400Use only valid currencyInvalid currency specified in the request.Use valid currency codes as per the API documentation.
400Exchange direction unavailableThe requested exchange direction is not currently supported.Retry later or use an available exchange direction.
401Access token expiredThe provided access token has expired.Refresh the access token using a valid refresh token or re-authenticate.
401Authentication requiredAuthentication is required but was not provided.Include a valid access token in the Authorization header.
401Refresh token expiredThe refresh token provided has expired.Re-authenticate to obtain a new refresh token.
401Access token revokedThe access token has been revoked or is invalid.Obtain a new access token.
403Merchant account is blockedThe merchant account is inactive or blocked.Contact support to resolve account status issues.
403Project associated is blockedThe project associated with the merchant account is inactive or blocked.Verify the project status and resolve any blocking issues with support.
403Merchant account not foundThe merchant account could not be located in the system.Confirm the account ID and credentials used in the request.
404Credentials not foundThe account associated with the provided credentials could not be located.Verify the credentials provided and ensure they are correct.
404Public key not foundThe 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.
409Deal already existsA deal with the same invoice ID already exists.Use a unique invoice ID for each new deal to avoid conflicts.