====== XML Subscription Features ======
~~TOC~~
\\
The subscription features, presented in this page, allow your integration to manage recurring payments in the Gateway Platform.
The Nuvei 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 | https://testpayments.nuvei.com/merchant/xmlpayment |
| XML XSD descriptor | https://testpayments.nuvei.com/merchant/gateway.xsd |
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 Nuvei. |
| 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 Nuvei. |
| 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 Nuvei. |
| 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 Nuvei. |
| 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". |
| 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. |
| 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. |
\\
==== 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). |
\\
==== 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 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 |
| 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 Nuvei. |
| 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". |
| 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. |
| 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. |
\\
==== 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.
\\
==== 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 Nuvei. |
| 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 Nuvei. |
| 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. |
| 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.