Search Overlay

Before You Start

This guide explains how to integrate with the Payment Scheduler API to schedule recurring payments for customer subscriptions.

Prerequisites

Authentication

To use the Paysafe REST API, we must first set you up on our system and provide you with an API key. Your API key looks something like this:

  • Key Username – MerchantXYZ
  • Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdcecd702151182fdc952272661d290ab2e5849e31bb03deede7e

Note that this is not the same as your Merchant Back Office username and password.

The case-sensitive API key is sent using HTTP Basic Authentication. To use HTTP Basic Authentication, you must send the API key credentials using the Authorization header with every request. The Authorization header is constructed as follows:

  1. The Key Username and Key Password are combined into a string separated by a colon, e.g., “Key Username:Key Password”.
  2. The resulting string literal is then encoded using Base64.
  3. The authorization method and a space (i.e., “Basic”) are then put before the encoded string.

For example, using the Key Username and Password examples above, the header is formed as follows:

Authorization: Basic TWVyY2hhbnRYWVo6Qi10c3QxLTAtNTFlZDM5ZTQtMzEyZDAyMzQ1ZDNmMTIzMTIwODgxZGZmOWJiNDAyMGE4OWU4YWM0NGNkZmRjZWNkNzAyMTUxMTgyZmRjOTU yMjcyNjYxZDI5MGFiMmU1ODQ5ZTMxYmIwM2RlZWRlN2U=

For additional details, refer to http://en.wikipedia.org/wiki/Basic_access_authentication.

Note: Your Production API key is not the same as your Test API key - contact your account manager for details. You must keep your API keys safe and ensure they are used appropriately for your needs.

Using the REST API

  • API calls use the REST architecture. All requests and responses use the JSON (JavaScript Object Notation) format.
  • Test API calls can be sent to the Paysafe platform using cURL. Alternatively, you can use a graphical browser-based REST client tool such as Postman or the Advanced Rest Client. An example is provided in the section on REST architecture.
  • All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
  • API requests without authentication will fail.