Subscriptions

Subscriptions Integration Guide

Last updated:April 29, 2024

This Subscription Integration guide describes how you can schedule subscription payments. Like recurring payments, the money gets auto-debited from consumer's bank account to the merchant account in fixed time periods (e.g. weekly, monthly, quarterly, yearly). Similarly, money can be auto-credited using payouts. Subscription businesses benefit from the flexibility of creating different plans and pricing structures to meet market demands.

A subscription payment can be scheduled as a pre-authorization (PA), debit (DB) or credit (CD) transaction.

To collect card data, you must be PCI-DSS compliant. To minimize your compliance requirements, please use PayUnity.Flex Registration Tokens.

Use cases

Start subscription

The merchant collects card data from the shopper and schedules a subscription payment. You can set the value of the transaction, the schedule for when the charges should occur, and the number of times the payment transaction should happen based on your subscription plan.


How it works

Store the payment data

Tokenize the customer payment information.

Schedule a payment

Send a schedule request using the token.

We execute the transaction for you

Execute the subscription payment at the scheduled time.

4
OPTIONAL

Cancel the schedule

Cancel the subscription.

Transactions:
RG
RG
SD
SD
DB
DB
DS
DS

1. Store the payment data

Collect the customer payment information via PayUnity.Flex or Server-to-Server. With any of the options, please consider having a card-on-file agreement with the shopper. It is best to tokenize the card during the cardholder (CIT) initiated payment so that a merchant (MIT) agreement is in place for the future subscription payments.

Sample request:

2. Schedule a payment

Perform a server-to-server POST request with the registration id, payment type and the job schedule parameters which describes when and how often the transaction should be executed. For a complete reference of the scheduling job parameters, please check API Reference.

You can use the numerical allowed values to declare specific dates, months and days of the week for the subscription payment to be executed. The special characters allow for more advanced functionality. Please click the button below to see the table where we've outlined their general function and what their value means in each field.
[job.second] [job.minute] [job.hour] [job.dayOfMonth] [job.month] [job.dayOfWeek]

Show special characters

Select trial period:
Select schedule:

Sample request:

3. We execute the transaction for you

An automated subscription payment is executed at the scheduled time using the stored payment information and the specified payment type.

4. Cancel the schedule

Send a de-scheduling request specifying the schedule id you want to cancel.

Sample request:

Add new subscription

The merchant collected card data from the shopper and already scheduled a subscription payment. You may now choose a different pricing plan to allow subscribers enjoying the flexibility to shift to a lower or higher plan as per their preference. You can set the value of the transaction, the schedule for when the charges should occur, and the number of times the payment transaction should happen based on your new subscription plan.


How it works

1

Schedule a new pricing plan

Send a new schedule request using the existing token.

2

We execute the transaction for you

Execute the new subscription payment at the scheduled time.

Transactions:
SD
SD
DB
DB

1. Schedule a new pricing plan

Perform a server-to-server POST request with the registration id, new amount value, the payment type and the job schedule parameters which describes when and how often the transaction should be executed. For a complete reference of the scheduling job parameters, please check API Reference.

To understand subscription upgrades and downgrades, imagine a fictional magazine company. It offers three subscription options:

  • Print edition, where the payer gets the physical copy of the magazine
  • Digital edition, where the payer accesses the magazine online
  • Both print and digital forms

Select plan:
Select schedule:

Sample request:

2. We execute the transaction for you

An automated subscription payment is executed at the scheduled time using the stored payment information and the specified payment type.

Cancel subscription

The merchant scheduled one or multiple subscription payments. You can cancel any of the subscriptions.

How it works

1
OPTIONAL

List subscriptions

Send a query request to get all subscriptions active or cancelled.

2

Cancel the schedule

Cancel the subscription.

Transactions:
DS
DS

1. List subscriptions

Perform a server-to-server GET request with the registration id and scheduling/de-scheduling payment types.

Sample request:

2. Cancel the schedule

Send a de-scheduling request specifying the schedule id you want to cancel.

Sample request: