startPinpadTransaction

The startPinpadTransaction method initiates the PinPad process on the payment terminal, instructing it to get ready to receive card information via Magnetic Stripe Read (MSR/Swipe) or Contactless (Tap). This method captures raw card data (Track 2 or EMV tags) from the physical device, preparing the system for subsequent authorization steps.

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, ensure to configure the following:

  • The method field must be set to startPinpadTransaction.
  • The service must be set to engine in the params.

The request includes a list of parameters, with the first being the service name, which is currently fixed as engine, and the second being a dictionary containing all other transaction-specific details.

{
    "jsonrpc":"2.0",
    "method":"startPinpadTransaction",
    "id":"123454352",
    "params": [
        "engine",{
            "vuid": "{{$guid}}",
            "amount":100,
            "tranType":1.1
        }
    ]
}

Request Parameters

The table below describes the parameters of the request:

NameTypeDescription
vuidstringVendor (client) unique transaction identifier.
amountintegerAmount of the transaction in cents.
tranTypefloatTransaction type code. For example, 1.1 for a standard transaction.

Response

A successful request will return a response containing the captured card data, which varies depending on whether the card was read via magnetic stripe or contactless (EMV).

Magnetic Stripe Read Response

This response is returned when the card is successfully swiped via the magnetic stripe reader.

{
   "jsonrpc": "2.0",
   "id": "123454352",
   "result": {
       "statusCode": 0,
       "statusMessage": "ok",
       "pem": EMVMANAGER_MSR,
       "track2": "65458643975398"
   }
}

Response Parameters

The table below describes the response parameters for this method when a Magnetic Stripe Read occurs.

NameTypeDescription
statusCodeintegerThe PinPad transaction status. A value of 0 indicates success.
statusMessagestringThe transaction message (e.g., ok).
pemintegerPOS Entry Mode, indicating the method of card entry. EMVMANAGER_MSR indicates a magnetic stripe read.
track2stringThe raw Track 2 card data captured from the magnetic stripe.

Contactless Read Response

This response is returned when the card is successfully swiped via the magnetic stripe reader.

{
   "jsonrpc": "2.0",
   "id": "123454352",
   "result": {
       "statusCode": 0,
       "statusMessage": "ok",
       "pem": EMVMANAGER_CONTACT,
       "tags": {
           "95": "tag value",
           "9F02": "tag value",
           "5A": "tag value",
           "5F34": "tag value",
           "5F2A": "tag value",
           "9F02": "tag value",
           "9F03": "tag value",
           "9A": "tag value",
           "9C": "tag value",
           "9F1A": "tag value",
           "9F21": "tag value",
           "9F37": "tag value",
           "9F36": "tag value",
           "9F26": "tag value",
           "9F27": "tag value"
       }
   }
}

Response Parameters

The table below describes the response parameters for this method when a Contactless Read occurs.

NameTypeDescription
statusCodeintegerThe PinPad transaction status. A value of 0 indicates success.
statusMessagestringThe transaction message (e.g., ok).
pemintegerPOS Entry Mode, indicating the method of card entry. EMVMANAGER_CONTACT indicates a contactless read.
tagsjson of stringsA dictionary containing raw EMV Tag-Value pairs captured from the contactless chip.