7.2.6. Subscription Payment

Knowledge Base

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

7.2.6 Subscription Payment Request

Manual subscription recurring payment can be done from the XML Gateway. If automatic subscription was not paid automatically because of card details expiration or other issue it also can be paid in the same way as manual after Secure Card issue was solved. The following is an example of a Subscription Payment request:

<?xml version="1.0" encoding="UTF-8"?>
<SUBSCRIPTIONPAYMENT>
	<ORDERID>8362</ORDERID>
	<TERMINALID>6491002</TERMINALID>
	<AMOUNT>87.78</AMOUNT>
	<SUBSCRIPTIONREF>311</SUBSCRIPTIONREF>
	<FOREIGNCURRENCYINFORMATION>
		<CARDCURRENCY>JPY</CARDCURRENCY>
		<CARDAMOUNT>10638</CARDAMOUNT>
		<CONVERSIONRATE>121.186190</CONVERSIONRATE>
	</FOREIGNCURRENCYINFORMATION>
	<EMAIL>cardholder_email@worldnettps.com</EMAIL>
	<DATETIME>31-07-2009:14:09:59:121</DATETIME>
	<HASH>53b6917aac8eb179e8b80f754c4afd5c</HASH>
	<CUSTOMFIELD NAME=”ACCOUNTID”>132453462</CUSTOMFIELD>
	<CUSTOMFIELD NAME=”EVENTID”>FG00001</CUSTOMFIELD>
</SUBSCRIPTIONPAYMENT>


Field description:

Field Name Required Description
ORDERID Y A unique identifier for the order created by the merchant. (Max 12 Characters).
TERMINALID Y A TerminalID provided by Worldnet. NB - Please contact Worldnet to be issued with a test terminal ID.
AMOUNT Y The amount of the transaction as a 2 digit decimal or an Integer value for JPY amounts.
SUBSCRIPTIONREF Y Merchant reference of a subscription being paid.
DESCRIPTION N Transaction Description.
FOREIGNCURRENCYINFORMATION N It is accepted for eDCC enabled subscription only. See section 5.1.6.2.
EMAIL N Cardholder e-mail address.
DATETIME Y Format: DD-MM-YYYY:HH:SS:SSS
HASH Y An MD5 HASH. See note 1 below.


Notes:

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

TERMINALID+ORDERID+SUBSCRIPTIONREF+AMOUNT+DATETIME+secret


Example of a successful subscription payment response:

<SUBSCRIPTIONPAYMENTRESPONSE>
	<RESPONSECODE>A</RESPONSECODE>
	<RESPONSETEXT>APPROVAL</RESPONSETEXT>
	<APPROVALCODE>406243</APPROVALCODE>
	<DATETIME>31-07-2009:14:10:03:834</DATETIME>
	<HASH>6dd32c4b61f180dd791310f9c07d76a1</HASH>
</SUBSCRIPTIONPAYMENTRESPONSE>


The following fields are returned in the response:

Field Name Description
RESPONSECODE A or D or R (Approved or Declined or Referral).
RESPONSETEXT The text of the authorization.
APPROVALCODE Six digit AuthCode.
DATETIME The time of the transaction created by the bank. 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+UNIQUEREF+AMOUNT+DATETIME+RESPONSECODE+RESPONSETEXT+secret


Errors handling
If subscription payment was not accepted, error message will be returned:

<ERROR>
	<ERRORSTRING>Invalid HASH field</ERRORSTRING>
</ERROR>
Copyright © 2017 Worldnet Knowledge Base | Powered by DokuWiki
developer/integrator_guide/7._subscriptions/7.2._xml_subscriptions/7.2.6._subscription_payment.txt · Last modified: 2016/07/26 12:04 (external edit)