Skip to main content
Version: Android SDK 7.1004.2

Terminal Management

Connect

connect Method

Connects to a payment terminal. Whenever the connection to the device is lost, the SDK will keep on trying to establish a connection until it’s re-established. No special actions are needed.

Parameters

ParameterNotes
device Required
Device
This parameter specifies which device type you want to connect to.

Code example

//Connect to a device
Device device = new Device("CardReader7", "08:00:69:02:01:FC", "1", ConnectionMethod.BLUETOOTH);
Device device = new Device("LocalDevice", "0821032398-PAXA920", "", ConnectionMethod.ANDROID_PAYMENT);
Device device = new Device("CloudDevice", "0821032398-PAXA920", "", ConnectionMethod.CLOUD);
api.connect(device);

Events invoked

connectionStatusChanged

Each time the card reader state changes (ex : going from Connected to Disconnected) the ConnectionStatusChanged event is called. It causes the connection manager to invoke this event with the appropriate information.

Returns

ParameterNotes
Booleantrue if the operation was successfully.

Disconnect

disconnect Method

Disconnect will stop the active connection (or reconnection process). Please note that the method ignores the current state of the payment terminal and just stops the connection. Calling disconnect might result in a commmunication error if triggered during a transaction.

Code example

//Disconnects from the payment terminal 
api.Disconnect();

Events invoked

connectionStatusChanged

Causes the connection manager to invoke this event with the appropriate information.

Returns

ParameterNotes
BooleanTrue if the operation was successful.

Get Device Manufacturer

getDeviceManufacturer Method

Code example

Manufacturer manufacturer = api.getDeviceManufacturer();

Returns

ParameterNotes
ManufacturerThe payment terminal manufacturer.

Get EMV Report

getEMVConfiguration Method

Fetches the logs from the device and reports them to the deviceLogsReady event.

Code example

//Downloads logs from device
api.getDeviceLogs();

Events invoked

ReportResult

Invoked when the sdk has finished downloading the EMV report from the payment terminal.

Returns

ParameterNotes
BooleanTrue if the operation was successfully sent to device.

Get Paired Devices

getPairedDevices Method

Returns the payment terminals associated with the specified ConnectionMethod.

Parameters

ParameterNotes
method Required
ConnectionMethod
The type of connection with the payment terminal (Bluetooth, Cloud, etc.).

Code example

// Get paired terminals
List<Device> devices = api.getPairedDevices(ConnectionMethod.XXX);

Returns

ParameterNotes
List<Device>The list of payment terminals.

Get Transactions Report

getTransactionsReport Method

Fetches your transactions report from a payment terminal. If you want to print the report, you can call printReceipt with the string returned in ReportResult event as parameter.

Parameters

ParameterNotes
reportConfiguration Required
ReportConfiguration
This parameter specifies the filter to get transactions report.

Code example

//Get the transactions report for device "12345", from 30th April 2021 at 00:00:00, to 30th April 2021 at 23:59:59, in eurs:
List terminalSerialNumber = new ArrayList<>();
terminalSerialNumber.add("0821122334");
ReportConfiguration configuration = new ReportConfiguration("EUR", "20231001000000", "20231201235959", "+00:00", terminalSerialNumber);

api.getTransactionsReport(configuration);

Events invoked

ReportResult

The report will be returned to the registered ReportResult interface.

Returns

ParameterNotes
BooleanTrue if the command was processed successfully. False if the sending was not successful.

Flash Reset

deleteDeviceConfig Method

Sends a command to the payment terminal to delete its configuration.

Code example

api.deleteDeviceConfig();

printReceipt Method

Print on demand functionality allowing the merchant to print any HTML formatted receipt. It is possible to print images or barcodes as well as passing directly a URL to the printReceipt function. A bitmap can also be printed, in order to do so it needs to be rendered as an image and inserted into the html.

tip

Receipts received in the terminal transaction result can either be a URL OR an HTML formatted receipt. The format can be changed by updating the getReceiptsAsURLs boolean when initializing the SDK Settings. Note that if the terminal is not able to upload the receipt to the Handpoint cloud servers and generate a URL then the HTML formatted receipt will be delivered to your software. It is important to be able to manage both formats.

