====== XML Subscription Features ======
~~TOC~~
\\
The subscription features, presented in this page, allow your integration to manage recurring payments in the Gateway Platform.
The %CompanyName Subscription is a versatile solution which can be used in two main ways:
* **1**. **Automatic Subscription**: This is a fully automated solution that will manage the lifetime of a recurring payment once it is registered and notify the merchant of any issues that happen during it's lifetime.
* **2**. **Manual Subscription**: With this solution, recurring payments are set up in our system just as they are for automatic payments. The main difference is that our system does not actually process payments automatically. Instead, when a payment is pending, the merchant should initiate the payment, either via and “XML Payment Request” or through the %SelfCare System. Another difference with this method is that you can modify the amount of the payment.
This feature requires that you use the Secure Token feature as well. A subscription uses a Secure Token to perform the payments. So without Secure Tokens, you can't use a subscription.
\\
The Subscription solution has two big components:
* **Stored Subscriptions**: They act not as subscription, but as templates for multiple subscriptions registered under them. They define the period (weekly / monthly / quarterly / annually), the number of those periods (if it's a fixed number), setup price, recurring price, etc. They are intended to represent a product, for example. This way you can define "models" which can be applied to many clients with the same settings.
* **Subscriptions**: Those are the actual subscriptions. Every subscription set up has to be under a Stored Subscription. However some of the settings of the stored subscription can be overruled by the Subscription itself, as you will see below. Subscriptions are intended to represent a specific order of a product represented by the stored subscription that it's under. Also, represents the "charging" configuration for a specific client.
\\
The following resources are the same for all the requests and responses you find in this page:
^ **TYPE** ^ **URL** ^
| Request URL | %URLXMLPayments |
| XML XSD descriptor | %URLGateway |
Use the Request URL and the Request Body Fields to perform a request for this feature, then prepare your integration to receive the response, as defined by the Response Body Fields.
\\
===== Stored Subscription Registration =====
This feature allows you to perform the registration of a stored subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier per terminal. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| NAME | Y | Display name for subscription. |
| DESCRIPTION | Y | Description explaining subscription. |
| PERIODTYPE | Y | Value can be: WEEKLY, FORTNIGHTLY, MONTHLY, QUARTERLY or YEARLY. |
| LENGTH | Y | 0 for non ending/ multiplier of period. This does not take effect if (Subscription length * Period Type) > (End Date - Current Date). |
| CURRENCY | Y | Currency of subscription, this must either the base currency of the terminal or if supported, one of the configured allowed currencies. |
| RECURRINGAMOUNT | Y | Cost of each payment. Should only be sent if the TYPE is AUTOMATIC, otherwise an error is going to be generated. |
| INITIALAMOUNT | Y | Initial (set-up) payment to be taken off card. Payment will not be taken if it is 0. Should only be sent if the TYPE is AUTOMATIC or MANUAL, otherwise an error is going to be generated. |
| TYPE | Y | MANUAL / AUTOMATIC / AUTOMATIC (WITHOUT AMOUNTS). |
| ONUPDATE | Y | UPDATE/CONTINUE (Update name, description, recurringprice, setupprice, subscriptionlength, periodtype, type for all subscriptions/ let them finish their subscription prior to update). |
| ONDELETE | Y | CANCEL/CONTINUE (Cancel all subscriptions/Continue subscription until cancelled manually or reach end date or length). |
| CUSTOMFIELD'N' | N | Any of the available Custom Fields for the Terminal. Their values are going to be stored and can be used by the Payment Gateway later on. Their values are going to be stored and used by the Payment Gateway for the requests sent to the Receipt URL and the Validation URL. To understand more visit the section regarding **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]**. Limited to 30 custom fields in this request. |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:TYPE:NAME:PERIODTYPE:CURRENCY:RECURRINGAMOUNT:INITIALAMOUNT:LENGTH:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to create stored subscription.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR001
6491002
30-07-2009:15:26:38:027
Animal Life
Magazine membership
MONTHLY
12
EUR
15.87
10.99
AUTOMATIC
CONTINUE
CANCEL
750f7c545a3d63ecaf3b48c149b95555
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR – TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
| E20 | INVALID LENGTH |
| E21 | INVALID PERIOD TYPE |
| E22 | INVALID NAME |
| E23 | INVALID DESCRIPTION |
| E24 | INVALID RECURRINGAMOUNT |
| E25 | INVALID INITIALAMOUNT |
| E26 | INVALID TYPE |
| E27 | INVALID ONUPDATE |
| E28 | INVALID ONDELETE |
| E29 | INVALID TERMINAL CURRENCY|
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
13231
30-07-2009:15:26:39:745
d04c3bab519095ecb046eff91722e8df
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Stored Subscription Update =====
This feature allows you to perform the update of a valid stored subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier per terminal. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| NAME | Y | Display name for subscription. |
| DESCRIPTION | Y | Description explaining subscription. |
| LENGTH | Y | 0 for non ending/ multiplier of period. This does not take effect if (Subscription length * Period Type) > (End Date - Current Date). |
| CURRENCY | Y | Currency of subscription, this must either the base currency of the terminal or if supported, one of the configured allowed currencies. |
| RECURRINGAMOUNT | Y | Cost of each payment. Should only be sent if the TYPE is AUTOMATIC, otherwise an error is going to be generated. |
| INITIALAMOUNT | Y | Initial (set-up) payment to be taken off card. Payment will not be taken if it is 0. Should only be sent if the TYPE is AUTOMATIC or MANUAL, otherwise an error is going to be generated. |
| TYPE | Y | MANUAL / AUTOMATIC / AUTOMATIC (WITHOUT AMOUNTS). |
| ONUPDATE | Y | UPDATE/CONTINUE (Update name, description, recurringprice, setupprice, subscriptionlength, periodtype, type for all subscriptions/ let them finish their subscription prior to update) |
| ONDELETE | Y | CANCEL/CONTINUE (Cancel all subscriptions/Continue subscription until cancelled manually or reach end date or length). |
| CUSTOMFIELD'N' | N | Any of the available Custom Fields for the Terminal. Their values are going to be stored and can be used by the Payment Gateway later on. Their values are going to be stored and used by the Payment Gateway for the requests sent to the Receipt URL and the Validation URL. To understand more visit the section regarding **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]**. Limited to 30 custom fields in this request. |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:TYPE:NAME:CURRENCY:RECURRINGAMOUNT:INITIALAMOUNT:LENGTH:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to update stored subscription.
* **Merchant referece**: 13231.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
13231
6491002
31-07-2009:16:07:21:000
Animal Life
Magazine membership
12
EUR
15.99
10.99
AUTOMATIC
CONTINUE
CANCEL
5023bbb6726d1b5d2dcb7c77fb11b94f
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR – TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
| E20 | INVALID LENGTH |
| E21 | INVALID PERIOD TYPE |
| E22 | INVALID NAME |
| E23 | INVALID DESCRIPTION |
| E24 | INVALID RECURRINGAMOUNT |
| E25 | INVALID INITIALAMOUNT |
| E26 | INVALID TYPE |
| E27 | INVALID ONUPDATE |
| E28 | INVALID ONDELETE |
| E29 | INVALID TERMINAL CURRENCY|
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
13231
31-07-2009:16:07:21:329
0af49616cad0fd1e19bc709de7d7c934
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Stored Subscription Delete =====
This feature allows you to delete a valid stored subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier of an existing Stored Subscription, informed on registration's request. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to delete existing stored subscription.
* **Terminal**: 6491002.
* **Merchant reference**: 13231.
* **Terminal Secret**: x4n35c32RT.
13231
6491002
31-07-2009:20:49:34:798
efc5a04b5a98be9bd59ec5383abb9161
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR - TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
13231
31-07-2009:20:49:35:381
8a8f462278c730e9de5561d8f186d7dc
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Subscription Registration =====
This feature allows you to perform the registration of a subscription. Additionally to that, you can also, while registering the subscription, register a stored subscription, by just adding its fields to the request.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier for the new subscription. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| STOREDSUBSCRIPTIONREF | N | Stored Subscription Merchant Reference. \\ Only STOREDSUBSCRIPTIONREF or NEWSTOREDSUBSCRIPTIONINFO must be informed. |
| NEWSTOREDSUBSCRIPTIONINFO | N | It is allowed only if STOREDSUBSCRIPTIONREF is not set.\\ This tag and all it's children should be set if Stored Subscription on which new subscription being added should be based doesn't exist yet and should be created. Take a look at **ND003 - Stored Subscription Creation with Subcription** for details. \\ Only STOREDSUBSCRIPTIONREF or NEWSTOREDSUBSCRIPTIONINFO must be informed. |
| SECURECARDMERCHANTREF | N | Merchant Reference of a Secure Token which will be used to do set-up and recurring payments.\\ Only SECURECARDMERCHANTREF or CARDREFERENCE must be informed. |
| CARDREFERENCE | N | System-Generated Secure Token reference.\\ Only SECURECARDMERCHANTREF or CARDREFERENCE must be informed. |
| RECURRINGAMOUNT | 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. |
| INTIALAMOUNT | 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 amounts)" and new subscription is **NOT** being created. |
| STARTDATE | Y | Subscription Start Date. Format: DD-MM-YYYY. |
| ENDDATE | N | Subscription End Date, if it is not set subscription will continue until manually canceled or length reached (if it is set). Format: DD-MM-YYYY. |
| EDCCDECISION | N | This field is supported by a eDCC-enabled terminals only and will be ignored if terminal doesn't support eDCC. Can be "Y" or "N". |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| NOTIFICATIONLANGUAGE | N | Defines the language which is going to be used to send the customer's notification/ receipt. Acceptable values are 'EN' and 'FR' (case sensitive). |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
| CUSTOMFIELD'N' | N | Any of the available Custom Fields for the Terminal. Their values are going to be stored and can be used by the Payment Gateway later on. Their values are going to be stored and used by the Payment Gateway for the requests sent to the Receipt URL and the Validation URL. To understand more visit the section regarding **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]**. Limited to 30 custom fields in this request. |
|LEVEL_2_DATA | N |Component of the request that can be added in case the Level II Data feature is in use for the Terminal processing the Payment. See **ND004 - Level 2 Data Validation**. |
|LEVEL_3_DATA | N |Component of the request that can be added in case the Level 3 Data feature is in use for the Terminal processing the Payment. See **ND005 - Level 3 Data Validation**. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
If using the SECURECARDMERCHANTREF field to create the subscription:
TERMINALID:MERCHANTREF:STOREDSUBSCRIPTIONREF:SECURECARDMERCHANTREF:DATETIME:STARTDATE:SECRET
If using the CARDREFERENCE field to create the subscription:
TERMINALID:MERCHANTREF:STOREDSUBSCRIPTIONREF:CARDREFERENCE:DATETIME:STARTDATE:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
**ND003 - Stored Subscription Creation with Subcription**
The following fields represent the nested elements of NEWSTOREDSUBSCRIPTIONINFO, to be used qhen creating the stored subscription at the same time as the subscription.
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier per terminal. Length is limited to 48 chars. |
| NAME | Y | Display name for subscription. |
| DESCRIPTION | Y | Description explaining subscription. |
| PERIODTYPE | Y | Value can be: WEEKLY, FORTNIGHTLY, MONTHLY, QUARTERLY or YEARLY. |
| LENGTH | Y | 0 for non ending/ multiplier of period. This does not take effect if (Subscription length * Period Type) > (End Date - Current Date). |
| CURRENCY | Y | Currency of subscription, this must either the base currency of the terminal or if supported, one of the configured allowed currencies. |
| 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. |
| TYPE | Y | MANUAL / AUTOMATIC / AUTOMATIC (WITHOUT AMOUNTS). |
| ONUPDATE | Y | UPDATE/CONTINUE (Update name, description, recurringprice, setupprice, subscriptionlength, periodtype, type for all subscriptions/ let them finish their subscription prior to update) |
| ONDELETE | Y | CANCEL/CONTINUE (Cancel all subscriptions/Continue subscription until cancelled manually or reach end date or length). |
\\
**ND004 - Level 2 Data Validation**
This field is associated with the Transaction Enhanced Data feature, and to be used it is necessary to have the "Allow Enhanced Data (Level II and Level III)" enabled with the "Transaction Data Level" option set as "Level II" on the Processing Terminal “Features” section.
To provide a transaction with LEVEL 2, your request needs to add the LEVEL_2_DATA component and its fields, as described below.
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| CUSTOMER_REF_NUMBER | N | Text type with max length of 48 characters. This number is defined by the cardmember. It is entered by the merchant at the point of sale. |
| TAX_AMOUNT | N | Integer type, with max length of 13 numbers. A value of zero is required in order to indicate tax exempt transactions. |
| SHIPPING_ADDRESS | N | A subcomponent with all the data related to the shipping address of a purchase. |
| FULL_NAME | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. |
| ADDRESS1 | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. |
| ADDRESS2 | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. Always optional regardless compulsory setting. |
| CITY | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 128 characters. |
| REGION | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 128 characters. |
| POSTCODE | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 50 characters. |
| COUNTRY | N | Subfield of SHIPPING_ADDRESS. Value is text type, with 2 characters. ISO ALPHA-2 Country Code. |
\\
Quick example:
SDGK-JSAAS-0235.00002314
151.27
JOHN SMITH AND ASSOCIATES
Unit 001, Street X
Block "A", Neighborhood "A"
City "Y"
Region 1
A00B0001
Country "Z"
\\
**ND005 - Level 3 Data Validation**
This field is associated with the Transaction Enhanced Data feature, and to be used it is necessary to have the "Allow Enhanced Data (Level II and Level III)" enabled with the "Transaction Data Level" option set as "Level III" on the Processing Terminal “Features” section.
To provide a transaction with LEVEL 3, your request needs to add the LEVEL_2_DATA (described before) and the LEVEL_3_DATA components and their fields. The LEVEL_3_DATA component fields are described below.
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| SUMMARY | N | Subcomponent of Level 3. Agregates the sums of different values within the transaction. |
| TOTAL_DISCOUNT_AMOUNT | N | Subfield of SUMMARY. Represents the total value assigned as discount to the sale. That considers the resulting sum from all items' discunts rates (unit price x quantity x discount rate) and any other additional discount applied after that. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| TOTAL_FREIGHT_AMOUNT | N | Subfield of SUMMARY. Represents the freight amount applied to the sale. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| TOTAL_DUTY_AMOUNT | N | Subfield of SUMMARY. Represents the duty amount applied to the sale. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| LINE_ITEMS | N | Subcomponent of Level 3. List of all items in which the sale is broken down. |
| LINE_ITEM | N | Subfield of LINE_ITEMS. Holds all the details of a sale's item. You can add as much as necessary to express the breaking down of your sale. |
| COMMODITY_CODE | N | Subfield of LINE_ITEM. Item's commodidy code, defined for trade tariff. Widely used by corporate purchasing organizations to segment and manage their total spend across diverse product lines. Defined at government or commercial aggrements level. Consult your Acquirer for more details. |
| PRODUCT_CODE | N | Subfield of LINE_ITEM. This is the merchant’s identifier for the product, also known as Universal Product code (UPC). |
| DESCRIPTION | N | Subfield of LINE_ITEM. This is the merchant’s description for the product. |
| QUANTITY | N | Subfield of LINE_ITEM. Quantity of the specific item for the sale. |
| UNIT_OF_MEASURE | N | Subfield of LINE_ITEM. Measure unit used for this specific item type to sell it in parts, units or sets. |
| UNIT_PRICE | N | Subfield of LINE_ITEM. Unit price applied for that specific type of item and measure unit, within the sale. |
| DISCOUNT_RATE | N | Subfield of LINE_ITEM. A % of discount applied to the item total (quantity x unit price) before taxes. |
| TAX_RATE | N | Subfield of LINE_ITEM. A % of tax applied to the item total (quantity x unit price) after discounts. |
| TOTAL_AMOUNT | N | Subfield of LINE_ITEM. Final item value based on total (quantity x unit price), after discount and tax applied. |
\\
Quick example:
...
61.30
3.50
11.50
PDX001
DSV1303.090.00001
General services
10
Hour
105.50
5.00
12.50
1127.53
PDX002
DSV1302.090.00001
General services
2
Hour
85.50
5.00
16.00
188.44
**DON'T FORGET**
If you are using LEVEL_3_DATA component, also add to your request the LEVEL_2_DATA 2 component to attempt a fully qualification for enhanced data.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to create a subscription.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR01-02
6491002
MR01
7126
30-07-2009:15:34:23:671
01-08-2009
31-07-2010
Y
99a8addc5cac111c21a9aa48aae3c363
9238746529
44
\\
* **Scenario**: Request to create a subscription, creating a stored subscription at the same time.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR02-02
6491002
7126
30-07-2009:15:34:23:671
01-08-2009
31-07-2010
Y
MR001
Animal Life
Magazine membership
MONTHLY
12
EUR
15.87
10.99
AUTOMATIC
CONTINUE
CANCEL
8515ccc5605651c12ab0645f79eb0271
9238746529
44
\\
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR - TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
| E20 | INVALID LENGTH |
| E21 | INVALID PERIOD TYPE |
| E22 | INVALID NAME |
| E23 | INVALID DESCRIPTION |
| E24 | INVALID RECURRINGAMOUNT |
| E25 | INVALID INITIALAMOUNT |
| 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 TOKENS MERCHANT REF |
| E33 | INVALID STARTDATE |
| E34 | INVALID ENDDATE |
| E35 | INVALID EDCCDCECISION |
| E36 | SETUP PAYMENT PROCESSING ERROR |
| E37 | INVALID SUBSCRIPTIONRECURRINGAMOUNT |
| E38 | INVALID SUBSCRIPTIONINITIALAMOUNT |
| E39 | SECURE CARD NOT VALIDATED |
| E48 | INVALID SECURE CARD REFERENCE |
| E49 | SECURECARDMERCHANTREF AND CARDREFERENCE ARE ABSENT (ONLY ONE OF THEM IS REQUIRED) |
| E50 | SECURECARDMERCHANTREF AND CARDREFERENCE ARE BOTH PRESENT (ONLY ONE OF THEM IS REQUIRED) |
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR02-02
30-07-2009:15:34:24:305
8bb39be67a1f05bf73fe334e12037257
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Subscription Update =====
This feature allows you to perform the update of an existing and valid subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier for the subscription to be updated. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| SECURECARDMERCHANTREF | N | Merchant Reference of a Secure Token which will be used to do set-up and recurring payments.\\ Only SECURECARDMERCHANTREF or CARDREFERENCE must be informed. |
| CARDREFERENCE | N | System-Generated Secure Token reference.\\ Only SECURECARDMERCHANTREF or CARDREFERENCE must be informed. |
| NAME | Y | Display name for subscription. |
| DESCRIPTION | Y | Description explaining subscription. |
| LENGTH | Y | 0 for non ending/ multiplier of period. This does not take effect if (Subscription length * Period Type) > (End Date - Current Date). |
| RECURRINGAMOUNT | N | Cost of each payment. Should only be sent if stored subscription type is "AUTOMATIC (WITHOUT AMOUNTS)". |
| STARTDATE | Y | Subscription Start Date. Format: DD-MM-YYYY. |
| ENDDATE | N | Subscription End Date, if it is not set subscription will continue until manually canceled or length reached (if it is set). Format: DD-MM-YYYY. |
| EDCCDECISION | N | This field is supported by a eDCC-enabled terminals only and will be ignored if terminal doesn't support eDCC. Can be "Y" or "N". |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| NOTIFICATIONLANGUAGE | N | Defines the language which is going to be used to send the customer's notification/ receipt. Acceptable values are 'EN' and 'FR' (case sensitive). |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
| CUSTOMFIELD'N' | N | Any of the available Custom Fields for the Terminal. Their values are going to be stored and can be used by the Payment Gateway later on. Their values are going to be stored and used by the Payment Gateway for the requests sent to the Receipt URL and the Validation URL. To understand more visit the section regarding **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]**. Limited to 30 custom fields in this request. |
|LEVEL_2_DATA | N |Component of the request that can be added in case the Level II Data feature is in use for the Terminal processing the Payment. See **ND003 - Level 2 Data Validation**. |
|LEVEL_3_DATA | N |Component of the request that can be added in case the Level 3 Data feature is in use for the Terminal processing the Payment. See **ND004 - Level 3 Data Validation**. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
If you are using the SECURECARDMERCHANTREF:
TERMINALID:MERCHANTREF:SECURECARDMERCHANTREF:DATETIME:STARTDATE:SECRET
If you are using the CARDREFERENCE:
TERMINALID:MERCHANTREF:CARDREFERENCE:DATETIME:STARTDATE:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
**ND003 - Level 2 Data Validation**
This field is associated with the Transaction Enhanced Data feature, and to be used it is necessary to have the "Allow Enhanced Data (Level II and Level III)" enabled with the "Transaction Data Level" option set as "Level II" on the Processing Terminal “Features” section.
To provide a transaction with LEVEL 2, your request needs to add the LEVEL_2_DATA component and its fields, as described below.
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| CUSTOMER_REF_NUMBER | N | Text type with max length of 48 characters. This number is defined by the cardmember. It is entered by the merchant at the point of sale. |
| TAX_AMOUNT | N | Integer type, with max length of 13 numbers. A value of zero is required in order to indicate tax exempt transactions. |
| SHIPPING_ADDRESS | N | A subcomponent with all the data related to the shipping address of a purchase. |
| FULL_NAME | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. |
| ADDRESS1 | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. |
| ADDRESS2 | N | Subfield of SHIPPING_ADDRESS. Value is text type, with max length of 50 characters. Always optional regardless compulsory setting. |
| CITY | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 128 characters. |
| REGION | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 128 characters. |
| POSTCODE | N | Subfield of SHIPPING_ADDRESS. Value is text type, between 1 and 50 characters. |
| COUNTRY | N | Subfield of SHIPPING_ADDRESS. Value is text type, with 2 characters. ISO ALPHA-2 Country Code. |
\\
Quick example:
SDGK-JSAAS-0235.00002314
151.27
JOHN SMITH AND ASSOCIATES
Unit 001, Street X
Block "A", Neighborhood "A"
City "Y"
Region 1
A00B0001
Country "Z"
\\
**ND004 - Level 3 Data Validation**
This field is associated with the Transaction Enhanced Data feature, and to be used it is necessary to have the "Allow Enhanced Data (Level II and Level III)" enabled with the "Transaction Data Level" option set as "Level III" on the Processing Terminal “Features” section.
To provide a transaction with LEVEL 3, your request needs to add the LEVEL_2_DATA (described before) and the LEVEL_3_DATA components and their fields. The LEVEL_3_DATA component fields are described below.
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| SUMMARY | N | Subcomponent of Level 3. Agregates the sums of different values within the transaction. |
| TOTAL_DISCOUNT_AMOUNT | N | Subfield of SUMMARY. Represents the total value assigned as discount to the sale. That considers the resulting sum from all items' discunts rates (unit price x quantity x discount rate) and any other additional discount applied after that. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| TOTAL_FREIGHT_AMOUNT | N | Subfield of SUMMARY. Represents the freight amount applied to the sale. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| TOTAL_DUTY_AMOUNT | N | Subfield of SUMMARY. Represents the duty amount applied to the sale. \\ Decimal value, allowing max of 13 digits with min value of 0. |
| LINE_ITEMS | N | Subcomponent of Level 3. List of all items in which the sale is broken down. |
| LINE_ITEM | N | Subfield of LINE_ITEMS. Holds all the details of a sale's item. You can add as much as necessary to express the breaking down of your sale. |
| COMMODITY_CODE | N | Subfield of LINE_ITEM. Item's commodidy code, defined for trade tariff. Widely used by corporate purchasing organizations to segment and manage their total spend across diverse product lines. Defined at government or commercial aggrements level. Consult your Acquirer for more details. |
| PRODUCT_CODE | N | Subfield of LINE_ITEM. This is the merchant’s identifier for the product, also known as Universal Product code (UPC). |
| DESCRIPTION | N | Subfield of LINE_ITEM. This is the merchant’s description for the product. |
| QUANTITY | N | Subfield of LINE_ITEM. Quantity of the specific item for the sale. |
| UNIT_OF_MEASURE | N | Subfield of LINE_ITEM. Measure unit used for this specific item type to sell it in parts, units or sets. |
| UNIT_PRICE | N | Subfield of LINE_ITEM. Unit price applied for that specific type of item and measure unit, within the sale. |
| DISCOUNT_RATE | N | Subfield of LINE_ITEM. A % of discount applied to the item total (quantity x unit price) before taxes. |
| TAX_RATE | N | Subfield of LINE_ITEM. A % of tax applied to the item total (quantity x unit price) after discounts. |
| TOTAL_AMOUNT | N | Subfield of LINE_ITEM. Final item value based on total (quantity x unit price), after discount and tax applied. |
\\
Quick example:
...
61.30
3.50
11.50
PDX001
DSV1303.090.00001
General services
10
Hour
105.50
5.00
12.50
1127.53
PDX002
DSV1302.090.00001
General services
2
Hour
85.50
5.00
16.00
188.44
**DON'T FORGET**
If you are using LEVEL_3_DATA component, also add to your request the LEVEL_2_DATA 2 component to attempt a fully qualification for enhanced data.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to update valid subscription.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR001
6491002
8328
30-07-2009:09:59:38:921
Animal Life
Magazine membership
MONTHLY
12
15.87
23-08-2009
22-08-2010
Y
53b6917aac8eb179e8b80f754c4afd5c
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR - TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
| E20 | INVALID LENGTH |
| E21 | INVALID PERIOD TYPE |
| E22 | INVALID NAME |
| E23 | INVALID DESCRIPTION |
| E24 | INVALID RECURRINGAMOUNT |
| E25 | INVALID INITIALAMOUNT |
| 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 CARDS MERCHANT REF |
| E33 | INVALID STARTDATE |
| E34 | INVALID ENDDATE |
| E35 | INVALID EDCCDCECISION |
| 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 SECURECARDACHACCOUNTMERCHANTREF |
| E48 | INVALID SECURE CARD REFERENCE |
| E49 | SECURECARDMERCHANTREF AND CARDREFERENCE ARE ABSENT (ONLY ONE OF THEM IS REQUIRED) |
| E50 | SECURECARDMERCHANTREF AND CARDREFERENCE ARE BOTH PRESENT (ONLY ONE OF THEM IS REQUIRED) |
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR02-02
30-07-2009:15:34:24:305
8bb39be67a1f05bf73fe334e12037257
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Subscription Delete =====
This feature allows you to delete an existing subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| MERCHANTREF | Y | Unique merchant identifier for the subscription to be deleted. Length is limited to 48 chars. |
| TERMINALID | Y | A Terminal ID provided by %CompanyName. |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
==== Examples for a Request ====
* **Scenario**: Simple request to delete a subscription.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR002
6491002
31-07-2009:11:03:42:328
53b6917aac8eb179e8b80f754c4afd5c
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| MERCHANTREF | Same as the one informed on request. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:MERCHANTREF:DATETIME:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
**ND003 - Response Codes - Errors**
^ **Error Code** ^ **Description** ^
| E01 | SYSTEM ERROR - TRY AGAIN |
| E03 | OPERATION NOT ALLOWED |
| E06 | INVALID TERMINALID |
| E07 | METHOD NOT SUPPORTED |
| E08 | INVALID MERCHANTREF |
| E09 | INVALID DATETIME |
| E13 | INVALID HASH |
\\
==== Examples for the Response ====
* **Scenario**: Response to the simple request.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
MR02-02
30-07-2009:15:34:24:305
8bb39be67a1f05bf73fe334e12037257
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Subscription Payment =====
Manual recurring payment can be done using this subscription feature. Also, when an automatic subscription has any problems and could not process a payment automatically, because of card details expiration or other issue, this missing payment can also be executed in the same way as a manual subscription payment, after the problems with the payment details is solved.
This feature allows you to perform a payment of a subscription.
* **Main Request body Tag**:
* **Main Response body Tag**:
==== Request Body Fields ====
^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^
| ORDERID | Y | A unique identifier for the order created by the merchant. Maximum of 24 characters. |
| TERMINALID | Y | A TerminalID provided by %CompanyName. |
| 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 | Tag contains Dynamic Currency Conversion information. It has to be present in the eDCC enabled transactions.\\ See the next section, **ND003 - Using eDCC**, for more details on this field. |
| EMAIL | N | Cardholder e-mail address. |
| DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:ORDERID:SUBSCRIPTIONREF:AMOUNT:DATETIME:SECRET
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
**ND003 - Using eDCC**
All eDCC enabled XML requests must include FOREIGNCURRENCYINFORMATION tag and it nested tags.
^ **PARAMETER NAME** ^ **REQUIRED** ^ **DESCRIPTION** ^
| CARDCURRENCY | Y | Card's currency code. |
| CARDAMOUNT | Y | Amount which is supposed to be charged in the home currency. |
| CONVERSIONRATE | Y | Value received in the Conversion Rate request should be there. Processing bank (EuroConex) will decline transaction if wrong rate will be there. |
Those fields can be obtained by using the **[[developer:api_specification:xml_payment_features#edcc_exchange_rate| eDCC Exchange Rate ]]** feature.
\\
==== Examples for a Request ====
* **Scenario**: Simple subscription payment request with FOREIGNCURRENCYINFORMATION.
* **Terminal**: 6491002.
* **Terminal Secret**: x4n35c32RT.
8362
6491002
87.78
311
JPY
10638
121.186190
cardholder_email@worldnettps.com
31-07-2009:14:09:59:121
53b6917aac8eb179e8b80f754c4afd5c
132453462
FG00001
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
==== Response Body Fields ====
The response body fields will be:
^ **FIELD** ^ **DESCRIPTION** ^
| RESPONSECODE | **A**: (APPROVED/ AUTHORIZED/ ACCEPTED, respectively). \\ **E**: (ACCEPTED for later processing, but result currently unknown - specifically for China Union Pay). \\ **D**: (DECLINED). \\ **R**: (REFERRED, also considered as PICKUP). \\ **C**: (PICKUP, also known as Referral A or Referral B). \\ For more details, visit at **[[merchant:existing_merchant:other_information:transaction_responses|Transaction Responses]]**. |
| RESPONSETEXT | The text of the authorization. |
| APPROVALCODE | A 6 digit AuthCode. |
| DATETIME | Response date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details on the Response ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
TERMINALID:UNIQUEREF:AMOUNT:DATETIME:RESPONSECODE:RESPONSETEXT:SECRET
\\
**ND002 - Error Handling**
If there is an error processing the transaction, the error string is returned in an XML message with the simple tags:
This is the error generated!
\\
==== Examples for the Response ====
* **Scenario**: .
* **Terminal**: .
* **Terminal Secret**: x4n35c32RT.
A
APPROVAL
406243
31-07-2009:14:10:03:834
6dd32c4b61f180dd791310f9c07d76a1
**REMEMBER** to change the Terminal Id and Terminal Secret for valid values.
Verify the **[[developer:integration_docs|Integration Docs]]** for viable examples or contact our support team.
\\
===== Subscriptions Notification =====
The subscription notification is a feature which allows the Payment Gateway to notify the Merchant about events associated to its subscriptions.
This is only possible when the Subscription Notification URL is informed at the Terminal configuration - you can see it at the Terminal Setup page of the %SelfCare System.
If the URL is in place, a POST notification will be sent to this URL each time an automated activity happens on any active subscriptions. Note that manual changes applied to subscriptions via the %SelfCare System will not generate these notifications.
\\
==== Request Body Fields ====
The data sent to the Subscription Notification URL contains all the normal subscription response fields (depending on the action performed, as NOTIFICATIOTYPE), plus the following extra fields below. So, to know how each notification body works, you need to consider the same body of each feature of the Subscription solution, then add the following fields:
^ **FIELD** ^ **DESCRIPTION** ^
| NOTIFICATIONTYPE | **Possible values for subscriptions**:\\ SUBSCRIPTIONCREATION.\\ SUBSCRIPTIONUPDATING .\\ SUBSCRIPTIONDELETION .\\ SUBSCRIPTIONSETUPPAYMENT .\\ SUBSCRIPTIONRECURRINGPAYMENT .\\ **Possible values for stored subscriptions**:\\ STOREDSUBSCRIPTIONCREATION .\\ STOREDSUBSCRIPTIONUPDATING .\\ STOREDSUBSCRIPTIONDELETION. |
| ORDERID | The Order ID that the system assigned to the Subscription payment. Only sent for SUBSCRIPTIONSETUPPAYMENT and SUBSCRIPTIONRECURRINGPAYMENT. Maximum of 24 characters. |
| UNIQUEREF | Generated reference for the transaction resulting from the subscription processing. Not returned for stored subscription actions. |
| TERMINALID | The Terminal ID that the subscription is set up on. |
| AMOUNT | The amount of the subscription payment as a 2 digit decimal or an Integer value for JPY amounts. Only sent for SUBSCRIPTIONSETUPPAYMENT and SUBSCRIPTIONRECURRINGPAYMENT. |
| DATETIME | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. |
| HASH | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. |
\\
==== Notes and Details About the Request ====
**ND001 - Hash Formation**
The general rule to build HASH field is given at the **[[developer:api_specification:special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:api_specification:special_fields_and_parameters#the_hash_parameter|Special Fields and Parameters]]** section. For this specific feature, you should use the following formats:
When the NOTIFICATIONTYPE is SUBSCRIPTIONSETUPPAYMENT or SUBSCRIPTIONRECURRINGPAYMENT:
TERMINALID:MERCHANTREF:NOTIFICATIONTYPE:DATETIME:ORDERID:AMOUNT:RESPONSECODE:RESPONSETEXT:SECRET
Any other case:
TERMINALID:MERCHANTREF:NOTIFICATIONTYPE:DATETIME:RESPONSECODE:RESPONSETEXT:SECRET
Note that for Stored Subscriptions, RESPONSECODE and RESPONSETEXT, will always be blank.
\\
**ND002 - Data Encoding for Requests**
All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
\\
==== Response Body Fields ====
The successful response expected to this request is a body containing a “OK” with a HTTP Status of 200.
Anything else will be considered an unsuccessful attempt of notification by the Payment Gateway.