Recurring Payments

Recurring payments through PayEx Checkout is perfect for subscription based payments where the consumer is charged on a regular basis. The consumer can choose between recurring payments by credit card or through invoice*.

* Recurring payments through invoice is estimated to be ready Q1/Q2 2019

Introduction

A recurring payment enables you to process a payment (like charging a credit card or generating an invoice) without any consumer interaction. When an initial recurrence token is generated subsequent payments is made through server-to-server requests.

Prerequisites

Prior to making any server-to-server requests, you need to supply the payment instrument details and a recurrence token to PayEx by initial purchase or verification.

There are two ways to initiate recurring payments procedures, depending on if you want to make an initial charge or not:

  • Initiate a recurring payment flow and reserving funds. This is done by creating a "Purchase Payment Order" and generating a recurrence token.
  • Initiate a recurring payment flow, without reserving funds at this time. This is done by creating  a "Verify Payment Order" and generating a recurrence token.

Generate Recurrence Token

  • When posting a Purchase payment order, you need to make sure that the attribute generateRecurrenceToken is set to true
recurrenceToken
"generateRecurrenceToken": "true"

Creating a Payment Order

  • You need to POST a Verify payment order, that will automatically generate a recurrence token (for later recurring use).

Retreive recurrence Token

You retrieve the recurrence token by doing a GET request against the currentpayment resource, that displays information of the payment within the payment order.

Recurring purchases

When you have a recurrence token stored away. You can use the same token in a subsequent recurring payment POSTThis will be  a server-to-server affair, as we got both payment instrument details and recurrencetoken from the initial payment. Please note that this POSTrequest is made directly on the payment level, and will not create a payment order.

Options after a recurring payment

You have the following options after a server-to-server Recur payment POST.

Authorization (intent)

  • Authorization (two-phase): If you want to reserve funds (i.e through credit card), you will have to specify that the intent of the purchase is Authorization. The amount will be reserved but not charged. You will later (i.e. when you are ready to ship the purchased products) have to make a Capture or Cancel request.

Capture(intent)

  • AutoCapture (one-phase): If you want to settle funds right away (i.e through credit card), you will have to specify that the intent of the purchase is AutoCapture. The credit card will be charged and you don't need to do any more financial operations to this purchase.​​​​​

General

  • Callback from PayEx: Whenever changes to the payment occur  a Callback request will be posted to the callbackUrl, generated when the payment was created.

Sequence diagram

Created by Patrick Härmälä on 2019/04/03 11:55