The aim of this document is to assist you in initiating payment acceptance from your custom application running on the Nomba Android terminal. If you encounter any difficulties with this process, feel free to reach out for support.

Trigger payments - available since NombaX Application v1.6.2

This following code snippet serves as a foundation for triggering payment events on the Nomba terminal. Adjustments to the amount, transaction reference, and other parameters can be easily made based on specific application requirements.

Please ensure to pass the amount as kobo i.e. 200 will charge your customer NGN 2.00

Your resultString should look like;

{
    responseCode=00, responseCodeMeaning="Completed successfully", terminalId="2KUD2XFU", 
    rrn="240117080003", formattedAmountString="₦3.00", txnType="PURCHASE", dateTime="2024-01-17 8:00:03", 
    cardPan="559441******5882", stan="575780", expiryDate="2606", cardName="00002220", 
    merchantName="Etrack Systems", providerTid="2KUD2XFU", cardScheme="Debit Mastercard"
}

Please note that the following details will make reference to the kotlin code snippet

Constants

Description
PAYMENT_OPTION_INTENTDefines the action string for the intent, indicating the type of action to be performed.
AMOUNT_DATARepresents the key for passing the amount to be charged during the payment process.
MERCHANT_TX_REFRepresents the key for tying a reference to the payment, often used for tracking and record-keeping.
TXN_RESULTRepresents the key for extracting transaction result data from the intent.

State Variable

Description
resultStringA mutable state variable initialized as an empty string, which is intended to store the transaction result received from the launched intent.

Intent Setup

Description
val intent = Intent(PAYMENT_OPTION_INTENT)Creates an instance of Intent with the specified action PAYMENT_OPTION_INTENT.
intent.putExtra(AMOUNT_DATA, "300")Adds extra data to the intent, including the amount to be charged AMOUNT_DATA and a reference to the payment MERCHANT_TX_REF.

Launching the intent

Description
paymentOptionLauncher.launch(intent)Initiates the intent, triggering the Android system to display the payment options to the user.

Result Handling

Inside the result callback, the code retrieves the transaction result from the received intent and updates the resultString variable.