Tap to Pay - Android

Introduction

Purpose

This document references all the features and an Android integration guide for Sola Tap to Pay.

We’ll cover:

  • Tap to Pay Application Overview

  • How do you install the Tap to Pay application on your Android device?

  • How to integrate a third-party merchant application with the Sola Tap to Pay application

Scope

This document is for Android developers looking to integrate the Sola Tap to Pay Helper application into their existing Android mobile app or web application.


Overview of Tap to Pay Helper Mobile App

About

Tap to Pay allows merchants to accept payments using their mobile devices without an external terminal. Tap to Pay is a service application that will work only if the transaction is requested from other third-party merchant applications.

It offers deep link identities to third-party merchant applications to seamlessly integrate to fulfill their payment needs.

Requirements:

  • Operating system of Android OS 10(Q) or later

  • An Android device with NFC capabilities

  • An Android device that is not rooted

  • Android Device Settings:

    • Enable NFC and Contactless Payments settings

    • Disable Developer Options and USB Debugging settings

  • Enable “Tap to Pay” within the Device Configuration settings within the Sola Mobile App

How to use Tap to Pay with the Sola Android App

  • Enable the Tap to Pay Feature:

    • Open the Sola Android App.

    • Navigate to Settings -> Device Configuration

    • Select Tap to Pay.

  • Install the Tap to Pay Helper App:

  • Activate Tap to Pay:

    • Once the Tap to Pay helper app is installed, return to the Sola App and enable Tap to Pay.

How to install Tap to Pay using the Google Play Store

Download the Tap to Pay Helper application from the Google Play Store.


Deep Linking

The deep linking feature allows a third-party application to use a predefined URL to open up the pre-installed Tap to Pay Helper mobile application to process a payment transaction.

The Tap to Pay Helper app will use the “xRedirectUrl” parameter to deliver the transaction results to the third-party application. Results are provided as query parameters, appended onto the value provided by the xRedirectUrl parameter.

The Tap to Pay Helper application's predefined URL is:

cardknox://tap.cardknox.com/transaction


Supported Transaction Workflows

Tap to Pay Helper mobile application supports three (3) different transaction workflows.

  1. Encrypted Payload – The third-party application will request the encrypted payload from the Tap to Pay helper application. To complete the transaction, send the server-side payload and other returned data to the Sola API. (see server-side transaction example)

Parameters

Required

Possible Values

Description

xCommand

Yes

cc:encrypt

If you send the xCommand value as cc:encrypt, the Tap to Pay helper will use the ‘Encrypted Payload’ workflow and return the encrypted payload in the transaction response.

xRedirectURL

Yes

A valid URL scheme defined inside the third-party application to receive transaction responses from the ‘Tap to Pay’ helper application

  1. Single Use Token (SUT) – The merchant application will request a “Single Use Token” instead of the encrypted payload from the Tap to Pay helper application. Then, send the SUT and other returned data to the Sola API to complete the transaction.

Parameters

Required

Possible Values

Description

xCommand

Yes

cc:singleusetoken

If you send the xCommand value as cc:singleusetoken, the Tap to Pay helper will use the “Single Use Token (SUT)” workflow and return the SUT in the transaction response.

xRedirectURL

Yes

A valid URL scheme defined inside the third-party application to receive transaction responses from the ‘Tap to Pay’ helper application

  1. Complete Transaction – With this workflow, the Tap to Pay helper application processes the complete transaction and returns the gateway response to the third-party application.

Parameters

Required

Possible Values

Description

xCommand

Yes

cc:sale, cc:save, cc:authonly, cc:credit

Sola transaction type

xKey

Yes

Your Sola API key

xRedirectURL

Yes

A valid URL scheme defined inside the third-party application to receive transaction responses from the ‘Tap to Pay’ helper application


Transaction Parameters

Two types of parameters are supported by the Tap to Pay helper application.

  1. Transaction API Specific – Use any Sola API parameters in the deep-link request. See Transaction API documentation. However, the below API parameters must be carefully designed to achieve the desired transaction result using the Tap to Pay helper.

Parameter

Description

xRedirectURL

A valid URL scheme defined inside the third-party application to receive transaction responses from the ‘Tap to Pay’ helper application

xCommand

This parameter is utilized to indicate the specific type of transaction that needs to be executed (cc:sale, cc:refund, cc:void, etc.).

One caveat is that this must be defined as cc:encrypt for the ‘Encrypted Payload’ workflow or cc:singleusetoken for the ‘Single-Use-Token’ workflow.

