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.
The following example demonstrates how to process a subscription payment by performing a POST to the Payment Pages:
<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">
Replace <DOMAIN> with a supported domain. Click here for a full list.
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.
The currency assigned to each payment in the subscription sequence.
|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)|
|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.
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
Note: If the subscriptionfinalnumber value is “0”, the subscription engine will schedule payments indefinitely until the user manually sets the subscription to Inactive.
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
This field indicates the type of subscription to be processed. Your system can submit these two values:
Note: Installments are only accepted by certain acquirers. For further info, please contact your bank.
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”).