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.

  1. Authenticate through either of the following options:
  2. Load the retail iframe.
    • The retail iframe loads by default.
    • You may also select additional UI options as shown in the UI options table.
  3. From the Processing Account menu of the iframe, select the correct processing account.
  4. From the Payment Method menu, select Card (terminal).
  5. Select the correct value from the Currency menu.
  6. Type the correct value in the Amount field.
  7. 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.
  8. Click Submit to send the payment to the terminal.
  9. 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.

  1. Send a POST request with the transaction data and terminalId to the Process transaction from terminal endpoint. A successful request returns a terminalRequestStatus of initialized.

    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",
    
    }
    

  2. 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.

  3. Complete the transaction at the terminal.

  4. Send a request to the View terminal transaction status endpoint as frequently as once per second until the terminalRequestStatus returns as success. You may see a pending status before the success status. This means that it was submitted but the transaction with the gateway is not complete.

Zeamster

  1. 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"
      }
    ]
    

  2. Copy the Terminal ID

    Copy the terminalId from the response above.
    You will use it in step 3.

  3. Post Transaction Details

    Send a POST request with the transaction details and terminalId to the Process transaction from terminal endpoint.

    A successful response returns a terminalRequestId.
    You can use the terminalRequestId 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"
    }
    

  4. Check the Transaction Status (Optional)

    Send a GET request with the terminalRequestId 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"
    }
    

Did this page help you?