Schedule subscription with immediate payment for Payment Pages - using Subscription Engine

  Last updated: 

 

Your system will need to send a request to the Payment Pages that processes both a 3-D Secure authenticated payment and also instructs the subscription engine to schedule future payments. This can be achieved in a single POST to the Payment Pages.

 

Configuration

The following example demonstrates how to process a subscription payment by performing a POST to the Payment Pages:

<html>
<head>
</head>
<body>
<form method="POST" action="<DOMAIN>/process/payments/choice">
<input type="hidden" name="sitereference" value="test_site12345">
<input type="hidden" name="currencyiso3a" value="GBP">
<input type="hidden" name="mainamount" value="10.00">
<input type="hidden" name="stprofile" value="default">
<input type="hidden" name="version" value="2">
<input type="hidden" name="subscriptionunit" value="MONTH">
<input type="hidden" name="subscriptionfrequency" value="1">
<input type="hidden" name="subscriptionnumber" value="1">
<input type="hidden" name="subscriptionfinalnumber" value="12">
<input type="hidden" name="subscriptiontype" value="RECURRING">
<input type="hidden" name="credentialsonfile" value="1">
<input type="submit" value="Pay">
</form>
</body>
</html>

Replace <DOMAIN> with a supported domain. Click here for a full list.

 

Field specification

  Field Format Description
X1-EN.png credentialsonfile Numeric (1)

Submit value “1” to indicate the credentials submitted in the initial request are being stored for subsequent subscription payments.

Note: Visa and Mastercard have mandated that you must obtain cardholder consent before storing card details for future use. Click here for further information.

If your system fails to submit this value in the request, our system will automatically attempt to flag the request with the correct credentialsonfile value.

X1-EN.png currencyiso3a Alpha (3)

The currency assigned to each payment in the subscription sequence.

Click here for a full list of available currencies.

X1-EN.png mainamount Numeric (14) The amount to be paid at regular intervals, in main units (£10 is submitted as 10.00). This value must be greater than zero. (Max length may vary depending on your acquiring bank – Contact your bank for further info)
X3-EN.png subscriptionbegindate Date YYYY-MM-DD This field refers to the when the first automated payment will be processed. From there onward, we will use the data submitted in the subscriptionunit and subscriptionfrequency fields to automatically process the subscription payments at regular intervals.

e.g. If a subscription request is submitted on 5th January 2018

the interval is 1 MONTH (subscriptionfrequency = 1 and subscriptionunit = MONTH)

and subscriptionbegindate is 2018-01-08,

the first automated payment will be processed on 8th January 2018, and all subsequent payments will be processed on the 8th of each month.

If you do not submit the subscriptionbegindate, we will use the subscriptionunit and subscriptionfrequency fields above to automatically schedule the first automated payment.
e.g. In the same scenario as above, but without submitting the subscriptionbegindate, the first automated payment would be processed on 5th February 2018 (1 MONTH after the original request). All subsequent payments will be processed on the 5th of each month.

  Monthly subscriptions scheduled at the end of the month are processed on the 28th day.

If the date of the first automated payment is the 29th, 30th or 31st day, all subsequent payments will be processed on the 28th day in subsequent months. This is to prevent issues for subscription payments on months that have fewer days than others.

X1-EN.png subscriptionfinalnumber Numeric (5)

This is used to set the number of payments to be processed over the course of the subscription:

When processing a 3-D Secure authenticated payment, where a subscription is scheduled:

If subscriptionnumber = 1
and subscriptionfinalnumber = 12
There will be 12 payments in total (The initial AUTH + 11 subscription payments)

Note: If the subscriptionfinalnumber value is “0”, the subscription engine will schedule payments indefinitely until the user manually sets the subscription to Inactive.

X1-EN.png subscriptionfrequency Numeric (11)

Combined with unit, the frequency defines how frequently payments are processed.

e.g. For one payment every 7 days: subscriptionfrequency = 7 and subscriptionunit = DAY

e.g. For one payment every 2 months: subscriptionfrequency = 2 and subscriptionunit = MONTH

X1-EN.png subscriptionnumber Numeric (5)
  • The AUTH should always start with value “1”.
  • This number is incremented in each subscription payment.
X1-EN.png subscriptiontype Alpha (11)

This field indicates the type of subscription to be processed. Your system can submit these two values:

  • RECURRING is used when the customer is performing a recurring payment for a new product/service each time (for example, a magazine subscription). For most merchants, the subscriptiontype should be set to “RECURRING”.
  • INSTALLMENT is only used in select cases with certain acquirers*. It is designed for when a customer is purchasing a single order, with payment being collected over several installments (for example, paying £100 a month for an order until it has been paid in full).

*Installments are supported for merchants with a Trust Payments acquiring account. If you are using a different acquiring bank, you will need to contact our Support Team to check this feature is supported before proceeding.

X1-EN.png subscriptionunit Alpha (5)

This field represents the unit of time between each subscription. This can be either “DAY” or “MONTH”.

Note: It is imperative that this field is submitted to the gateway in CAPITALS (“DAY” or “MONTH”).

Was this article helpful?
0 out of 0 found this helpful