Thawani Lamsa SDK (Android)
You can integrate the Thawani Lamsa SDK (Tap & Pay) into your Android application.
Last updated
You can integrate the Thawani Lamsa SDK (Tap & Pay) into your Android application.
Last updated
Android devices with Build-in NFC (Near Field Communication)
Android minimum SDK 26
Register your business with and create your branch and touchpoints. After creating a touchpoint, you can obtain an authorization key. Please note that the authorization key is the same as the touchpoint key.
Step 1: Add dependency resolution to your settings.gradle
:
Step 2: Add dependency in your build.gradle
(App Level):
Step 3: Add Lamsa activity to your manifest.xml
minifyEnabled true
in your build.gradle:app
please add this line in your proguard-rules.pro
fileInitiate the Lamsa SDK from your app
Add this code in same class you initiate Lamsa (you can put your own value).
Here is the description of the parameters:
amount
Yes
Double
Amount to be paid
authKey
Yes
String
Auth key (Touch point)
remarks
No
String
Remarks for the payment
isProduction
Yes
Boolean
Specify whether it's for staging or production
paymentOption
No
PaymentOptions
Payment Options (Only for staging)
autoCloseInMillis
No
Integer
specify delay in milli second to auto close lamsa sdk after payment success or failed
PaymentOptions.CARD_ACCEPT
Card accepted
PaymentOptions.CARD_REJECT
Card rejected
PaymentOptions.THREE_D_S_ACCEPT
Card accepted (Credit Card)
PaymentOptions.THREE_D_S_REJECT
Card rejected (Credit Card)
To handle the response from Lamsa SDK, you will use the PaymentResultModel
. This model is employed to deserialize and structure the response. It provides the necessary information regarding the payment result.
Here is the description of the above model attributes
success
Boolean
Whether the request success or not.
description
String
Description about payment.
paymentId
String
Identifier associated with the payment
amount
Double
The requested transaction amount
invoice
String
The payment invoice
paymentStatus
Int
Payment status
date
Date
Date of the transaction
Payment Status
1
Pending
Payment is pending
2
Success
Payment is successful
3
Failed
Payment is failed
To handle the response to the payment request, implement the onActivityResult
method in your activity as follows:
Note: Put your own authKey from and change isProduction to true when you go for production.