Parameters

ParameterNotes
receipt Required
String
The receipt must match the following HTML Print Format. The Transaction Report (also called End of Day Report) can be printed from the string returned in the ReportResult event.

Code example (Prints a receipt with Handpoint logo)

//Print a receipt with Handpoint logo (bitmap format)
String validReceipt = "<html><body><img src='data:image/bmp;base64,iVBORw0KGgoAAAANSUhEUgAAAYgAAABWCAYAAADVAAHNAAAACXBIWXMAABYlAAAWJQFJUiTwAAAWgUlEQVR4nO2dh5cVxRKH3z+lZBAURRRFxIQKKIoRBHNCchJBMBEUFAxgRFFRUYwYEBOoBGF3kSAssLAgOfXbb9jB2cvcmaq5YW6o75w67+Db29Mz09O/7urq6v85wzAMwwjhf2lXwDAMwyhNTCAMwzCMUEwgDMMwjFBMIAzDMIxQTCAMwz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GInRMOJeNnmFVq1adUYZdCosDkrOScA/yTQ/uGDFdJ51DsrPZpwxzOIu0/dsz5a/CSY0YzREkEAuz61v377eLEnawDmrWRJmyYdDvH7Q/7t8+XLRR8doGL8u6ddHjhzpXnrppax+5CQzCKlg45vHDVOoFAuMONlMx5qB1kXIBj1m/1u3blVfl4hBBk7Z2iLf8MCBA71+Iao9Itr19fUtykZIBw8eHFk2AsX3GNWPTJgw4fQ75/njDci1j6A9RUWecR06e2kUJ7O8JM8/F1JfpK5k8I0iFjSCKVOmuGHDhnn++6VLl4p2QbMuwd/Onj3b67jocHA7cC6zv8hdCtvxCw1iwoiVgQCbyhACZm/kE0L4OWiJGUcmPBti/Vmk52MdNWqUmzFjhjeaJgIMd4U0r5NP0jUIPmzWhBALOiw6QmZI1J9Q3dra2qK4DHzonBicINbUgXpxaBUDHxbr6SAZpND+JEELRnIYwBJVyVoQrmJmaAS9cM447Y12n9auahMIw1BQyPMgDKPUMIEwDAUmEEY1YQJhGApMIIxqwgTCMBSYQBjVhAmEYSgwgTCqCRMIw1CgEQg2mxlGOWMCYRgKNAJBGgfDKGdMIAxDAcedSgWiZ8+eaVfXMHLCBMIwFMyfP1+1A5kNUIZRrphAGIaCefPmqQSCdQhpumrDKDVMIAxDAalSNAKB9e7d2y1atKgq0qIYlYUJhGEo4IAdrUD4RpZewygnTCAMQwGJ7JIKBMeaGkY5YQJhGArIIqsVBg5vYi0iKvWzYZQiJhCGoYB069mEgHMlOHeAQ21Ilb1ixYrQA+cNo1wwgTAMBZwExjkUHFHJATacpcD5w5z3UKxTvgyjWJhAGIZhGKGYQBiGYRihmEAYhmEYoZhAGIZhGKGYQBiGYRihmEAYhmEYoZhAGIZhGKGYQBiGYRih/B/qpc2jfj1wMQAAAABJRU5ErkJggg=='></body></html>";
boolean success = api.printReceipt(validReceipt);

Returns

ParameterNotes
BooleanTrue if the receipt was sent to the printer, false otherwise.

Search Devices

searchDevices Method

Starts the search of payment terminals associated with the specified ConnectionMethod.

Parameters

ParameterNotes
method Required
ConnectionMethod
The type of connection with the payment terminal (Bluetooth, Cloud, etc.).

Code example

// Starts the search for payment terminals.
// You must implement Events.DeviceDiscoveryFinished and subscribe
// to the event delegate in order to receive the result
api.searchDevices(ConnectionMethod.XXX);

