Skip to main content

DeepLink Integration

What is this?

DeepLink Integration lets businesses manage orders through a single mobile application and process transactions using various payment methods via the Revenue Monster Merchant App on Android terminals.

This integration is compatible with any mobile device or terminal running the RM Merchant App.


How to Use

Step 1: Set Up the Android Receiver

Configure your Android app to receive the DeepLink intent from the RM Merchant App.

Step 2: Choose the Transaction Type

Select the appropriate transactionType number:

  • 1 — Quick Pay
  • 2 — Card Payment
  • 3 — Void Transaction
  • 4 — Wallet Settlement
  • 5 — Card Settlement

Step 3: Launch the Intent

Use the REVENUE_MONSTER_PAYMENT intent with the required extras.

Step 4: Handle the Response

The result is returned as a JSON string in the result extra of the intent.


Application Receiver

Setup 1: AndroidManifest.xml

AndroidManifest.xml
Text
1<activity android:name=".ReceiverActivity" android:exported="true">
2 <intent-filter>
3 <action android:name="android.intent.action.SEND" />
4 <category android:name="android.intent.category.DEFAULT" />
5 <data android:mimeType="text/plain" />
6 </intent-filter>
7</activity>

Setup 2: ReceiverActivity.kt

class ReceiverActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        try {
            val keySet: Set<String> = intent?.extras!!.keySet()
            keySet.forEach { key ->
                val value = intent.extras!![key]
                Log.v("Receiver", "key = $key || value = $value")
            }
        } catch (e: Exception) {
            e.printStackTrace()
        }

        val result = intent?.getStringExtra("result")
        val transactionType = intent?.getIntExtra("transactionType")
        // Process result and transactionType here
    }
}

QuickPay.kt
Text
1val i = Intent("REVENUE_MONSTER_PAYMENT").apply {
2 putExtra("packageName", packageName)
3 putExtra("receiverName", <<YOUR_ACTIVITY>>::class.java.name)
4 putExtra("transactionType", 1)
5 putExtra("orderId", System.currentTimeMillis().toString())
6 putExtra("orderTitle", "Intent Demo")
7 putExtra("amount", 10)
8 putExtra("printReceipt", false)
9}
10startActivity(i)

Response Parameters

Response.kt
Text
val jsonString = intent?.getStringExtra("result")
itemJSON

Transaction response object

codeString

"SUCCESS" if the payment succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.


CardPayment.kt
Text
1val i = Intent("REVENUE_MONSTER_PAYMENT").apply {
2 putExtra("packageName", packageName)
3 putExtra("receiverName", <<YOUR_ACTIVITY>>::class.java.name)
4 putExtra("transactionType", 2)
5 putExtra("orderId", System.currentTimeMillis().toString())
6 putExtra("orderTitle", "Intent Demo")
7 putExtra("amount", 100)
8 putExtra("printReceipt", false)
9}
10startActivity(i)

For terminal MF919, receipt printing cannot be controlled programmatically.

Response Parameters

Response.kt
Text
val jsonString = intent?.getStringExtra("result")
itemJSON

Transaction response object

codeString

"SUCCESS" if the payment succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.


VoidTransaction.kt
Text
1val i = Intent("REVENUE_MONSTER_PAYMENT").apply {
2 putExtra("packageName", packageName)
3 putExtra("receiverName", <<YOUR_ACTIVITY>>::class.java.name)
4 putExtra("transactionType", 3)
5 putExtra("transactionId", "240620034957010325054813")
6 putExtra("reason", "Wrong Order")
7 putExtra("email", "test@abc.my")
8 putExtra("pin", "456789")
9 putExtra("printReceipt", false)
10}
11startActivity(i)

Response Parameters

Response.kt
Text
val jsonString = intent?.getStringExtra("result")
itemJSON

Transaction response object

codeString

"SUCCESS" if the void succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.


WalletSettlement.kt
Text
1val i = Intent("REVENUE_MONSTER_PAYMENT").apply {
2 putExtra("packageName", packageName)
3 putExtra("receiverName", <<YOUR_ACTIVITY>>::class.java.name)
4 putExtra("transactionType", 4)
5 putExtra("print", false)
6}
7startActivity(i)

Response Parameters

Response.kt
Text
val jsonString = intent?.getStringExtra("result")
totalSalesAmountUint64

Total sales amount

totalSalesCountUint64

Total sales count

totalRefundedAmountUint64

Total refunded amount

totalRefundedCountUint64

Total refunded count

wallet[*].nameString

Wallet name

wallet[*].methodString

Wallet method

wallet[*].regionString

Wallet region

wallet[*].sales.countUint64

Wallet sales count

wallet[*].sales.amountUint64

Wallet sales amount

wallet[*].refunded.countUint64

Wallet refunded count

wallet[*].refunded.amountUint64

Wallet refunded amount

range[*]String

Range of settlement dates


CardSettlement.kt
Text
1val i = Intent("REVENUE_MONSTER_PAYMENT").apply {
2 putExtra("packageName", packageName)
3 putExtra("receiverName", <<YOUR_ACTIVITY>>::class.java.name)
4 putExtra("transactionType", 5)
5}
6startActivity(i)

Response Parameters

Response.kt
Text
val jsonString = intent?.getStringExtra("result")
codeString

"SUCCESS" if the settlement succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

summary.batchNoString

Terminal settlement sequence number

summary.currencyTypeString

Settlement currency type (currently supported MYR only)

summary.noOfTransactionsUint64

Count of settled transactions

summary.settlementAtString

Date and time of settlement

summary.totalSalesAmountUint64

Total sales amount in cents

transactions[*].amountUint64

Transaction amount in cents

transactions[*].currencyTypeUint64

Transaction currency type

transactions[*].transactionAtString

Transaction date and time

transactions[*].transactionIdString

Transaction ID

transactions[*].typeString

Transaction type