IDTech iOS/OSX SDK Guide  1.1.052
API reference for BTPay 200
 All Data Structures Functions Variables Properties Pages
BTPay 200 Main Transaction Commands

The methods below are provided as a reference to the main commands needed to execute an EMV transaction, collect PADPad input, or perform a swipe. Some commands not applicable on some devices.

EMV Methods

Start EMV Transaction
emv_startEMVTransaction:otherAmount:timeout:transactionType:additionalTags: (IDT_BTPay)

Begins an amount authorization request with the ICC. Returns authorization decision (approved, denied, or go online) in delegate method.


Complete Online EMV Transaction
emv_completeOnlineEMVTransaction:hostResponseTags:responseTags: (IDT_BTPay)

After receiving a host response, pass host tags (minimum 8A Authorization Response Code) as a dictionary through the tags parameter. EMV tags can be parsed returned pointer.

If there was a communication error with host, you must still finish the EMV transaction by passing "FALSE" for isSuccess, and nil for tags.


Terminal Configuration
emv_retrieveTerminalData: (IDT_BTPay)
emv_removeTerminalData (IDT_BTPay)
emv_setTerminalData: (IDT_BTPay)

Methods for terminal configuration. When setting the terminal data, you populate and pass and TerminalFile structure. When retrieving terminal data, you can receive the results in the TerminalFile structure in IDTResult.TerminalData


AID Management
emv_retrieveApplicationData:response: (IDT_BTPay)
emv_removeApplicationData: (IDT_BTPay)
emv_setApplicationData: (IDT_BTPay)
emv_retrieveAIDList: (IDT_BTPay)

Methods for AID management. When setting the AID, you populate and pass and AID structure. When retrieving AID, you can receive the results in the AID structure in IDTResult.aidResponse. When retrieving the AID list, the list of AID Names/length can be retrieved from the populated NSArray


CAPK Management
emv_retrieveCAPK:index:response: (IDT_BTPay)
emv_removeCAPK:index: (IDT_BTPay)
emv_setCAPK: (IDT_BTPay)
emv_retrieveCAPKList: (IDT_BTPay)

Methods for Certificate Authority Public Key management. When setting the CAPK, you populate and pass and CAKey structure. When specifying a CAPK to retrieve or remove, you populate the relevant fields in the CAKey structure. When retrieving CAPK, you can receive the results in the CAKey structure in IDTResult.caKeyData. When retrieving the CAPK list, the list of RID/Index can be retrieved from IDTResult.arrayResult with an array of NSData items, 6 bytes each, bytes 1-5 RID, byte 6 index


CRL Management
emv_retrieveCRLForRID:response: (IDT_BTPay)
emv_removeCRL: (IDT_BTPay)
emv_removeCRLUnit: (IDT_BTPay)
emv_setCRL: (IDT_BTPay)

Methods for Certificate Revocation List management. When setting the CRL, you populate and pass and CRLEntry structure. When retrieving CRL data, reference IDTResult.arrayResult for either an NSArray of NSData 5-byte objects for each RID,, or a NSArray of NSData objects for each serial number found. When specifying CRL, you use CRLEntry structure


Kernel Version
emv_getEMVKernelVersion: (IDT_BTPay)

Method to retrieve kernel version. Valued returned in IDTResult.data


APDU Communication
icc_exchangeAPDU:response: (IDT_BTPay)
icc_exchangeEncryptedAPDU:ksn:response: (IDT_BTPay)

Allows the direct sending of APDU packets to ICC

PINPad Methods

Encrypted Text Message Parameter
pin_getAmount:maxLength:messageID:language: (IDT_BTPay)
pin_getNumeric:minLength:maxLength:messageID:language: (IDT_BTPay)
pin_getEncryptedData:minLength:maxLength:messageID:language: (IDT_BTPay)
These methods prompt for input on the PINpad. They are restricted on the types of messages they can display. A list of approved messages is provided in the General Message Table, or messages can be encoded and provided through request to IDTech. Pinpad input results are returned to the delegate protocol:
- (void) pinpadData:(NSData*)encryptedData entry:(NSString*)inputValue pinBlock:(NSData*)pinblock KeySN:(NSData*)KSN event:(EVENT_PINPAD_Types)event;

Clear Text Message Parameter
pin_getCardAccount:max:line1:line2: (IDT_BTPay) pin_getEncryptedPIN:keyType:line1:line2:line3: (IDT_BTPay)

These methods prompt for input on the PINpad. Pinpad input results are returned to the delegate protocol:

- (void) pinpadData:(NSData*)encryptedData entry:(NSString*)inputValue pinBlock:(NSData*)pinblock KeySN:(NSData*)KSN event:(EVENT_PINPAD_Types)event;

Display

lcd_displayMessage:line2:line3:line4: (IDT_BTPay)

Displays up to 4 lines of text

lcd_showJPEG:Y0:X1:Y1: (IDT_BTPay)

Displays a picture uploaded with device_uploadJPEG: (IDT_BTPay)

MSR

Encryption Type
msr_setEncryptMSRFormat: (IDT_BTPay) IDT_BTPay::msr_getEncryptMSRFormat()

Sets and gets the encrypted MSR Data Output Format. Can be encrypted with Data Key or PIN key.

Request Swipe
msr_startMSRSwipeWithDisplay:line2:line3: (IDT_BTPay)

Enables MSR to receive Swipe. Results are returned as IDTMSRData in swipeMSRData

- (void) swipeMSRData:(IDTMSRData*)cardData;
Cancel Swipe
msr_cancelMSRSwipe (IDT_BTPay)

Disables the MSR from receiving swipes.