# ChipDNA Mobile API

The ChipDNA Mobile API contains the classes necessary to process Card Present sale and refund transactions on a mobile platform. Processing Card Present transactions requires one of the following PIN pads:

- BBPOS Chipper CHB20, CHB22, CHB29 or CHB30
- Datecs Bluepad50 Contact or Contactless
- Miura M020 or Miura M021
- IDTech VP3350

The ChipDNA Mobile API uses an encrypted database and needs to be initialised with a password before the API functionality can be used. `ChipDnaMobile.initialize(Context, com.creditcall.chipdnamobile.Parameters)` method is used to start the initialisation process. Once initialized an instance of the `ChipDnaMobile` class obtained using the static `getInstance` method.

Use `ChipDnaMobile.setProperties(com.creditcall.chipdnamobile.Parameters)` to set the required properties such as Application Identifier, PIN pad name, Target platform (Live or Test), Terminal ID and Transaction Key.

Once the appropriate properties are set, the PINpad can be prepared for processing transactions by calling `ChipDnaMobile.connectAndConfigure(com.creditcall.chipdnamobile.Parameters)` . Register listener using `ChipDnaMobile.addConnectAndConfigureFinishedListener(com.creditcall.chipdnamobile.IConnectAndConfigureFinishedListener)` to receive notifcation of the configuration result. Register listener using `ChipDnaMobile.addConfigurationUpdateListener(com.creditcall.chipdnamobile.IConfigurationUpdateListener)` to receive notifcation of the configuration progress. Register listener using `ChipDnaMobile.addDeviceUpdateListener(com.creditcall.chipdnamobile.IDeviceUpdateListener)` to receive notification of the PIN pad connectivity events.

ChipDNA Mobile transactions are processed in two stages, authorization stage and confirm stage. Once configuration is complete, transactions can be authorized using `ChipDnaMobile.startTransaction(com.creditcall.chipdnamobile.Parameters)` method. To be notified of the transaction results implement `ITransactionFinishedListener` and register listener using `ChipDnaMobile.addTransactionFinishedListener(com.creditcall.chipdnamobile.ITransactionFinishedListener)`. To be notified of transaction progress updates implement the interface `ITransactionUpdateListener` and registered it using `ChipDnaMobile.addTransactionUpdateListener(com.creditcall.chipdnamobile.ITransactionUpdateListener)` method.

ChipDNA Mobile does not auto-confirm transactions. Approved transactions must be explicitly confirmed for settlement in order to obtain the funds using method `ChipDnaMobile.confirmTransaction(com.creditcall.chipdnamobile.Parameters)` . If the funds for an approved transaction are not settled for reasons such as goods issue failure then the transaction should be explicitly voided using method `ChipDnaMobile.voidTransaction(com.creditcall.chipdnamobile.Parameters)`.

Tel. +44 (0)117 930 4455
Tel. +1 (800) 617-4850
Email: support@nmi.com
NMI Ltd. Registered Office: Programme, 4th Floor, All Saints' Street, Bristol, BS1 2LZ, United Kingdom. 0117 930 4455 Registered No: 3295353. VAT No: 125 4619 22.
NMI Corporation. 1450 American Lane, Suite 1200, Schaumburg, IL 60173, United States. 800 617 4850.

Packages
Package
Description
com.creditcall.chipdnamobile