Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:api_specification:xml_payment_features_einvoice [2018/12/03 10:26]
127.0.0.1 external edit
developer:api_specification:xml_payment_features_einvoice [2019/05/20 18:24]
robinc Added Cancel Payment Link content
Line 462: Line 462:
 \\ \\
  
 +===== Get Payment Link =====
  
 +This feature allows you to retrieve the details of an existing payment link.
 +
 +  * **Main Request body Tag**: <​GET_PAYMENT_LINK> ​
 +  * **Main Response body Tag**: GET_PAYMENT_LINK_RESPONSE>​
 +
 +==== Request Body Fields ====
 +
 +^ **FIELD** ​        ^ **REQUIRED** ​ ^ **DESCRIPTION** ^
 +| TERMINALID ​        |Y| A Terminal ID provided by Nuvei in which the payment was created.|
 +| MERCHANTREF ​        | Y|This is the identifier used to create the payment link. |
 +| DATETIME ​            |Y| Request date and time. Format: YYYY-MM-DDTHH:​MM:​SS|
 +| 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 the HASH field is given on the [[developer:​api_specification:​special_fields_and_parameters|Special Fields and Parameters]] page, under the Special Fields and Parameters section. For this specific feature, you should use the following format.
 +
 +<WRAP center box 100%>
 +TERMINALID:​MERCHANTREF:​DATETIME:​TERMINALSECRET
 +</​WRAP>​
 +
 +**ND002 - Data Encoding for Request**
 +
 +All data sent to us should be correctly encoded using **UTF-8** as the character encoding.
 +
 +==== Examples for a Request ====
 +
 +  * **Scenario**:​ Retrieve a payment link to check its status. ​
 +  * *Terminal**:​ 6491002
 +  * *Terminal Secret**: x4n35c32RT
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​GET_PAYMENT_LINK>​
 +    <​TERMINALID>​6491002</​TERMINALID>​
 +    <​MERCHANTREF>​USD</​MERCHANTREF>​
 +    <​DATETIME>​06-03-2018:​17:​41:​08:​273</​DATETIME>​
 +    <​HASH>​69c10527f4c5f0cb3ce0e6bcf0957503c6e0f9dbdccd01bf4e7a685c2ffb272057f6e5831a2e3d1a298abd137b891db31a6a69ff443d8b01ee37d0d789c04ecf</​HASH>​
 +</​GET_PAYMENT_LINK>​
 +</​code>​
 +
 +<WRAP center important 100%>
 +**REMEMBER** to change the Terminal ID and Terminal Secret for valid values. Consult the Integration Docs for examples or contact our support team.
 +</​WRAP>​
 +
 +==== Response Body Fields ====
 +
 +If the cancellation is successful, you are going to receive a response with the following fields:
 +
 +^ **FIELD** ​         ^ **DESCRIPTION** ^
 +| TERMINALID ​        | The Terminal ID informed on request.|
 +| MERCHANTREF ​        |The Merchant Ref informed on request. |
 +| ORDERID ​           | Order ID which is going to be used for the payment attempts. |
 +|AUTH_TYPE ​         | Authorization type (1-auth or 2-pre-auth) defined on creation.|
 +| CURRENCY ​        | Currency provided on creation to be used in each payment attempt.|
 +| AMOUNT ​       |Payment value. |
 +| DESCRIPTION ​          | Description about the payment requested and sent to the customer. |
 +|CREATION_DATE ​         | Creation date of the payment link.|
 +| EXPIRATION_DATE ​        | Due date of the payment link.|
 +| PAYMENT_LINK_STATUS ​       |Current status of the payment link. OPEN, CANCELLED, EXPIRED or COMPLETE. |
 +| PAY_NOW_URL ​         | URL/Link which can be sent (or was sent) to a customer, so the payment can be performed.|
 +| DATETIME ​         | Response date and time. Format: YYYY-MM-DDTHH:​MM:​SS.|
 +| HASH          | A HASH code formed by the response fields. The formation rule is given at the ND001 - Hash Formation, the next section.|
 +
 +==== Notes and Details on the Response ====
 +
 +**ND001 - Hash Formation**
 +
 +The general rule to build the HASH field is given on the [[developer:​api_specification:​special_fields_and_parameters|Special Fields and Parameters]] page, under the Special Fields and Parameters section. For this specific feature, you should use the following format:
 +
 +<WRAP center box 100%>
 +TERMINALID:​MERCHANTREF:​ORDERID:​AUTH_TYPE:​CURRENCY:​AMOUNT:​DESCRIPTION:​CREATION_DATE:​EXPIRATION_DATE:​PAYMENT_LINK_STATUS:​PAY_NOW_URL:​DATETIME:​TERMINAL SECRET
 +</​WRAP>​
 +
 +**ND002 - Error Handling**
 +
 +If there is an error processing the transaction,​ the error string is returned in an XML message with the simple tags:
 +
 +<code xml>
 +<​ERROR>​
 +    <​ERRORSTRING>​This is the error generated!</​ERRORSTRING>​
 +</​ERROR>​
 +</​code>​
 +
 +Possible error for this subfeature:
 +
 +^ **ERROR** ​         ^ **MESSAGE** ^
 +| Cannot find terminal or terminal is deactivated ​       | Invalid TERMINALID field|
 +| Datetime is invalid ​       |Invalid DATETIME field |
 +| Hash is invalid ​           | Invalid HASH field|
 +| Terminal is not configured ​         | Terminal is not configured|
 +| Terminal informed does not have feature ​      | erminal does not support Invoice Payment Request|
 +| Payment Link not found       ​|Invoice Payment Request does not exist |
 +
 +==== Examples for the Response ====
 +
 +  * **Scenario**:​ Response for a successful cancellation.
 +  * **Terminal**:​ 6491002.
 +  * **Terminal Secret**: x4n35c32RT
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​GET_PAYMENT_LINK_RESPONSE>​
 +       <​TERMINALID>​6491002</​TERMINALID>​
 +       <​MERCHANTREF>​A1B2C3</​MERCHANTREF>​
 +       <​ORDERID>​PBL_JJW45945AEVSRG</​ORDERID>​
 +       <​AUTH_TYPE>​1</​AUTH_TYPE>​
 +       <​CURRENCY>​USD</​CURRENCY>​
 +       <​AMOUNT>​13.95</​AMOUNT>​
 +       <​DESCRIPTION>​miscellaneous goods and services</​DESCRIPTION>​
 +       <​CREATION_DATE>​31/​01/​2019</​CREATION_DATE>​
 +       <​EXPIRATION_DATE>​31/​01/​2019</​EXPIRATION_DATE>​
 +       <​PAYMENT_LINK_STATUS>​CANCELLED</​PAYMENT_LINK_STATUS>​
 +       <​PAY_NOW_URL>​https://​gatewayhost/​merchant/​paymentlink?​token=a04c2fb6-a341-4c22-829b-5ee6e56b8f90</​PAY_NOW_URL>​
 +       <​DATETIME>​06-03-2018:​17:​41:​08:​273</​DATETIME>​
 +       <​HASH>​69c10527f4c5f0cb3ce0e6bcf0957503c6e0f9dbdccd01bf4e7a685c2ffb272057f6e5831a2e3d1a298abd137b891db31a6a69ff443d8b01ee37d0d789c04ecf</​HASH>​
 +</​GET_PAYMENT_LINK_RESPONSE>​
 +</​code>​
 +
 +<WRAP center important 100%>
 +**REMEMBER** to change the Terminal ID and Terminal Secret to valid values. Consult the [[developer:​integration_docs|Integration Docs]] for examples or contact our support team.
 +</​WRAP>​
 +
 +===== Cancel Payment Link =====
 +
 +This feature allows you to cancel an existing payment link.
 +
 +  * **Main Request body Tag**: <​CANCEL_PAYMENT_LINK> ​
 +  * **Main Response body Tag**: <​CANCEL_PAYMENT_LINK_RESPONSE>​
 +
 +==== Request Body Fields ====
 +
 +^ **FIELD** ​        ^ **REQUIRED** ​ ^ **DESCRIPTION** ^
 +| TERMINALID ​        |Y| A Terminal ID provided by Nuvei, in which the payment was created.|
 +| MERCHANTREF ​        | Y| This is the identifier used to create the payment link. |
 +| DATETIME ​            |Y| Request date and time. Format: YYYY-MM-DDTHH:​MM:​SS. |
 +| 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 the HASH field is given on the [[developer:​api_specification:​special_fields_and_parameters|Special Fields and Parameters]] page, under Special Fields and Parameters section. For this specific feature, you should use the following format.
 +
 +<WRAP center box 100%>
 +TERMINALID:​MERCHANTREF:​DATETIME:​TERMINALSECRET
 +</​WRAP>​
 +
 +ND002 - Data Encoding for Requests
 +
 +All data sent to us shold be correctly encoded using UTF-8 as the character encoding.
 +
 +ND003 - General Constraints
 +
 +^ **CONTRAINT** ​        ^ **DESCRIPTION** ^
 +| C001         | You can only cancel payment links that are still OPEN (status). If they are already cancelled, expired or complete, you are not going to be able to cancel them and an error will be returned.|
 +
 +==== Examples for a Request ====
 +
 +  * **Scenario**:​ Cancel a payment link you don't want to be paid anymore.
 +  * **Terminal**:​ 6491002.
 +  * **Terminal Secret**:​x4n35c32RT.
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​CANCEL_PAYMENT_LINK>​
 +    <​TERMINALID>​3614043</​TERMINALID>​
 +    <​MERCHANTREF>​XML_JAN22002</​MERCHANTREF>​
 +    <​DATETIME>​06-03-2018:​17:​41:​08:​273</​DATETIME>​
 +    <​HASH>​7777552e7a847fd7e42c979dc42180a3772e5685b9e117589048595af9a7f872f5b7e6ce9d6213622889a7cfc1fbeb50f39a64bf4bdf32db3aae64f775c679d9</​HASH>​
 +</​CANCEL_PAYMENT_LINK>​
 +</​code>​
 +
 +<WRAP center important 100%>
 +**REMEMBER** to change the Terminal ID and Terminal Secret for valid values. Consult the [[developer:​integration_docs|Integration Docs]] for examples or contact our support team.
 +</​WRAP>​
 +
 +==== Response Body Fields ====
 +
 +If the cancellation is successful, you are going to receive a response with the following fields:
 +
 +^ **FIELD** ​          ^ **DESCRIPTION** ^
 +| TERMINALID ​        | The Terminal ID informed on request.|
 +| MERCHANTREF ​        |The Merchant Ref informed on request. |
 +| DATETIME ​            | Request date and time. Format: YYYY-MM-DDTHH:​MM:​SS|
 +| 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 the HASH field is given on the [[developer:​api_specification:​special_fields_and_parameters|Special Fields and Parameters]] page, under the Special Fields and Parameters section. For this specific feature, you should use the following format.
 +
 +<WRAP center box 100%>
 +TERMINALID:​MERCHANTREF:​DATETIME:​TERMINAL SECRET
 +</​WRAP>​
 +
 +**ND002 - Error Handling**
 +
 +^ *ERROR** ​          ^ MESSAGE** ^
 +| Cannot find terminal or terminal is deactivated ​        | Invalid TERMINALID field|
 +| Datetime is invalid ​       |Invalid DATETIME field |
 +| Hash is invalid ​            | Invalid HASH field|
 +| Terminal is not configured ​          | Terminal is not configured|
 +| Terminal informed does not have feature ​      ​|Terminal does not support Invoice Payment Request |
 +| Payment Link not found            | Invoice Payment Request does not exist|
 +| Payment Link status is not OPEN          |Cannot cancel an Invoice Payment Request with status different from Open|
 +
 +==== Examples for the Response ====
 +
 +  * **Scenario**:​ Response for a successful cancellation. ​
 +  * **Terminal**:​ 6491002.
 +  * **Terminal Secret**: x4n35c32RT.
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​CANCEL_PAYMENT_LINK_RESPONSE>​
 +    <​TERMINALID>​3614043</​TERMINALID>​
 +    <​MERCHANTREF>​XML_JAN22002</​MERCHANTREF>​
 +    <​DATETIME>​22-01-2019:​14:​57:​23:​770</​DATETIME>​
 +    <​HASH>​8b304d77a9b621a99de4e97f8bf8d8b72ae2787315a13688ea8a2acbb02956401e6d3099d866e54dd4fdac8a0b31e481385fffaf75ad53ec1885b9beef780df6</​HASH>​
 +</​CANCEL_PAYMENT_LINK_RESPONSE>​
 +</​code>​
 +
 +<WRAP center important 100%>
 +**REMEMBER** to change the Terminal ID and Terminal Secret for valid values. Consult the [[developer:​integration_docs|Intregration Docs]] for examples or contact our support team.
 +</​WRAP>​
  
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International