This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next 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 17:47] robinc [Notes and Details on the Response] |
||
---|---|---|---|
Line 461: | Line 461: | ||
\\ | \\ | ||
+ | |||
+ | ===== 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> | ||
+ | |||