Our detailed API Reference section provides full information on all endpoints and JSON objects used.
- Comprehensive information on all supported APIs
- Examples for each API request
- Descriptions of the mandatory and optional parameters included in the API request
- An API Console that you can use to try out the API – change the parameters in the examples and see how the API responds
- Ability to call either the Mock or Production server
Use the left-hand navigation menu to find the API request you want (scroll down to the REFERENCE section):
API Reference Section: Left-hand Navigation
Select the API request title on the left side of the page to view an example of that request. A window opens to the right of the page to display the example, as shown in the figure API Console Window.
API Console Window
To configure and test the example in the Console window, select the Switch to Console button.
In the Console window, you can update the API endpoint, parameters, headers, and request body. For example, you can update the API endpoint with the id of the merchant to which you are adding an account.
When you are ready to test your example, you can switch between the Production and Mock server environments.
- Production server – This actually calls the resource on Paysafe's Test system. To use this server, you must replace two request elements with your own test details:
On the URI Parameters tab, modify any required endpoint parameters. Some API requests need a value for the account_id, for example, when you are adding an address to a merchant account. Sign in to the Paysafe Merchant Back Office; once logged in, choose Accounts and then copy your account number from the Account column.
On the Headers tab, replace the text "YOUR-BASE64-ENCODED-API-KEY" with your Base64-encoded API key for your Paysafe Test account, which you have received from Paysafe.
- Mock server – This environment simply returns the dummy values in the example response irrespective of the parameters you supply. You do not need to use your Test API key for this request.
To call the API resource, click the Call Resource button. The response is displayed in the Console window, as seen in the example below.
API Console: View Response
Your API Key
Your API key must be included in your API requests to the Paysafe platform. It has two forms:
- Standard form that is composed of two items: a user name and password.
- Base64 encoded form created by concatenating the user name and password separated by a colon (username:password) and encoding the result using Base64 encoding. See the authentication section for more details.
Different REST API testing tools may use different key forms.
Receiving Your API Key
Paysafe sends you your API key by email when you first sign up.
There is no way for you to retrieve your API key yourself in the event that you lose it, other than by contacting Paysafe Support. Therefore, you should store your API key in a secure place upon receiving it from Paysafe.
Including Your API Key in the API Console Window
The API Reference section provides a Console window that enables you to test API calls from a web browser.
To test using your own Test account credentials, paste your encoded API key over the string YOUR-BASE-64-ENCODED API key in the Authorization Header of the API Console.
Using Your API Key in the API Console
See this list of Account Management API operations for details.