Introduction to Subscriptions

Paysafe offers the Subscriptions API, the perfect scheduled billing solution that you can use in combination with our Card Payments, Direct Debit, and Customer Vault APIs to process repeat payments for your consumers.

  • Leverage your integration with our existing payment APIs.
  • Sensitive customer billing information is stored securely in the Paysafe Customer Vault API and included in the Subscriptions requests.
  • The REST-based Subscription API is simple to set up and use.
  • Obtain output in JSON format – it’s easy to parse in web applications.
  • Use any language or platform to make requests through standard HTTP protocols.

Along with subscriptions, Paysafe also provides a full array of associated services, including payment processing, risk management, fraud reduction, and online real-time reporting tools.

Setting Up Subscriptions

The Paysafe Subscriptions API is easy to use. You can be up and running with scheduled, recurring payments in a few basic steps.

  • First, make sure you are integrated with Paysafe's Card Payments API or Direct Debit API, or both. This is where you will get the accountId to use in the request to create a subscription. The accountId is the ID of the merchant account through which you will process either your credit card or your Direct Debit payment requests.
  • Also make sure you have registered your consumer in the Paysafe Customer Vault API. This is where you will get the paymentToken to use in the request to create a subscription. This token represents the consumer's credit card or bank account information, depending on which API the scheduled payments will be processed through.
  • Next, you create a plan for one of your products, e.g., a gym membership. The plan includes information like the plan name, the amount of the payment, and the frequency of the payment (e.g., once a month).
  • Finally, you create a subscription based on that plan. The subscription includes information like the start date and end date of the subscription (e.g., one year for a gym membership), your and the consumer's payment token, which you created in the Paysafe Customer Vault API.

Here's an overview of the process of creating a subscription:

Subscriptions Overview

  1. The merchant creates a plan by sending a POST request to the plans endpoint of the Paysafe Subscriptions API.
  2. The Paysafe Subscriptions API returns a response that includes a unique ID for the plan.
  3. The merchant activates the plan by sending a PATCH request to the Paysafe Subscriptions API, with the status value set to ACTIVE.
  4. The Paysafe Subscriptions API returns a response confirming that the plan's status has been made ACTIVE.
  5. The merchant obtains the paymentToken for the consumer they want to set up a subscription for. This token comes from the Paysafe Customer Vault API.
  6. The merchant creates a subscription by sending a POST request to the subscriptions endpoint of the Paysafe Subscriptions API. This request includes both the plan ID and the consumer's payment token.
  7. The Paysafe Subscriptions API returns a response confirming that the subscription has been created. By default, the status of the subscription is set to ACTIVE.
  8. The merchant sends a GET request to the Paysafe Subscriptions API, including the unique ID for the subscription.
  9. The response to the GET request contains a schedule array that shows when the next payment will be made, as specified by the attributes included when the subscription was created.
"schedule": {
	"nextPayment": {
		"amount": 5000,
		"accountId": "1001058570",
		"paymentToken": "CQ8tfGj6bSgU6gO",
		"paymentMethod": "CC",
		"paymentDate": "2018-10-10"
	}
}

Recurring Payments

Once the schedule is set up, the recurring payments are automatically processed on the consumer's account, at the frequency and duration that you specified when you created the subscription. See our Scenarios section for a quick overview of some integration options when using the Subscriptions API.

Did you find this page useful?