For the complete documentation index, see llms.txt. This page is also available as Markdown.

IDevice

Create an instance of the IDevice from CoreAPI.getDeviceList(). Then use the functions described in this chapter.

cancelTransaction

This function cancels a transaction. A transaction can only be canceled before a card is presented.

boolean IDevice.cancelTransaction();

Return Value:

Returns true if successful. Otherwise, returns false.

getCapabilities

This function retrieves the IDeviceCapabilities interface to the device.

IDeviceCapabilities IDevice.getCapabilities();

Return Value:

Returns IDeviceCapabilities

getConnectionInfo

This function retrieves the connection information of the device.

ConnectionInfo IDevice.getConnectionInfo();

Return Value:

Returns ConnectionInfo

getConnectionState

This function retrieves the connection state of the device.

ConnectionState IDevice.getConnectionState();

Return Value:

Returns ConnectionState

getDeviceControl

This function retrieves the device control interface to the device.

Return Value:

Returns IDeviceControl

getDeviceConfiguration

This function retrieves a device configuration interface to the device.

Return Value:

Returns IDeviceConfiguration

getDeviceInfo

This function returns an information class of the device.

Return Value:

Returns DeviceInfo

Name

This function retrieves the name of the device.

Return Value:

Returns a string containing the device name.

requestPIN

This function prompts the user to enter a PIN on the device. The response data will be returned in the event OnEvent. requestPin() is reserved for future use.

Parameter

Type

Description

Timeout

byte

Wait time in seconds.

PINMode

byte

PIN mode.

Usage:

  • 0x00 - Enter PIN

  • 0x01 - Enter PIN Amount

  • 0x02 - Reenter PIN Amount

  • 0x03 - Reenter PIN

  • 0x04 - Verify PIN

MinLength

byte

Minimum length of accepted PIN (>= 4).

MaxLength

byte

Maximum length of accepted PIN (=< 12).

Tone

byte

Tone to play when prompting for the PIN. Usage:

  • 0x00 - No sound

  • 0x01 - One beep

  • 0x02 - Two beeps

Format

byte

ISO format for the PIN block.

PAN

String

The left most 12 digits of the Primary Account Number. Leave blank if not required by the ISO format for the PIN block.

Return Value:

Returns true if successful. Otherwise, returns false.

requestSignature

This function prompts the user to enter a signature on the device. The response data will be returned in the event OnEvent.

Return Value:

Returns true of successful. Otherwise, returns false.

sendAuthorization

This function sends the Authorization Response Code (ARPC) blob to the device. The response data will be returned in the event OnEvent.

Parameter

Description

data

Contains ARPC blob.

Return Value:

Returns true if successful. Otherwise, returns false.

sendSelection

This function send a user selection to the device.

Parameter for data

Description

Byte 0

Status of User Selection:

  • 0x00 = User Selection Request completed

  • 0x01 = User Selection Request aborted, cancelled by user

  • 0x02 = User Selection Request aborted, timeout

Byte 1

The menu item selected by the user. This is a single byte zero based binary value.

Return Value:

Returns true if successful. Otherwise, returns false.

startTransaction

This function starts a transaction. The transaction will be processed through multiple calls to the event OnEvent.

ITransaction

Parameter

Type/

Format

Description

Timeout

byte

Transaction timeout in seconds. Default is 60 seconds.

Usage:

0 to 255 - Depending on the device, 0 means no timeout.

PaymentMethods

List of PaymentM ethod

List of the PaymentMethod enumeration.

Usage:

MSR - For magnetic stripe cards.

Contact - For EMV chip cards.

Contactless - For NFC contactless cards.

ManualEntry - For user to manually enter transaction data without any card access.

QuickChip

bool

In QuickChip mode, the device does not prompt for an amount. Device sends an ARQC request to the host. Device automatically populates the ARPC response data with EMV Tag 8A set to “Z3”. Card holder is prompted to remove the card. Transaction result is later determined by the processor and not by the card.

Usage:

false - Do not enable QuickChip mode.

true - Enable QuickChip mode. Default.

EMVOnly

bool

Flag that determines whether or not to start an EMV transaction.

Usage:

false - Do not start transaction if the device does not support EMV.

true - Only start transaction if the device supports EMV. Default.

PreventMSRSignatureF orCardWithICC

bool

Flag that determines whether or not to prompt for a signature for magnetic stripe when the transaction is from a chip card.

Usage:

false – Do not prompt for signature.

true – Allow the prompt for a signature if requested.

SuppressThankYouMes sage

bool

By default, devices with a display signal the end of a transaction by briefly showing “THANK YOU,” then “WELCOME.”

