Getnet DocsGetnet Docs

API Commands

This reference defines the low-level structure of the communication packets and the operational sequences required to interact with the Getnet Pinpad.

Message framing and protocol

Every message transmitted over the serial interface follows a strict framing protocol using ASCII control characters to ensure data integrity.

General frame structure

All packets must adhere to the following format: <STX> [PAYLOAD] <ETX> {LRC}

ComponentHex ValueDescription
<STX>02hStart of Text: Indicates the beginning of a message frame.
[PAYLOAD]VariableThe actual command and its parameters.
<ETX>03hEnd of Text: Indicates the end of the message payload.
{LRC}VariableCheck Character: Longitudinal Redundancy Check byte.

Internal payload delimiters

Within the [PAYLOAD] section, multiple parameters are separated by the File Separator (<FS>) character (1Ch).

Command operational matrix

This matrix maps specific logical operations to the required command sequence between the Host System and the Pinpad.

OperationSetupActionData CaptureFinalization
Standard PaymentY19Y15Y02 (Auto PP)Y03
CashbackY19 (TTY 09)Y15Y02 (Auto PP)Y03
RefundY19 (TTY 20)—Y02 (Auto PP)Y03
QR Payment—Y0Q—Y0Q (Clear)
Echo Test—Y0I——
Update (YDL)YDL (Init)YDL (Data)—YDL (End)

Core payload definitions

Each field below is separated by <FS> (1Ch) and framed by <STX>/<ETX>/{LRC} as described above. The Attr column uses: H (hexadecimal), N (numeric), A (alpha), AN (alphanumeric), ANS (alphanumeric and special characters).

Y19 - Initialize transaction

Mandatory for starting card-based operations. The Host sends the RSA key, amount, and encryption parameters; the Pinpad returns the card data (contactless flow).

Y19 Request (Host → Pinpad)

FieldLengthAttrDescription
RSA256–512ANSRSA public key (modulus) used to encrypt Track 1. See Pinpad Encryption.
EXP1–12ANSRSA exponent.
TEC3NInter-command timeout in seconds (000–999).
ET11NSend Track 1 (stripe). Unused: the value is ignored by the Pinpad.
PTC1NRequest account type (commonly used for MAESTRO cards).
PMK1ANMaster key position (0–9, or N). PIN PMK = value; PAN PMK = value + 1.
WRK1–16ANSWorking key.
ENC1NPAN DUKPT encryption: 0 off, 1 on, 2 on using slot 3.
IMP12NPurchase amount; the last two digits are decimals.
ICB12NCashback amount (000000000000 if not used); the last two digits are decimals.
TTY2NTransaction type. See Code Tables.

Y19 Response (Pinpad → Host) — Contactless

FieldLengthAttrDescription
TJA1–19NCard number (first 8 and last 4 digits; the rest masked with *). From Track II.
CSE3NService code (from Track II); sent in clear.
CBC3NBank code. Unused: always 000.
NYA1–26ANSCardholder name for the receipt (Track I or TAG 5F20); right-padded with spaces.
REG6NRecord number. Unused: 000041.
MDI1AEntry mode (M, B, C, L, E). See Code Tables.
VER1–15ANSPinpad software version.
FDV4NExpiration date (YYMM), from Track II.
TC2256–512ANSTrack II encrypted with the Y19 RSA key. From Track II or TAG 57.
1NL1NTrack I not-read indicator: 0 read, 1 not read.
NSF1–12NPinpad physical serial number.
CPG1–300ANSEMV cryptogram (TLV). N if not applicable.
CAU6NAuthorization code. Returned as 6 blank spaces.
CRE2NIssuer response code (TAG 8A and SDK result).
NSP3NPAN sequence number (TAG 5F34).
APN0–32ANSSelected EMV application name in hex, for the receipt (TAG 9F12 / TAG 50).
AID0–16ANSSelected EMV application identifier (TAG 4F).
KSN-PAN20HKey Serial Number for the DUKPT-encrypted PAN.
ENC-PAN1–256ANSDUKPT-encrypted PAN cryptogram.
TDC1ANAccount type (MAESTRO). N to avoid printing.
PIN16–32ANSPINBLOCK if a PIN was entered; otherwise omitted.
KSN20NKey Serial Number for the DUKPT PIN; increments per EMV operation with PIN. Omitted if no PIN.

