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

iOS Framework

The Mobile EMV SDK enables iOS apps to accept EMV chip card payments via Bluetooth or audio jack using the IDTech VP3300 card reader.

Prerequisites

To enable the Mobile EMV SDK into your iOS app, ensure you have following:

✅ API access key issued to you by Xplor Pay.

Visit Let's Get Started - Xplor Pay to get API access key.

1

Set up mobile card reader

To set up the mobile card reader:

  1. Turn on the reader.

  1. Enable Bluetooth on your iOS device.

  1. Insert the chip side of the card into the reader’s slot and wait until the green LED flashes.

2

Connect iOS app

To connect your iOS app to the card reader:

  1. Install SDK dependencies, such as IDTech.xcframework , IDTech.bundle (v4.0.142 or later) and CocoaLumberjack.xcframework .

  2. Add the iOS Framework to your project using Carthage.

github "Clearent/iOS-framework"
carthage update
  1. Import the iOS framework header in your code.

#import <ClearentIdtechIOSFramework/ClearentIdtechIOSFramework.h>
  1. Initialize the SDK and connect to the card reader.

ClearentConnection *connection = [[ClearentConnection alloc] initBluetoothSearch];
                                  [clearentVP3300 startConnection:connection];

The iOS Framework connects automatically to the card reader using Apple’s Bluetooth implementation through the IDTech library.

3

Process payment

To process the payment in your iOS app:

  1. Configure the SDK to initiate an EMV card transaction that sends the encrypted token to Xplor Pay.

ClearentVP3300Config *config = [[ClearentVP3300Config alloc] init];
[config setPublicKey:publicKey];
[config setClearentBaseUrl:baseURL];
config.contactAutoConfiguration = false;
config.contactlessAutoConfiguration = false;
config.contactless = true;
clearentVP3300 = [[Clearent_VP3300 alloc] initWithConnectionHandling:self
                                    clearentVP3300Configuration:config];
clearentManualEntry = [[ClearentManualEntry alloc] init];
[clearentManualEntry setClearentBaseUrl:baseURL];
[clearentManualEntry setPublicKey:publicKey];
  1. Set up a payment request.

ClearentPayment *payment = [[ClearentPayment alloc] init];
[payment setAmount:theAmount];
payment.amtOther = 0;
payment.type = 0; // Sale
payment.timeout = 10;
payment.tags = nil;
payment.fallback = true;
payment.forceOnline = false;
  1. Initiate a card transaction.

ClearentResponse *response = [clearentVP3300 startTransaction:payment
                                         clearentConnection:connection];
if (response.responseType != RESPONSE_SUCCESS) {
    // Notify user transaction could not be started
}

The Mobile EMV SDK reads the card and encrypts the card data.

  1. Add the callback handlers to receive the successful message from the Mobile EMV SDK.

- (void)successTransactionToken:(ClearentTransactionToken *)token {
    // Send the encrypted JWT to the Mobile Payments API
    // POST /rest/v2/mobile/transactions/sale
}

The Mobile EMV SDK returns an encrypted JSON Web Token (JWT) that contains the transaction data.

  1. Use the POST method to send the transaction request to the Mobile Payment Transactions endpoint to process the payment.

Last updated

Was this helpful?