Usage:

false – Do not suppress the thank you message.

true – Suppress the thank you message.

ITransaction

OverrideFinalTransacti onMessage

byte

By default, devices with a display signal the end of a transaction by returning to the idle page and showing “WELCOME.” This parameter directs the device to show a message based on the Message ID from the command displayMessage() . This option completely overrides the device’s idle page behavior until the next transaction, power cycle, or other similar state change.

Usage:

0x00 - reserved, do not use. 0x01 - “AMOUNT”

0x02 - “AMOUNT OK?”

0x03 - “APPROVED”

0x04 - “CALL YOUR BANK”

0x05 - “CANCEL OR ENTER”

0x06 - “CARD ERROR”

0x07 - “DECLINED”

0x08 - “ENTER AMOUNT”

0x09 - reserved, do not use. 0x0A - reserved, do not use. 0x0B - “INSERT CARD”

0x0C – “NOT ACCEPTED”

0x0D - reserved, do not use. 0x0E - “PLEASE WAIT”

0x0F - “PROCESSING ERROR”

0x10 - “REMOVE CARD”

0x11 - “USE CHIP READER”

0x12 - “USE MAGSTRIPE”

0x13 - “TRY AGAIN”

0x14 - “WELCOME”

0x15 - “PRESENT CARD”

0x16 - “PROCESSING”

0x17 - “CARD READ OK - REMOVE CARD”

0x18 - “INSERT OR SWIPE CARD”

0x19 - “PRESENT ONE CARD ONLY”

0x1A - “APPROVED PLEASE SIGN”

0x1B - “AUTHORIZING PLEASE WAIT”

0x1C - “INSERT, SWIPE OR TRY ANOTHER CARD”

0x1D - “PLEASE INSERT CARD”

0x1E - Null prompt (empty screen) 0x1F - reserved, do not use.

0x20 - “SEE PHONE”

0x21 - “PRESENT CARD AGAIN”

0x22 - “INSERT/SWIPE/TRY OTHER CARD”

0x23 - “TAP or SWIPE CARD”

0x24 - “TAP or INSERT CARD”

0x25 - “TAP, INSERT or SWIPE CARD”

0x26 - “TAP CARD”

0x27 - “TIMEOUT”

0x28 - “TRANSACTION TERMINATED”

ITransaction

EMVResponseFormat

byte

The format of the EMV response.

Usage:

0x00 – Legacy. Default. 0x01 – RFU

TransactionType

byte 1

EMV Tag 9C - The type of financial transaction, represented by the first two digits of the ISO 8583:1987 Processing Code.

Examples:

0x00 – purchase. Default.

0x01 – cash advance

0x09 – purchase with cashback

0x20 – refund

Supported transaction types are specified in the commands manual specific to the device.

Amount

String 12

EMV Tag 9F02 - Authorized amount of the transaction.

Example:

“000000000123” – $1.23

“000000009999” – $99.99

CashBack

String 12

EMV Tag 9F03 - Secondary amount associated with the transaction.

Example:

“000000000123” – $1.23

“000000009999” – $99.99

CurrenyCode

byte[] 2

EMV Tag 5F2A - Currency code of the transaction according to ISO 4217. The byte array is null by default.

Example:

0x0840 = US Dollar 0x0978 = Euro 0x0826 = UK Pound

CurrencyExponent

byte[] 1

EMV Tag 5F36 - The decimal point position from the right of the transaction amount. The byte array is null by default.

Example:

0x02 – decimal point at 2 position from the right.

TransactionCategory

byte[] 1

EMV Tag 9F53 - The type of contactless transaction being performed. The byte array is null by default.

MerchantCategory

byte[] 2

EMV Tag 9F15 - The type of business being done by the merchant, represented according to ISO 18245. The byte array is null by default.

MerchantID

byte[] 15

EMV Tag 9F16 - Used to uniquely identify a given merchant. The byte array is null by default.

ITransaction

MerchantCustomData

byte[] 20

EMV Tag 9F7C – Proprietary merchant data that may be requested. The byte array is null by default.

Return Value:

Returns true if successful. Otherwise, returns false.

subscribeAll

This function allows the host to be notified of all events sent by the device.

Parameter

Description

eventCallback

Name of a class that implements the IEventSubscriber Delegates event.

Return Value:

Returns true if successful. Otherwise, returns false.

unsubscribeAll

This function allows the host to no longer receive any events sent by the device.

Parameter

Description

eventCallback

Name of a class that implements the IEventSubscriber Delegates event.

Return Value:

Returns true if successful. Otherwise, returns false.

Last updated