Steps to implement a cancellation.
If required, a sale made on the same day can be canceled by consuming the cancellation service.
To make a cancellation, it is necessary to have the following information:
- {{serialNumber}} : Serial number. 10-digit numeric string located on the back of the terminal (S/N).
- {{storeId}} : Merchant identifier number assigned by terminal.
- {{access_token}} : Access token needed to consume the service. See Generate Token section.
- {{orderId}} : Order number generated when making a sale. See information on Receiving the response.
- traceability: JSON object to send relevant information for trade (Optional).
Nota.
- The terminal must have internet access at all times without restrictions to the domain and subdomains *.netpay.com.mx to receive and send requests.
- The terminal screen must be on and the main screen of the application must be in the foreground.
- You can only cancel a transaction made on the same day, and the cancellation must be requested before 8:00 p.m. Mexico City time for the full amount.
5.1 Structure of a request.
POST http://nubeqa.netpay.com.mx:3334/integration-service/transactions/cancel
Headers
The following headers must be sent in the request
- Content-Type: application/json
- Authorization: Bearer {{access_token}}
Body
In the request, a JSON object must be sent with the data as required.
{"traceability": {},
"serialNumber": "{serialNumber}",
"orderId": "{orderId}",
"storeId": "{storeId}",
}
Note.
The 3 minimum required values are serialNumber, orderId, storeId.
5.2 Example request / response.
Below are examples in different programming languages to make a request and request a cancellation.