Troubleshooting API Requests
This section lists common errors with API requests and describes how to resolve issues with the formatting of API requests.
|Error||Description||How to Resolve|
|Using the incorrect API endpoint||Partners send their request to an incorrect API endpoint.|| |
Check to ensure that you are pointing to the correct API endpoint. Where necessary, check that you have included your account number as part of the endpoint.
Make sure there are no empty or white spaces in the URL or backslash symbols (/) at the end of the URL.
|Using HTTP||All API requests must be made over HTTPS. Calls made over plain HTTP will fail.||Always use HTTPS.|
|Incorrect or missing authentication details|| |
Partner passes incorrect user name and password in their request, or these details are missing.
|Refer to the section on Authentication for details.|
|Incorrect account number/ID||Many calls require an account number (account ID).||Make sure you use the Partner account ID you received from Paysafe.|
|Incorrect environment used||Partners submit a request to the Test environment instead of the Production environment or vice versa. In this case the transaction is rejected because incorrect credentials are supplied.|| |
Ensure you update your code to point to the correct environment.
|Incorrect content type|| |
All calls to the Paysafe REST-based APIs should use a Content-Type header set to:
Use the latter if you are passing UTF-8 characters.
Refer to the section REST API Architecture for details.
|Invalid JSON||The structure of the API request body does not conform to the JSON schema standard – e.g., curly brackets are missing.|| |
Use a JSON validator tool to verify that the structure of your JSON request is valid.
Ensure you are not using any invalid characters in the body of the request. See Global Invalid Characters.
|Invalid parameters||The request includes invalid parameters.|| |
Examples and details of parameters to include are provided in the Account Management API Reference section.
JSON Format Validation
Problems relating to the formatting of API requests are common. We recommend that you use a JSON validator tool to check the formatting of your request to ensure that it is valid. Here are a few online tools that provide JSON validation:
Links to third-party websites are provided as a convenience only. Paysafe makes no warranty related to these sites.