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 | |
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. |
|
currencyiso3a | Alpha (3) |
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. 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. |
|
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 Note: If the subscriptionfinalnumber value is “0”, the subscription engine will schedule payments indefinitely until the user manually sets the subscription to Inactive. |
|
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 |
|
subscriptionnumber | Numeric (5) |
|
|
subscriptiontype | Alpha (11) |
This field indicates the type of subscription to be processed. Your system can submit these two values:
*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. |
|
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”). |