Y02 - Additional data response

Generated by the Pinpad after a card is read. The request can update amounts and request stripe data; the response structure depends on the entry mode (BANDA or CHIP).

Y02 Request (Host → Pinpad)

FieldLengthAttrDescription
U4D1NRequest last 4 digits (stripe only).
CDS1NRequest security code (stripe only).
ET11NSend Track 1 (stripe). Unused: the value is ignored.
SPI1NRequest PIN (stripe only).
PTC1NRequest account type (commonly MAESTRO).
PMK1ANMaster key position (0–9, or N). PIN PMK = value; PAN PMK = value + 1.
WRK1–16ANSWorking key (N if not requesting PIN or track encryption). Unused: the value is ignored.
ENC1NPAN DUKPT encryption: 0 off, 1 on, 2 on using slot 3.
IMP12NPurchase amount; updates the value from Y19.IMP.
ICB12NCashback amount; updates the value from Y19.ICB.

Y02 Response (Pinpad → Host) — Magnetic Stripe (BANDA)

FieldLengthAttrDescription
TJA1–19NCard number (first 8 and last 4; the rest masked with *). From Track II.
FDV4NExpiration date (YYMM), from Track II.
TC1256–512ANSTrack I encrypted with the Y19 RSA key (stripe).
TC2256–512ANSTrack II encrypted with the Y19 RSA key (stripe).
1NL1NTrack I not-read indicator: 0 read, 1 not read.
CDS1–4NSecurity code encrypted with the Y19 RSA key (user-entered).
NSF1–12NPinpad physical serial number.
KSN-PAN20HKey Serial Number for the DUKPT-encrypted PAN.
ENC-PAN1–256ANSDUKPT-encrypted PAN cryptogram.
TDC1ANAccount type (MAESTRO). N to avoid printing.
PIN16–32ANSPINBLOCK if a PIN was entered; otherwise omitted.
KSN20NKey Serial Number for the DUKPT PIN; increments per PIN operation.

Y02 Response (Pinpad → Host) — Chip (CHIP)

FieldLengthAttrDescription
TJA1–19NCard number (first 8 and last 4; the rest masked with *). From Track II.
FDV4NExpiration date (YYMM), from Track II.
TC2256–512ANSTrack II encrypted with the Y19 RSA key. From TAG 57 (chip).
1NL1NTrack I not-read indicator: 0 read, 1 not read.
NSF1–12NPinpad physical serial number.
CPG1–300ANSEMV cryptogram (TLV format). N if no information is sent.
CAU6NAuthorization code. Returned as 6 blank spaces.
CRE2NIssuer response code.
NSP3NPAN sequence number (TAG 5F34).
APN0–32ANSSelected EMV application name in hex, for the receipt (TAG 9F12 / TAG 50).
AID0–16ANSSelected EMV application identifier (TAG 4F).
KSN-PAN20HKey Serial Number for the DUKPT-encrypted PAN.
ENC-PAN1–256ANSDUKPT-encrypted PAN cryptogram.
TDC1ANAccount type (MAESTRO). N to avoid printing.
PVF1NOffline PIN verified-by-card indicator. Must be 0 for Online PIN.
PIN16–32ANSPINBLOCK if a PIN was entered; otherwise omitted.
KSN20NKey Serial Number for the DUKPT PIN; increments per EMV operation with PIN.

Y03 - Host authorization

The final instruction sent by the Host to complete the flow.

Key Fields [Host]:

  • [CAU]: Authorization code from the issuer.
  • [CRE]: Response code (e.g., “00” for success).

Error handling (Y0E)

If an operation fails, the terminal returns a Y0E report instead of the expected sequence response.

CodeMessageDescription
01CANCELADOUser or Host-initiated cancellation.
04ERROR EMVChip reading or protocol failure.
08SIN LLAVESMissing DUKPT keys in Slot 3.