DvPayLite

DvPayLite Deep Linking Integration

Prerequisites

Before you get started with your implementation, read the integration overview to learn about integration and required configuration.

Request TPN

Please contact the business entity to onboard as a merchant and get the TPN to integrate and test with the sandbox environment.

TPN

It is a 12-digit Numeric code that is assigned to the merchant.

  1. Setup developer environment

Android Studio IDE: developer android.com (opens in a new tab)

  1. Develop Android Application

Create a new Android project or use the existing project and configure the below build.gradle and setting.gradle snippet code into the project.

  1. Configure Gradle

Add below lines in build.gradle of your project

com.denovo:invoke-dvpay-lite:1.1.9.7

Add below lines in AndroidManifest.xml of your project

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

Add below lines in setting.gradle of your project

allprojects {
  repositories {
    jcenter()
      flatDir {
        dirs 'libs'
      }
maven {
url "s3://denovo-android.s3.amazonaws.com"
credentials(AwsCredentials) {
accessKey "AKIA26XMFQBITA36GRDR"
secretKey "JZdZ3BoK7V2ZpFr8iZtZ3g2oGKX/oVgDVqpJRNvy"
}
}
}
}

Add below lines in build.gradle of your project for running the application with signature(for P3 and P5 test devices).

To download the kozen.jks file, simply click on the highlighted text that reads kozen.jks

signingConfigs {
      debug {
            storeFile file(“kozen.jks”)
            storePassword “kozen”
            keyAlias “xc-buildsrv”
keyPassword “kozen”
v1SigningEnabled true
v2SigningEnabled true
}
     }
buildTypes {
    debug {
        signingConfig signingConfigs.debug
        …….
        }
    }

Install DvPayLite Application

Please make sure the DvPayLite application is used and installed on the payment terminal. If not please do install the application and proceed further integration. Version Control and Changes

  • Non-breaking changes: We will be adding new functionality and bug fixes to the API over time. You should expect to see new endpoints or new attributes for existing objects. Such changes will not result in a new API version. Please make sure that your code can handle new attributes gracefully. Also, please make sure your code does not depend on the order in which records are returned unless it is explicitly stated in this documentation.
  • Breaking changes: We intend to maintain the current API version for the foreseeable future. If and when we decide to add functionality that breaks the contract of the current API, we will publish it with a new version number, to keep the existing API functionality backward compatible.

High-level flow

The following is a high-level flow to communicate with the DvPayLite Application.

DvPayimage-1.png

Initialize the Application

To invoke the DvPayLite Application, the developer needs to initialize the application in an Invoking app with the set of lines below.

activityResultLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) 
{ result: ActivityResult ->
 
intentApplication.handleResultCallBack(result)
 
}
 
intentApplication = IntentApplication(requireContext())

Device Register API

Device register API is used to download the terminal configuration and merchant configuration data from the backend application and import it into the DvPayLite application.

Request Parameters:

FieldTypeDescriptionExample
tpn * string It’s a Unique 12-digit code. This value is unique for each merchant.123456789012
applicationType * string The application type is used to identify the applicationDVPAYLITE

Snippet code

