Processing a transaction with a terminal
Nexio's API allows you to process card present (EMV) transactions using a terminal.
Follow the steps below, depending on your gateway.
USAePay
In order to process a card present transaction with a terminal through USAePay, you need to set up your terminal and then pair it and process the transaction either via iframe or via API.
Processing transaction with the iframe
In order to process a transaction via iframe, you must have completed setup and paired your terminal via iframe.
- Authenticate through either of the following options:
- By using Simple login.
- By going to https://retail.nexiopaysandbox.com and entering your Nexio credentials where prompted.
- Load the retail iframe.
- The retail iframe loads by default.
- You may also select additional UI options as shown in the UI options table.
- From the Processing Account menu of the iframe, select the correct processing account.
- From the Payment Method menu, select Card (terminal).
- Select the correct value from the Currency menu.
- Type the correct value in the Amount field.
- From the Terminal menu, select the paired terminal you want to use. If the terminal you want to use does not appear in the Terminal menu, it may not be paired.
- Click Submit to send the payment to the terminal.
- Complete the transaction at the terminal. The response posts to the iframe.
Processing transaction with the API
In order to process a transaction via API, you must have completed setup and paired your terminal via API.
-
Send a
POST
request with the transactiondata
andterminalId
to the Process transaction from terminal endpoint. A successful request returns aterminalRequestStatus
ofinitialized
.Example Request
curl -X POST https://api.nexiopaysandbox.com/pay/v3/processFromTerminal \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "data": { "amount": "13.45" }, "terminalId": "eyJtZXJjaGFudElkIjoiMTAxMDM5IiwiZ2F0ZXdheUxhYmVsIjoiLi4uMmUyMSwuLi41ZWU3IiwidGVybWluYWwiOnsiaWQiOiIxMWU5MDIxMGNmZTdmNmFlOWVkNWUwYTgiLCJsb2NhdGlvbklkIjoiMTFlOGNkNmE4YjQ0YzUzZWFkNmFkY2UxIn19" }'
Example 200 Response
{ "terminalRequestId": "8524beee-70f1-4890-9382-3d5bb8871a4c", "terminalRequestStatus": "initialized", }
-
After submitting the request to process from terminal, the terminal displays the
amount
that was in the request and an image indicating that it is ready for you to present the card. -
Complete the transaction at the terminal.
-
Send a request to the View terminal transaction status endpoint as frequently as once per second until the
terminalRequestStatus
returns assuccess
. You may see apending
status before thesuccess
status. This means that it was submitted but the transaction with the gateway is not complete.
Zeamster
-
Request a Terminal List
Send a
GET
request to the View terminal list endpoint.
A successful request returns an array of terminal objects.
These are the terminals currently enabled on your merchant ID.Example Request
curl -X GET https://api.nexiopaysandbox.com/pay/v3/getTerminalList \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]'
Example 200 Response
[ { "gatewayLabel": "...2e21,...5ee7", "gatewayName": "yourGateway", "gatewayType": 110, "merchantId": "103002", "merchantName": "Test Merchant", "terminalId": "eyJtZXJjaGFudElkIjoiMTAxMDM5IiwiZ2F0ZXdheUxhYmVsIjoiLi4uMmUyMSwuLi41ZWU3IiwidGVybWluYWwiOnsiaWQiOiIxMWU5MDIxMGNmZTdmNmFlOWVkNWUwYTgiLCJsb2NhdGlvbklkIjoiMTFlOGNkNmE4YjQ0YzUzZWFkNmFkY2UxIn19", "terminalName": "Terminal 1", "terminalSerialNumber": "84937213" } ]
-
Copy the Terminal ID
Copy the
terminalId
from the response above.
You will use it in step 3. -
Post Transaction Details
Send a
POST
request with the transaction details andterminalId
to the Process transaction from terminal endpoint.A successful response returns a
terminalRequestId
.
You can use theterminalRequestId
to check the status of the transaction.Example Request
curl -X POST https://api.nexiopaysandbox.com/pay/v3/processFromTerminal \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]' -d '{ "data": { "amount": "13.45" }, "terminalId": "eyJtZXJjaGFudElkIjoiMTAxMDM5IiwiZ2F0ZXdheUxhYmVsIjoiLi4uMmUyMSwuLi41ZWU3IiwidGVybWluYWwiOnsiaWQiOiIxMWU5MDIxMGNmZTdmNmFlOWVkNWUwYTgiLCJsb2NhdGlvbklkIjoiMTFlOGNkNmE4YjQ0YzUzZWFkNmFkY2UxIn19" }'
Example 200 Response
{ "terminalRequestId": "64ea267f-2766-49b8-9e0e-aeb91b2fe722", "terminalRequestStatus": "initialized" }
-
Check the Transaction Status (Optional)
Send a
GET
request with theterminalRequestId
to the View terminal transaction status endpoint.Example Request
curl -X GET https://api.nexiopaysandbox.com/pay/v3/processFromTerminal/{terminalRequestId} \ -H 'Accept: application/json' \ -H 'Authorization: Basic [Base64_encoded_login]'
Example 200 Response
{ "gatewayResponse": { "gatewayName": "yourGateway" }, "terminalRequestId": "64ea267f-2766-49b8-9e0e-aeb91b2fe722", "terminalRequestStatus": "initialized" }
Updated 8 months ago