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.
  • Refunds: Partial or full refunds of previous transactions.
  • Pre-Authorizations: Reserve a specified amount on a customer’s card for later confirmation.
  • Deferred Payments: Approving transactions even in cases where there is no immediate network connectivity.
  • MOTO (Mail Order/Telephone Order) Transactions: Processing card-not-present transactions securely.
  • Pre-Authorization Completion and Cancellation: Completing or voiding previously authorized transactions.

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

Request

📘

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. As in the example request below:

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

Request Parameters

The table below describes the parameters of the request:

🚧

Mandatory Fields

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

Name

Type

Description

vuid

string

Vendor (client) unique transaction identifier.

amount

integer

Amount in cents.

tranCode

integer

The transaction type code. Below are the possible values for this parameter:
1: Single Step Transaction
2: Refund (Partial refund is supported)
3: Pre Authorization
4: Deferred
5: MOTO
6: Complete Pre Authorization
7: Cancel Pre Authorization

originalTransactionId

string

The original transaction ID, this parameter is used when refunding a transaction.

pan

string

Card number (PAN) for MOTO transactions.

exp

string

Card expiration date.

cvv

string

Card verification value (3 digits).

apmCode

integer

Additional payment method (not EMV). Below are the possible values for this parameter:
2: Nayax Prepaid
4: 10BIS
5: Cibus
9: Multipass
28: Goodi

cardData

string

The card number is for the MOTO payment method (not EMV).

productInfo

string

Send product info to DCS.

Response

A successful request will return a response similar to the one in the code block 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
jsonrpcstringJSON-RPC protocol version
idstringRequest ID
resultdictionaryResult object containing details
statusCodeintegerTransaction Status
statusMessagestringTransaction message
appVersionstringApplication version
vuidstringVendor unique identifier
amountintegerTransaction amount
currencyCodestringCurrency code
currencyISOCodestringCurrency ISO code
transactionIdstringTransaction ID
dtIdstringDevice transaction identifier
rrnstringRetrieval reference number
maskedPanstringMasked PAN (Primary Account Number)
serverResultMessagestringServer result message
tranTypeintegerTransaction type
mainBoardSerialstringMainBoardSerial of the device
hwSerialstringHardware serial of the device