APIs
Error Handling
Information about handling API Errors
When an error occurs on the Payman API, the response status code will be set in the 4xx or 5xx range. Additionally, the response body will contain a JSON object with further information about the error. The json will have the format:
Common Error Codes
The Payman system will attempt to provide context around why an error code was received. Some common codes include:
invalid_payload
- something about the request payload is invalid, or the system is in the wrong state to accept this payload. TheerrorMessage
andcontext
will provide more details.insufficient_funds
- there weren’t enough funds in the wallet to perform the requested actionvalidation_error
- a field in your payload has an invalid valueentity_already_exists
- a conflicting entity already exists in the systementity_not_found
- the entity you’re looking for couldn’t be foundnot_authorized
- the authentication credentials provided are not valid or are missingnot_allowed
- you are attempting to perform an action to which you do not have the requisite permissions on the system