Skip first payment and schedule subscription
Process overview
This subscription process consists of three parts:

When the customer clicks “Pay” on your checkout form, an ACCOUNTCHECK is processed and future payments are scheduled in our subscription engine. Funds will not be reserved on the customer’s account immediately. The first payment will be processed automatically by our subscription engine at a later time, at the intervals designated in your request.

All payments are processed automatically by our subscription engine.

In the JWT, you can define a finite number of payments (using the subscriptionfinalnumber field), after which our subscription engine will discontinue automatic payments. Alternatively you can allow payments to continue indefinitely and manually disable the subscription when needed.
Before you get started, you may find the following alternative process is better suited to your requirements:
- AUTH SUBSCRIPTION – Payment is processed immediately, then payments continue at regular intervals.
1. Update your payment form
Request types
You will need to modify requestTypes to include ACCOUNTCHECK and SUBSCRIPTION, as shown in the following example:
<html> <head> </head> <body> <div id="st-notification-frame"></div> <form id="st-form" action="https://www.example.com" method="POST"> <div id="st-card-number" class="st-card-number"></div> <div id="st-expiration-date" class="st-expiration-date"></div> <div id="st-security-code" class="st-security-code"></div> <button type="submit" id="st-form__submit" class="st-form__submit"> Pay securely </button> </form> <script src=https://webservices.securetrading.net/js/v2/st.js></script> <script> (function() { var st = SecureTrading({ jwt: 'INSERT YOUR JWT HERE' }); st.Components({"requestTypes":["THREEDQUERY","ACCOUNTCHECK","SUBSCRIPTION]}); })(); </script> </body> </html>
Replace <DOMAIN> with a supported domain. Click here for a full list.
When the customer clicks “Pay”, our system will interpret this as two different requests:
- Firstly, an ACCOUNTCHECK request is processed, where AVS and Security Code Checks are performed. This acts as a parent to all subsequent automated payments in this series.
- Secondly, a SUBSCRIPTION request is processed, which is used to tell our subscription engine when to process the subsequent automated payments.
Update the JWT
You will need to update the payload within the JWT to contain additional fields that provide the information needed to schedule the subscription following the ACCOUNTCHECK.
Example:
{"payload":{"accounttypedescription":"ECOM","baseamount":"1050","currencycode":"GBP","sitereference":"test_site12345","subscriptiontype":"RECURRING","subscriptionunit":"MONTH","subscriptionfrequency":"1","subscriptionnumber":"1","subscriptionfinalnumber":"12","subscriptionbegindate":"2020-01-01","credentialsonfile":"1"},"iat":"1567701632","iss":"jwt.user"}
Field specification
Key
Field | Format | Description | |
![]() |
currencyiso3a | Alpha (3) | The currency assigned to each payment in the subscription sequence. |
![]() |
baseamount | Numeric (13) | The amount to be paid at regular intervals, in base units, with no commas or decimal points, so £10 is submitted as 1000. This value must be greater than zero. (Max length may vary depending on your acquiring bank – Contact your bank for further info)
Note: No funds are reserved as part of the ACCOUNTCHECK. The first payment will either be processed on the specified subscriptionbegindate or after the first interval has passed (e.g. 1 MONTH or 7 DAY). |
![]() |
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. If you are processing a new subscription using previously-stored credentials, you must still submit credentialsonfile = 1, to indicate the credentials will continue to be stored for payments in this specific subscription sequence. |
![]() |
subscriptiontype | Alpha (11) | For information on the use of subscription fields, please refer to the Subscription engine page. |
![]() |
subscriptionfinalnumber | Numeric (5) | |
![]() |
subscriptionunit | Alpha (5) | |
![]() |
subscriptionfrequency | Numeric (11) | |
![]() |
subscriptionbegindate | Date YYYY-MM-DD | |
![]() |
subscriptionnumber | Numeric (5) |
|
![]() |
transactionactive | Numeric (1) | The subscription status.
“0” – Inactive: Suspends future payments until manually overridden. (Refer to information on updating subscriptions below) “1” – Active: Schedules subscription payments immediately, bypassing fraud & duplicate checks (if enabled). “2” – Pending (default): Schedules subscription payments within 24 hours, providing the ACCOUNTCHECK didn’t encounter an error. |
Response
As with a standard payment, you will need to decode the JWT returned and check the fields contain the correct information in regards to subscription timing and amount, and in particular, that the transactionactive field contains the value you are expecting.
The response is divided into two parts:
- The first response section provides information on the ACCOUNTCHECK request processed.
- It is important that this request is successful (check the errorcode is “0”). If not, the subscription won’t be scheduled.
- The second response section provides information on the SUBSCRIPTION request processed.
- Again, it’s important to ensure this request was successful, otherwise subsequent payments may not be processed automatically.
- The transactionactive field will initially have the value “2”, indicating the subscription is “Pending”. Provided that the ACCOUNTCHECK was successful, the transactionactive will be updated to the value “1” within 24 hours, indicating the subscription is “Active”.
{"iat":1561549076,"payload":{"requestreference":"A0dcb11e6","version":"1.00","response":[{"transactionstartedtimestamp":"2017-09-27 15:11:14","livestatus":"0","issuer":"SecureTrading Test Issuer1","splitfinalnumber":"1","dccenabled":"0","settleduedate":"2017-09-27","errorcode":"0","baseamount":"1050","tid":"27882788","merchantnumber":"00000000","merchantcountryiso2a":"GB","transactionreference":"1-2-345678","merchantname":"Test Merchant","paymenttypedescription":"VISA","orderreference":"My_Order_123","accounttypedescription":"ECOM","acquirerresponsecode":"00","requesttypedescription":"ACCOUNTCHECK","securityresponsesecuritycode":"2","currencyiso3a":"GBP","authcode":"TEST50","errormessage":"Ok","operatorname":"[email protected]","securityresponsepostcode":"0","maskedpan":"411111######1111","securityresponseaddress":"0","issuercountryiso2a":"US","credentialsonfile":"1","settlestatus":"0"},{"transactionstartedtimestamp":"2020-01-01 00:00:00","parenttransactionreference":"23-9-80025","livestatus":"0","errorcode":"0","orderreference":"My_Order_123","subscriptionfinalnumber":"12","subscriptionunit":"MONTH","transactionreference":"1-2-345679","paymenttypedescription":"VISA","transactionactive":"2","baseamount":"1050","subscriptiontype":"RECURRING","accounttypedescription":"RECUR","requesttypedescription":"SUBSCRIPTION","currencyiso3a":"GBP","subscriptionbegindate":"2020-01-01","maskedpan":"411111######1111","errormessage":"Ok","subscriptionnumber":"2","subscriptionfrequency":"1","operatorname":"[email protected]"}],"secrand":"PAGPFy57L"}}
2. Subscription is active
Start of the automated payments
The first automated payment will be processed as follows:
- If subscriptionbegindate has been specified, the first automated payment will be processed on this date.
- If subscriptionbegindate has not been specified, the first automated payment will be processed after the interval specified in the request has passed (e.g. 1 MONTH or 7 DAY).
Keeping track of your subscriptions
- You can sign into MyST and monitor your scheduled subscriptions from there. You can view payments that have been processed already and also view future payments that have been scheduled in our subscription engine.
Click here for further information.
- You can opt in to receive email reports or URL notifications whenever automated subscription payments have been processed on your account.
Click here for further information.
- You can submit a TRANSACTIONQUERY request, passing through the transactionreference returned in the SUBSCRIPTION section of the initial response. The TRANSACTIONQUERY response returned includes fields that hold information about future scheduled payments.
Click here for further information.
Updating the subscription
You can perform updates to active subscriptions in order to change customer’s details, or to cancel/modify the subscription payments. There are two ways to do this:
- You can sign into MyST and manage your scheduled subscriptions from there.
Click here for further information.
- You can submit a TRANSACTIONUPDATE request, passing through the transactionreference returned in the SUBSCRIPTION section of the initial response.
Click here for further information.
3. Finishing the subscription
Subscriptions can enter either one of these two states:
Number of payments exceeded
Once the subscriptionnumber exceeds the subscriptionfinalnumber, our subscription engine will stop processing subscription payments indefinitely.
If you do not need to process further payments from the customer, you do not need to take further action.
If you wish to resume/extend a subscription, you can update the subscriptionfinalnumber to a greater value. You can do this by using MyST, or by submitting a TRANSACTIONUPDATE request. With this update complete, payments will resume processing at their original intervals. If payments have been missed while the subscription payments were not being processed, our subscription engine will catch up with missed payments within 24 hours.
Subscription continues indefinitely
If the original request was submitted with subscriptionfinalnumber set to “0”, we will continue to process payments indefinitely until you manually deactivate the subscription.
If you wish to deactivate the subscription, you can do so by updating the transactionactive field to be “0”. You can do this by using MyST, or by submitting a TRANSACTIONUPDATE request (you can re-enable a subscription at a later time, if needed).
Querying subscriptionsProcess payment and schedule subscription