Recurring Payments

Recurring payment is a payment model where funds are automatically deducted from a customer's account at scheduled intervals to cover the customer's subscription fees for products or services.

It is a convenient way for customers to pay for their subscriptions and can also help businesses generate predictable revenue.

πŸ“˜

This service is for Verve, Visa and Mastercard brand cards.

Benefits of recurring payments:

  • Convenience: Customers don't have to remember to make payments each billing period; businesses don't have to spend time and resources sending out invoices and chasing down payments.
  • Predictable revenue: This can help businesses to plan their expenses and make better financial decisions.
  • Increased customer loyalty: Customers are more likely to stick with a business that offers recurring payments because it's convenient.

To set up a recurring payment in Quickteller developer credentials, you will need to:

Prerequisite:

  • Client_id: Your Quickteller client ID
  • Client_secret: Your Quickteller client secret

You can obtain your client ID and client secret from the Interswitch API reference documentation.

  1. Get an access token
    To get an access token, you need to make a POST request to the following endpoint:
https://api.quickteller.com/v1/access_token

In the Authorization header, set the value to Basic <base64_encoded_client_credentials>, where <base64_encoded_client_credentials> is the base64 encoded string of your client ID and client secret, separated by a colon (:).

In the request body, include the following parameters:

grant_type: client_credentials

If the request is successful, you will receive a response containing an access token.

  1. Tokenize your card

πŸ“˜

Tokenizing your card is the process of replacing your sensitive credit card information with a unique identifier called a payment token. This token can then be used to make payments online without having to share your actual credit card details.

To tokenize your card, you need to make a POST request to the following endpoint:

https://qa.interswitchng.com/api/v2/purchases/validations/recurrents

In the request body, include the following parameters:

  • transactionRef: A unique reference for the transaction.
  • AuthData: The encrypted card details of the customer's card. You can generate one from here
  • Authorization: Bearer <access_token>

If the request is successful, you will receive a response containing a payment token and expiry date.

  1. Make a recurring payment

To make a recurring payment, you need to make a POST request to the following endpoint:

https://qa.interswitchng.com/api/v2/purchases/recurrents

In the request body, include the following parameters:

  • Authorization: Bearer <access_token>
  • customerId: A unique identifier for the customer.
  • amount: The amount of money to be transferred.
  • currency: The currency of the transfer. (Only NGN)
  • token: The payment token that was generated when the customer tokenized their card.
  • tokenExpiryDate: The date on which the payment token will expire.
  • transferRef: A unique reference number for the transfer. This can be used to track the status of the transfer or to dispute a transfer if necessary.

If the request is successful, the customer will be charged the specified amount every frequency from the start date until the end date (if specified) or until they cancel the subscription.

Examples of recurring payments:

  • Streaming services like Netflix and Spotify
  • Software as a service (SaaS) products like Salesforce, Google and Dropbox
  • Fitness memberships
  • Utility bills