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.0All 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, ensure to configure the following:
- The
method
field needs to be set to.doTransaction
. - The service must be set to
ashrait
in theparams
.
{
"jsonrpc": "2.0",
"method": "doTransaction",
"params": [
"ashrait",
{
"amount": 2000,
"vuid": "1234567890",
"currency": "376",
"creditTerms": 1,
"tranCode": 1,
"tranType": 1,
"cardNumber": "4580000000000000",
"expDate": "2308",
"cvv": "666"
}
],
"id": 1
}
Request Parameters
The table below describes the parameters of the request:
Mandatory Fields
vuid
,amount
andtranType
are mandatory for all requests. All others depend on the type of transaction made.
Name | Type | Description |
---|---|---|
| string | Vendor (client) unique transaction identifier. |
| integer | Amount in cents. |
| integer | The transaction type code. Below are the possible values for this parameter:
|
| string | The original transaction ID, this parameter is used when refunding a transaction. |
| string | Card number (PAN) for MOTO transactions. |
| string | Card expiration date. |
| string | Card verification value (3 digits). |
| integer | Additional payment method (not EMV). Below are the possible values for this parameter:
|
| string | The card number is for the MOTO payment method (not EMV). |
| 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": 1,
"result": {
"statusCode": 0,
"statusMessage": "TRANSACTION APPROVED",
"appVersion": "01.05.22",
"retailerId": "0883012013",
"ecrNo": "1",
"vuid": "ee5e7af5-7719-4726-992f-0eb2915b992a",
"tranCode": 1,
"currency": "376",
"amount": 100,
"mutag": 1,
"mutagName": "Mastercard",
"manpik": 2,
"solek": 2,
"cardNumber": "*********",
"expDate": "2305",
"cardName": "Mastercard",
"tokenizedCardNumber": "c8ae19356dd1d7e946165fab67a14516",
"tranType": 1,
"posEntryMode": 5,
"isClub": false,
"isPrepaid": false,
"creditTerms": 1,
"uid": "23031212432508830123729",
"rrn": "948767075 ",
"authCodeManpik": 1,
"issuerAuthNum": "0652073",
"acquirerMerchantID": "6543505",
"sysTraceNumber": "01001001",
"merchantReceipt": [
{
"fieldName": "סכום",
"fieldValue": "1000"
},
{
"fieldName": "ATC",
"fieldValue": "0289"
}
],
"customerReceipt": [
{
"fieldName": "סכום",
"fieldValue": "1000"
},
{
"fieldName": "ATC",
"fieldValue": "0289"
}
]
}
}
Response Parameters
Below is a table with all the possible response parameters and their description:
Name | Type | Description |
---|---|---|
| integer | The status of the operation. |
| string | A message describing the status, such as "OK". |
| integer | The card brand. |
| integer | The acquirer. |
| integer | The card issuer. |
| string | The transaction unique identifier. |
| integer | POS Entry Mode, type of card transaction. Values include: |
| string | The masked personal account number (PAN). |
| string | Transaction authorization number from the authorized entity. |
| string | The issuer authorization number. |
| string | The merchant ID in the acquirer system. |
| integer | Code of authorization. Values include:
|
| string | The gateway token for the card. |
| string | The payment application version. |
| string | The terminal retailer ID. |
| string | The POS identifier. |
| string | The vendor unique identifier. |
| string | The transaction code. |
| array of key/value | The merchant receipt data to print or save. |
| array of key/value | The customer receipt data to print. |
Updated about 4 hours ago