Events invoked

deviceDiscoveryFinished

Returns a list of payment terminals.

Set Locale

setLocale Method

Sets the SDK Locale (language). It is used to set the SDK language as well as the associated date and number formatting.

Parameters

ParameterNotes
locale Required
SupportedLocales
The locale to be set. Supported locales are: SupportedLocales.en_CA, SupportedLocales.en_UK, SupportedLocales.en_US, SupportedLocales.hr_HR, SupportedLocales.is_IS, SupportedLocales.fr_FR, SupportedLocales.pt_PT, SupportedLocales.it_IT, SupportedLocales.no_NO, SupportedLocales.de_DE, SupportedLocales.sl_SL, SupportedLocales.et_EE

Code example

// Set canadian english
api.setLocale(SupportedLocales.en_CA);

Set log level

setLogLevel Method

Sets the log level (info, debug...) for both the payment terminal and the SDK.

Parameters

ParameterNotes
level *
LogLevel
The desired log level. Can be LogLevel.None, LogLevel.Info, LogLevel.Full, LogLevel.Debug
device
Device
This parameter specifies to the system which device should be used for the operations. If no device is supplied, the system will attempt to use a default one.

Code example

//Sets the log level to info
api.setLogLevel(LogLevel.info);

Events invoked

None

No events are invoked.

Returns

ParameterNotes
BooleanTrue iif the operation was successfully sent to device.

Stop current transaction

stopCurrentTransaction Method

Stops the current transaction. A transaction can be stopped only if the last currentTransactionStatus event reported has the property isCancelAllowed set to true. This operation is not supported for Hilite and Hi5 devices.

Code example

// Stops current transaction
if (api.stopCurrentTransaction()) {
...
} else {
...
}

Events invoked

currentTransactionStatus

Invoked after stop transaction. Status UserCancelled will be reported.

endOfTransaction

Transaction will fail with status CANCELLED

Returns

ParameterNotes
BooleanTrue if the transaction was successfully stopped, false otherwise.

Update device

update Method

The update operation checks for new software or configuration updates and initiates a download if required.

Parameters

ParameterNotes
device
Device
This parameter specifies to the system which payment terminal should be used for the operation. If no device is supplied, the system will attempt to use a default one.

Code example

//Check for card reader update
api.update();

Events invoked

None

The merchant should be notified about the update process.

Returns

ParameterNotes
BooleanTrue if the operation was successfully sent to device.

Get Transaction Status

getTransactionStatus Method

This functionality is only available for SmartPos devices (PAX).

If for any reasons you do not know if a transaction was approved or declined then this method will allow you to retrieve the status of the transaction from the Handpoint gateway. The getTransactionStatus method is a convenient way to retrieve the current status of a transaction based on its unique reference. This method accepts a transactionReference as a parameter and returns the current status of the transaction. The transactionReference is returned at the start of a transaction, as part of the Operation Start Result object.

The main FinancialStatus that can be returned as a response to this method are the following ones:

  • AUTHORISED - Transaction was successful.
  • DECLINED - Transaction was declined.
  • UNDEFINED (NOT FOUND) - The transaction does not exist in the Handpoint gateway. If this status is returned within 90s of the start of a transaction, there could be a chance that the cardholder has not inserted, swiped or tapped his card yet on the terminal and the Handpoint gateway might soon receive the transaction. If the UNDEFINED status is returned after 90s, it means that the transaction processed has not reached the Handpoint gateway and it will NOT be charged.
  • IN_PROGRESS - The transaction has been received by the gateway but the outcome is not known yet, try again after a few seconds.
  • REFUNDED - Transaction was refunded.

Parameters

ParameterNotes
transactionReference Required
String
The transactionReference (UUID v4) is returned at the start of a transaction, as part of the Operation Start Result object.

Code example

//Gets the current status of a transaction 
api.getTransactionStatus("00000000-0000-0000-0000-000000000000");

Events invoked

transactionResultReady

Invoked when the result of the getTransactionStatus request is available.


Returns

ParameterNotes
Booleantrue if the operation was successfully.