doTransaction

The doTransaction method initiates and processes payment transactions within the TweezerComm protocol. It enables client applications, such as point-of-sale (POS) systems or electronic cash registers (ECRs), to interact with the Agamento payment terminal for secure transaction execution.

This method supports multiple transaction types, including:

  • Regular Transactions: Standard payments using credit cards or closed-loop payment methods.
  • Pre-Authorizations: Reserve a specified amount on a customer’s card for later confirmation.
  • Pre-Authorization Completion and Cancellation: Completing or voiding previously authorized transactions.
  • MOTO (Mail Order/Telephone Order) Transactions: Processing card-not-present transactions securely.
  • Refunds: Partial or full refunds of previous transactions.
  • Deferred Payments: Approving transactions even in cases where there is no immediate network connectivity.

The sections below will describe the request parameters in more detail:

Requests

📘

JSON-RPC 2.0

All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Get Startedfor more details on how the requests are structured and sent.

In the request, the method field needs to be set to doTransaction, the transaction is defined by the tranCode parameter. Check the example request for each transaction type on the tabs below:

🚧

Mandatory Fields

vuid, amount and tranType are mandatory for all requests. All others depend on the type of transaction made.

For a regular transaction, set the tranCode parameter to 1. The code block shows a request example for a regular transaction:

{
    "jsonrpc": "2.0",
    "method": "doTransaction",
    "id": "123454352",
    "params": [
        "engine",
        {
            "vuid": "44d96006",
            "amount": 100,
            "tranCode": 1
        }
    ]
}

Parameter Definitions

The table below describes all parameters available in this request:

NameTypeDescription
vuidstringVendor (client) unique transaction identifier.
amountintegerAmount in cents.
tranCodeintegerThe transaction type code. 1: Single Step Transaction.

Responses

The service will return a response structured similarly to the examples provided in the code blocks below:

{
  "jsonrpc": "2.0",
  "id": "123454352",
  "result": {
      "statusCode": 0,
      "statusMessage": "TRANSACTION APPROVED",
      "appVersion": "01.06.62",
      "vuid": "12354",
      "amount": 100,
      "transactionId": "2038584332",
      "entryMode": 4,
      "transactionOriginalRequestId": "6439809e-619f-414b-8c3e-f1a9f3c3bc49",
      "transactionOriginalTime": "2025-03-05 23:08:06.597",
      "transactionOriginalAmount": 100,
      "serverResultMessage": "Sale is Approved",
      "tranType": 1,
      "dtId": "1741244869236399011",
      "rrn": "250306070806",
      "maskedPan": "541333******4111",
      "currencyCode": "USD",
      "currencyISOCode": "840",
      "originalSiteId": 1,
      "mainBoardSerial": "000177234933444",
      "hwSerial": "0900044624102737"
  }
}

Response Parameters

Below is a table with all the possible response parameters and their description:

NameTypeDescription
statusCodeintegerResult of the request (0 for success).
statusMessagestringText description of the status.
appVersionstringVersion of the payment application.
vuidstringVendor unique transaction identifier.
amountintegerFinal transaction amount in cents.
transactionIdstringUnique gateway transaction ID.
entryModeintegerMethod used to read the card (e.g., Chip, Contactless).
transactionOriginalRequestIdstringID of the original request.
transactionOriginalTimestringTimestamp of the original transaction.
transactionOriginalAmountintegerOriginal amount requested.
serverResultMessagestringDetailed message from the processing server.
tranTypeintegerTransaction type code (1 for Regular).
dtIdstringDevice Transaction Identifier.
rrnstringRetrieval Reference Number.
maskedPanstringThe masked card number used for the transaction.
currencyCodestringAlphanumeric currency code (e.g., USD).
currencyISOCodestringNumeric ISO currency code (e.g., 840).
originalSiteIdintegerIdentifier of the originating site.
mainBoardSerialstringSerial number of the device main board.
hwSerialstringHardware serial number.