For the ‘Complete Transaction’ workflow, you can pass the usual Sola-specific xCommand values.


Development and Debugging

Tap to Pay Development/Debugging Parameters – These are defined to troubleshoot issues quickly during the development phase.

The following is the list of Tap to Pay specific parameters that can be passed, along with the BBPOS Specific parameters, by the third-party merchant application in the deep link query string.

Parameter

Description

Possible Values

Default Value

debug

Set to TRUE to display logs in the Tap to Pay helper application.

TRUE/FALSE

FALSE

useSTG

This enables a staging gateway environment. Applicable only for ‘Complete Transaction’ workflow.

TRUE/FALSE

FALSE

doNotRedirect

Disables the redirect URL and displays the results/logs within the Tap to Pay helper app.

TRUE/FALSE

FALSE

All ‘debugging’ parameters are optional.


How to Integrate Tap to Pay with Third-Party Android Applications

Third-party merchant app developers can form URLs based on different transaction needs. Tap to Pay helper app will not cache any third-party request in the mobile application storage, and it's entirely driven by the transaction request passed through the deep link request.

Example of a deep link URL:

cardknox://tap.cardknox.com/transaction?xRedirectURL=mechant://pos.merchant.com/&xKey=XXXXXW23243HHDFJ&xEmail[email protected]&xAmount=12.00&xTip=1.0&xCommand=cc:sale&debug=True&useSTG=True&xAllowPartialAuth=true

Note that the above URL is corresponding to the “Complete Transaction” workflow since xKey is provided

Example of a deep link request, corresponding to the transaction response:

mechant://pos.merchant.com?xResult=D&xStatus=Declined&xError=Invalid%20Chip&xRefNum=102304545&xErrorCode=2034

The below response parameters and their explanations in the context of Tap to Pay helper.

Parameter

Description

xEncryptedPayload

This will contain the encrypted payload or single-use token if the transaction workflow is requested as an ‘encrypted payload’ or ‘single-use token’.

xSerialNumber

This will contain the rock value, that’s needed to perform the gateway request when the workflow is requested as ‘Encrypted Payload’ or ‘Single-Use-Token’.

xStatus

This will be a success or error when the workflow is requested as ‘Encrypted payload’ or ‘Single-Use-Token’. Containing the standard Sola gateway response values.

xCommand

You can refer to the API documentation for other response parameter definitions.

How to create a server-side call:

When running the server-side call to Sola, you must use the standard required API parameters. Reference the Transaction API for a list of parameters.

Additionally, the following parameters are required:

Parameter

Description

Example

xSerialNumber

The serial number value returned from the payload.

alP4n4-_92UPrgVI

xMobileTapType

Must equal to ‘TapToPhoneApp’

TapToPhoneApp

xEMVData

Pass the value of the returned encrypted payload (xEncryptedPayload).

AAABBgAAABgAAAAAAAABHgAAAIYAAAEeAQAAAAH_htzImhOJfEQlhxhrJsYZttThXPsWFZgUTYwxmxqaxdOXYnCvfoATExUgJb…

Server-side Request Example:

{
  "xKey": "dxxxcaxaxfxxfxxxxxxdxxcxcxfaax",
  "xCommand": "cc:sale",
  "xVersion": "4.5.9",
  "xSoftwareVersion": "1.0.12",
  "xAmount": "1.08",
  "xSoftwareName": "My Application ",
  "xEMVdata": "AAABBgAAABgAAAAAAAABHgAAAIYAAAEeAQAAAAH_htzImhOJfEQlhxhrJsYZttThXPsWFZgUTYwxmjxPBLLhkxwPcVZACZGDIntDDasmtAxxBWxxn_eAxlUbNxxAxxWtR",
  "xSerialNumber": "alN4n4-_92UPrgVI",
  "xMobileTapType": "TapToPhoneApp"
}

Once the deep link URL is formed, you can create an intent using the formed deep link URL and start the activity using the intent.

Thus Tap to Pay Helper application will be launched and start the workflow. Once the requested operations are complete, the result will be returned using the xRedirectUrl as well.

Here’s an example snippet of code to invoke the creation:

Uri myAction = Uri.parse(deepLinkUrl); 
// deepLinkUrl must be a string variable holding the deep link URL with all required parameters.
Intent intent = new Intent (Intent.ACTION_VIEW);
intent.setData (myAction);
startActivity(intent);

Last updated

Was this helpful?