API Reference

Our detailed API Reference section provides full information on all endpoints and JSON objects used.

Features Available in the API Reference Section
  • 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
Tips on How to Use the API Reference Section

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

      Locating Your Account ID in the Merchant Back Office

    • 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

  1. Sign in to the Merchant Back Office and select Settings > API Key.
    Your API key consists of your User name and Password
  2. 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.
  3. 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 Hosted API Operations for more details. The different operations are summarized in the table below:

Operation Details
Process an Order

Process an order using the hosted payment page. Options available include:

  • Process an Order with a Silent Post
  • Create a Profile with an Order
  • Process an Order with a Payment Token.
Cancel an Order Cancel an order
Cancel a Held Order Cancel an order with a transaction status of held.
Resend an Order Callback Trigger the re-sending of the callback if, for any reason, you do not receive it.
Process a Rebill Using an Order ID Process a rebill against your customer’s card, using a previously successful order ID. The rebill can be immediate or can be set up to run at a future date.
Process a Rebill Using a Profile Process a rebill against your customer’s card, using a customer profile.
Get an Order Status Get the status of an order request.
Update a Held Order Update the transaction status of an order that is held, to either success or cancelled.
Update a Rebill Order Update the transaction status of a Rebill order, where the rebill has not yet been processed.
Get an Order Report Get a list of recently created or processed orders.
Refund an Order Refund an order that has been processed (i.e. where the funds have been settled to the merchant's account).
Settle an Order Settle an order (capture the funds on an original authorization), used by merchants who delay settlement until products or services have been delivered.
Cancel a Settlement Cancel the settlement, if a settlement request has been sent but the amount has not yet been settled.
Issue an Original Credit Issue an Original Credit using an Order ID
Issue an Original Credit using a Profile Issue an Original Credit using an Profile ID
Did you find this page useful?