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 you want (scroll down to the REFERENCE section):
API Reference Section: Left-hand Navigation
Select the API title on the page to view an example of the API. A window opens to the right of the page to display the example, as shown in the figure below.
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 required order or transaction for a lookup request or include your account_id, which is required when using some API endpoints.
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. For example, many API requests need a value for the account_id, Sign in to the Paysafe Merchant Back Office; once logged in, choose Accounts and then copy your account number from the Account column. The Account number is required for some API calls and is included either in the API endpoint (e.g., Card Payments, 3D Secure, and Direct Debit) or in the body of the request (e.g., Hosted, extendedOptions). Note the default Test account will work only for 3D Secure and card payments using the Card Payments or Hosted Payments API using the default currency. You will need to request additional Test accounts from Support if you require additional currencies or for other payments methods such as Direct Debit or Alternate Payment methods.Locating Your Account ID
On the Headers tab, replace the text "YOUR-BASE64-ENCODED-API-KEY" with your Base64-encoded API key for your Paysafe Test account.
- 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 account ID or Test API key for this request.
To call the API resource, click the Call Resource button. The response is displayed in the Console window.
See the example below.
API Console: View Response
Your API Key
Your API key should be included in most API requests to the Paysafe payment platform.
There are two API keys available
- Server-to-Server API key – This is the default API Key used by most calls. This API key is used for calls from your merchant server to Paysafe's servers.
- Single-Use Token API key – This key is used by client devices (mobile phones or from a user's browser) for a limited number of API calls.
Each API key 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. Similarly, different SDKs may need one or other of the forms.
Where to Find Your API Key
- Sign in to the Merchant Back Office and select Settings > API Key.
Your API key consists of your User name and Password
- To generate a Base64-encoded version of your API key, select the View Base 64 Encoded link.
The Base64-encoded version is displayed in a pop-up window.
- To copy the encoded key, click Copy.
Locating Your API Key in the Merchant Back Office
How to Include 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 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 List of 3D Secure API Operations in the API Reference section for more details. The different operations are summarized in the table below:
|Enrollment Lookup||Verify whether a card is enrolled in 3D Secure.|
|Get Enrollment Lookup||Look up an enrollment lookup response.|
|Authentication||Authenticate a card with 3D Secure.|
|Get Authentication||Look up an authentication request.|