jsonRequest = {“tpn”:”123456789012”, “applicationType”:”DVPAYLITE”}
InvokeApp.intentApplication.setTerminalAddListener(object : TerminalAddListener {
 
override fun onApplicationLaunched(addTerminal: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(errorResult: JSONObject) {
 
//application launched failed json data
 
}
 
override fun onTerminalAdded(terminalResult: JSONObject?) {
 
//Terminal added json data
 
}
 
override fun onTerminalAddFailed(errorResult: JSONObject) {
 
//Terminal add failed json data
 
}
 
})
 
InvokeApp.intentApplication.addTerminal(jsonRequest, InvokeApp.activityResultLauncher)

Perform Transaction API

This API is used to invoke the DvPayLite application to perform the transaction. It supports SALE, REFUND, VOID, PRE AUTH, and TICKET transaction types.

Note: For pin-based transactions, Keys to be injected in the terminal. To inject the keys in terminal, please contact developer support team at devsupport@denovosystem.com

Request Parameters:

FieldTypeDescriptionExample
type * string Transaction type should be any one of the following [SALE, REFUND, VOID, PRE_AUTH, TICKET]SALE
paymentType * string Payment Type [CREDIT,DEBIT,EBT_Food,EBT_Cash] CREDIT
amount * string Transaction Amount10.00
tip * string Transaction Tip Amount (Applicable only for sale and ticket) 1.00
applicationType * string The application type is used to identify the applicationDVPAYLITE
refId * string Transaction reference id (Should be unique for sale, refund, and Pre_Auth and should be original sale ref id for void and pre_auth refund for ticket)1234567890
receiptType * string Type of receipt Possible Options - [Merchant, Customer, Both, No]Merchant

Snippet code

jsonRequest = {“type”:”SALE”, “amount”:”10.00”, “tip”:”1.00”, “applicationType”:”DVPAYLITE”, “refId”:”1234567890”}
 
InvokeApp.intentApplication.setTransactionListener(object : TransactionListener {
 
override fun onApplicationLaunched(result: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(errorResult: JSONObject) {
 
//application launched failed json data
 
}
 
override fun onTransactionSuccess(transactionResult: JSONObject?) {
 
//Transaction Success json data
 
}
 
override fun onTransactionFailed(errorResult: JSONObject) {
 
//Transaction Failed json data
 
}
 
})
 
InvokeApp.intentApplication.performTransaction(jsonRequest, InvokeApp.activityResultLauncher)

Batch Settlement API

A batch is a group of transactions that have been processed but have yet to be settled. When a transaction is approved, it is added to the batch. When a batch hasn’t been settled yet, it is called an open batch, and transactions in the batch can still be voided and reversed if needed.

Request Parameters:

FieldTypeDescriptionExample
type * string Transaction type [SETTLE] SETTLE
applicationType * string The application type is used to identify the applicationDVPAYLITE

Snippet code

settleReq = {“type”:”SETTLE”, “applicationType”:”DVPAYLITE”} InvokeApp.intentApplication.setSettlementListener(object :
 
SettlementListener {
 
override fun onSettlementFailed(p0: JSONObject) {
 
//Settlement failed json data
 
}
 
override fun onSettlementSuccess(p0: JSONObject) {
 
//Settlement success json data
 
}
 
})
 
InvokeApp.intentApplication.settleBatch(settleReq, InvokeApp.activityResultLauncher)

Tip Adjust API

This API is used to perform a tip adjustment on a sale transaction.

Note: Tip adjust is allowed only for credit transactions by processors. It is not allowed for any other transactions.

Request Parameters:

FieldTypeDescriptionExample
Type * string Transaction type [TIP ADJUST]TIP ADJUST
Amount * string Transaction Amount of original sale base transaction10.00
Tip * string Transaction Tip Amount1.00
Application type * string The application type is used to identify the application.DVPAYLITE
refId * string Transaction reference id of original sale transaction1234567890

Snippet code

jsonRequest = {“type”:”TIP ADJUST”, “amount”:”10.00”, “tip”:”1.00”, “applicationType”:”DVPAYLITE”, “refId”:”1234567890”}
 
InvokeApp.intentApplication.setTransactionListener(object : TransactionListener {
 
override fun onApplicationLaunched(result: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(errorResult: JSONObject) {
 
//application launched failed json data
 
}
 
override fun onTransactionSuccess(transactionResult: JSONObject?) {
 
//Transaction Success json data
 
}
 
override fun onTransactionFailed(errorResult: JSONObject) {
 
//Transaction Failed json data
 
}
 
})
 
InvokeApp.intentApplication.performTipAdjust(jsonRequest, InvokeApp.activityResultLauncher)

Get TPN API

This API is used to get a device TPN.

Request Parameters:

FieldTypeDescriptionExample
applicationType * string Application type is used to identify the application.DVPAYLITE

Snippet code

jsonRequest = {“applicationType”:”DVPAYLITE”}
 
InvokeApp.intentApplication.setGetTPNListener(object : GetTPNListener {
 
override fun onApplicationLaunched(response: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(response: JSONObject?) {
 
//application launched failed json data
 
}
 
override fun onGetTPN(response: JSONObject?) {
 
//Success json data
 
}
 
override fun onTPNFailed(response: JSONObject?) {
 
// Failed json data
}
})
 
InvokeApp.intentApplication.getTPN(jsonRequest, activityResultLauncher)

Device detail API

This API is used to obtain details of the device.

Request Parameters:

FieldTypeDescriptionExample
applicationType * string Application type is used to identify the application.DVPAYLITE

Snippet code

jsonRequest = {“applicationType”:”DVPAYLITE”}
 
InvokeApp.intentApplication.setGetDeviceListener(object : GetDeviceListener {
 
override fun onApplicationLaunched(response: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(response: JSONObject?) {
 
//application launched failed json data
 
}
 
override fun onGetDevice(p0: JSONObject?) {
 
// Success json data
 
}
 
override fun onGetDeviceFailed(p0: JSONObject?) {
 
// Failure json data
 
}
 
})
 
InvokeApp.intentApplication.getDevice(jsonRequest, activityResultLauncher)

Status Check API

This API is used to get current transaction status.

Request Parameters:

FieldTypeDescriptionExample
refId * string Transaction reference id of original sale transaction1234567890
type * string Type of the transaction [STATUS]STATUS
applicationType * string Application type is used to identify the application.DVPAYLITE

Snippet code

jsonRequest = {“type”:” STATUS”, “applicationType”:”DVPAYLITE”,“refId”:”1234567890”}
 
InvokeApp.intentApplication.setTransactionListener(object :TransactionListener {
 
override fun onApplicationLaunched(result: JSONObject?) {
 
//application launched success json data
 
}
 
override fun onApplicationLaunchFailed(errorResult: JSONObject) {
 
//application launched failed json data
 
}
 
override fun onTransactionSuccess(transactionResult: JSONObject?) {
 
//Transaction Success json data
 
}
 
override fun onTransactionFailed(errorResult: JSONObject) {
 
//Transaction Failed json data
 
}
 
})
 
InvokeApp.intentApplication.performTransaction (jsonRequest, activityResultLauncher)

Administrative Txn API

This API is used to get card number.

Note: For this to work, administrative transaction type to be enabled in STEAM ->edit parameters -> Under transaction tab

Request Parameters:

FieldTypeDescriptionExample
type * string Type of the transaction [ADMINISTRATIVE_TXN]ADMINISTRATIVE_TXN
applicationType * string The application type is used to identify the applicationDVPAYLITE

Snippet code

jsonRequest = {“type”:” ADMINISTRATIVE_TXN”, “applicationType”:”DVPAYLITE”}
 
InvokeApp.intentApplication.setTransactionListener(object :TransactionListener {
 
 
            override fun onApplicationLaunched(result: JSONObject?) {
                //application launched success json data  
            }
 
            override fun onApplicationLaunchFailed(errorResult: JSONObject) {
                //application launched failed json data
            }
 
            override fun onTransactionSuccess(transactionResult: JSONObject?) {
                //Transaction Success json data           
            }
 
            override fun onTransactionFailed(errorResult: JSONObject) {
                //Transaction Failed json data             
            }
        })
 
     InvokeApp.intentApplication.performTransaction (jsonRequest, activityResultLauncher)

Go Live Requirements

Following are the Go Live Activities:

  • Set up production terminal with DvPayLite app
  • Replace Production environment SDK versions in the application build gradle.

3rd party app installation in terminals

  • All the 3rd party apps integrating with DvPayLite deep-linking will be hosted in our market application which will come as default app in the firmware provided in the production terminal. To host the application in the market app, we require the below details.
  1. APK that should be hosted.
  2. Package name of application
  3. App name to display
  4. App icon to display
  • Once the application is hosted in a market app, the app can be downloaded from there in terminals and also can be updated by hosting newer applications. This can be tested on test environments and can be uploaded for production environments.

Help

Email us directly at devsupport@denovosystem.com with any questions or suggestions.