Steps to implement a sale.
Now that you've been able to authorize your application and obtain an access_token, the next step is to perform a test transaction. Remember that you must connect the terminal to the internet, configure the application to be able to make a sale and configure the response service as indicated in the [Introduction] section. %C3%B3n-8#before-begin)
To make a sale, it is necessary to have the following information:
- traceability: JSON object to send relevant information for the trade.
- {{serialNumber}} : Serial number. 10-digit numeric string located on the back of the terminal (S/N).
- {{storeId}} : Merchant identifier number assigned by terminal.
- {{msi}} : Number that identifies the MSI promotion to be integrated Ex: 3, 6, 9, 12 or 18 msi (this promotion does not apply to Amex cards) (This data is not mandatory, only if the client it requires).
- {{folioNumber}} : Folio number that will be shown on the ticket.
- {{access_token}} : Access token needed to consume the service. See Generate Token section.
4.1 Things to keep in mind.
- The terminal must have internet access at all times without restrictions to the domain and subdomains involving *.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.
4.2 Structure of a request.
POST http://nubeqa.netpay.com.mx:3334/integration-service/transactions/sale
Headers
The following headers must be sent in the request
- Content-Type: application/json
- Authorization: Bearer {{access_token}}
Nombre | Descripción | Tipo | Valor | Requerido |
---|---|---|---|---|
Content-Type | Two-part identifier for file formats transmitted over the Internet. | string | application/json | true |
Authorization | HTTP authentication scheme. | string | Bearer {access_token} | true |
Body
En la petición, se debe mandar un objeto JSON con los datos según se requieran. Los 5 valores mínimos requeridos son serialNumber, amount, storeId, traceability y folionumber.
{
"serialNumber": "{serialNumber}",
"amount": "{{amount}}",
"storeId": "{storeId}",
"folioNumber":"{folioNumber}",
"msi":"{msi}"
"traceability": {}
}
Ejemplo:
{
"traceability": {
"idProducto": "123456",
"idTienda": 0987
},
"serialNumber": "1400000000",
"amount":0.01,
"folioNumber":"123",
"storeId": "9194",
"msi":"03"
}
Tabla de parámetros mandatorios a enviar en una petición de Venta.
Field Name | Description | Data type |
---|---|---|
serialNumber | Serial number of the device to which the request is required to be sent. | String (Maximum up to 20 characters) |
amount | Total amount of the transaction. | Double(15,2) |
storeId | Identifier of the store assigned to the device. | String (Maximum up to 38 caracteres) |
folioNumber | Transaction identification number that can be sent in the sale request. | String (Maximum up to 250 characters) |
msi (este valor es opcional) | Number that identifies the promotion to MSI that you want to integrate Ex: 03, 06, 09, 12 or 18 msi (this promotion does not apply to Amex cards) | String (Máximum 2 characters). |
traceability | Json object to send relevant information for the trade (it can be some id of the transaction that will later be used to make a "match" within your system. | Object. |
4.3 Request / response example.
Below are examples in different programming languages to make a request and request a sale with the different response messages.