Knowledge Base

Get help for payment solutions. Search our articles or browse by category below.

7.1 Subscription Registration From the Hosted Page

New Subscription can be registered from the Worldnet hosted page. When new subscription is created it's name, description, set-up price, recurring price, length, period type and type are copied from the corresponding stored subscription.

To get Subscription Registration Page opened in a client browser a POST must be made to the following URL:

https://testpayments.worldnettps.com/merchant/subscriptionpage/register

Subscription registration POST parameters description:

Filter:

Field Name Required Description
TERMINALID Y A Terminal ID provided by Worldnet. NB - Please contact Worldnet to be issued with a test terminal ID.
MERCHANTREF Y Unique Merchant Reference. Length is limited to 48 chars.
STOREDSUBSCRIPTIONREF N This field is required if new Subscription being created should be based on already existing Stored Subscription.
SECURECARDMERCHANTREF N Merchant Reference of a Secure Card which will be used to do set-up and recurring payments. (ONLY ONE OF SECURECARDMERCHANTREF or CARDREFERENCE must be present)
CARDREFERENCE N System-Generated Secure Card Reference (Only one of SECURECARDMERCHANTREF or CARDREFERENCE must be present)
SUBSCRIPTIONRECURRINGAMOUNT N Cost of each payment. should only be sent if Stored Subscription type is “Automatic (without amounts)” and new Stored Subscription is not being created.
SUBSCRIPTIONINITIALAMOUNT N Initial (set-up) payment to be taken off card. Payment will not be taken if it is 0. Should only be sent if Stored Subscription type is “Automatic (without amount)” and new Stored Subscription is not being created.
DATETIME Y Format: DD-MM-YYYY:HH:MM:SS:SSS.
STARTDATE Y Subscription Start Date.
ENDDATE N Subscription End Date, if it is not set subscription will continue until manually canceled or length reached (if it is set).
HASH Y An MD5 HASH. See note 1 below.
Following parameters should be posted if new Stored Subscription should be created (STOREDSUBSCRIPTIONREF shouldn't be posted in such case).
NEWSTOREDSUBSCRIPTIONREF N Merchant Ref to be assigned for a new Stored Subscription being created.
NAME Y Display name for subscription.
DESCRIPTION Y Description explaining subscription.
PERIODTYPE Y Integer code of Period Type, can be:
1 - DAILY
2 - WEEKLY
3 - FORTNIGHTLY
4 - MONTHLY
5 - QUARTERLY
6 - YEARLY
LENGTH Y 0 for non ending/ multiplier of period. This does not take effect if (Subscription length*Period Type)>(End Date-Current Date).
RECURRINGAMOUNT Y Cost of each payment (will be ignored if manual).
INITIALAMOUNT Y Initial (set-up) payment to be taken off card. Payment will not be taken if it is 0. Setup fails if setup payment declines.
TYPE Y Integer code of subscription type:
1 - AUTOMATIC
2 - MANUAL
3 - AUTOMATIC (WITHOUT AMOUNTS)
ONUPDATE Y Integer code of onupdate:
1 - CONTINUE
2 - UPDATE (Let all depending subscriptions finish their subscription prior to update/ Update name, description, recurring price, setup price, subscription length, period type, type for all subscriptions).
ONDELETE Y Integer code of ondelete:
1 - CONTINUE
2 - CANCEL (Continue subscriptions untill cancelled manually or reach end date or length/ Cancel all subscriptions).
AnyOtherCustomField N Any other fields sent in the request will be treated as a custom field ( see section 3.4). Note that this is subject to the max length of a HTTP GET request which we would conservatively recommend considering to be 2000 characters.


Notes:

1. If “SECURECARDMERCHANTREF” is being used, the MD5 HASH is generated using the following as an input string:

TERMINALID+MERCHANTREF+SECURECARDMERCHANTREF+DATETIME+STARTDATE+secret


2. If “CARDREFERENCE” is used, the MD5 HASH is generated using the following as an input string:

TERMINALID+MERCHANTREF+CARDREFERENCE+DATETIME+STARTDATE+secret



Below is an example HTML form to open subscription registration page.

<html>
	<body>
		<form action=“https://testpayments.worldnettps.com/merchant/subscriptionpage/register” method=“post”>
			<input type=“hidden” name=“TERMINALID” value=6491002”>
			<input type=“hidden” name=“MERCHANTREF” value=26352”>
			<input type="hidden" name="STOREDSUBSCRIPTIONREF" value="6523423">
			<input type="hidden" name="SECURECARDMERCHANTREF" value="237498">
			<input type=“hidden” name=DATETIMEvalue=“03-08-2009:17:32:18:329”>
			<input type="hidden" name="STARTDATE" value="04-08-2009">
			<input type="hidden" name="ENDDATE" value="03-08-2010">
			<input type=“hidden” name=“HASH” value=“b9a034421808a80dc8f1a5657da80f95”>
			<input type=“submit” value=“Register”>
		</form>
	</body>
<html>



Assuming valid details were sent, the Subscription Registration Hosted page will be displayed, clicking on “Accept & Subscribe” button will create the subscription only if the setup amount authorises successfully, and the resulting GET parameters will be forwarded to the Subscription Receipt URL that is configured on the Terminal Setup page. If Subscription Secure Card currency is other then Stored Subscription currency then eDCC Decision Page will be displayed, and the customer will have to decide if eDCC should be used for the initial and all subsequent payments for the subscription.

Following parameters will be sent to the Subscription Receipt URL:

Field Name Description
RESPONSECODE Response Code:
A - Approval
C - Cancelled
Check the subscription creation and updating error codes table for a full list of supported codes.
RESPONSETEXT Response Text.
MERCHANTREF Original Merchant Reference.
DATETIME Format: DD-MM-YYYY:HH:MM:SS:SSS.
HASH An MD5 HASH. See note 1 below.



Notes:

1. The MD5 HASH is generated using the following as an input string:

TERMINALID+MERCHANTREF+DATETIME+RESPONSECODE+RESPONSETEXT+secret



If invalid parameter values will be sent, an Error Page will appear and the web browser will not be redirected to the Subscription Receipt Page. This should not happen in a production environment after integration is completed.

Subscription creation error codes:

Filter:

ERROR CODE Description
E01 SYSTEM ERROR - TRY AGAIN
E03 OPERATION NOT ALLOWED
E06 INVALID TERMINALID
E07 METHOD NOT SUPPORTED
E08 INVALID MERCHANTREF
E09 INVALIDE DATETIME
E13 INVALID HASH
E20 INVALID LENGTH
E21 INVALID PERIOD TYPE
E22 INVALID NAME
E23 INVALID DESCRIPTION
E24 INVALID RECURRINGAMOUNT
E25 INVALID INTIALAMOUNT
E26 INVALID TYPE
E27 INVALID ONUPDATE
E28 INVALID ONDELETE
E29 INVALID TERMINAL CURRENCY
E30 INVALID STORED SUBSCRIPTION REF
E31 INVALID STORED SUBSCRIPTION MERCHANT REF
E32 INVALID SECURE CARD MERCHANT REF
E33 INVALID STARTDATE
E34 INVALID ENDDATE
E35 INVALID EDCCDESICION
E36 SETUP PAYMENT PROCESSING ERROR
E37 INVALID SUBSCRIPTIONRECURRINGAMOUNT
E38 INVALID SUBSCRIPTIONINITIALAMOUNT
E39 SECURE CARD NOT VALIDATED
E41 PASS ONLY ONE OF CARDREFERENCE OR SECURECARDMERCHANTREF OR SECUREACHACCOUNTMERCHANTREF
E48 INVALID SECURE CARD REFERENCE

Copyright © 2017 Worldnet Knowledge Base | Powered by DokuWiki
developer/integrator_guide/7._subscriptions/7.1._hpp_subscriptions.txt · Last modified: 2017/05/02 13:38 by stephaniel