PaySetu is an Android SDK that allows offline UPI payments using BHIM USSD. It is inspired from FreePay.
- PaySetu objective is to allow TPAPs to easily integrate offline UPI transactions both financial and non financial.
- PaySetu uses BHIM USSD *99# to enable UPI transactions.
- PaySetu utilizes Android Accessibility service to perform action on BHIM USSD.
- PaySetu currently is in beta phase and enables only check balance and send money to mobile number happy flow.
- The USSD behaviour is dependent on device and mobile operator and it is error prone.
- Google Play policy can be restrict about accessibility permission.
Define the following strings in your app module's res/values/strings.xml
<string name="paysetu_a11y_name">PaySetuSample</string>
<string name="paysetu_a11y_desc">PaySetuSample USSD allows UPI payments offline</string>PaySetu.init(this@MainActivity.application)PaySetu.sendMoney(object: PaySetuSendMoneyListener(vpa,1f,"1") {
override fun onUSSDCodeRunning() {
Log.e("Shrinath", "onUSSDCodeRunning: ", )
}
override fun onPinEnter(message: String): Pin {
Log.e("Shrinath", "onPinEnter: ")
return "0000"
}
override fun onPaymentSuccess(details: String) {
Log.e("Shrinath", "onPaymentSuccess: $details")
}
override fun onPaymentFail(error: String) {
Log.e("Shrinath", "onPaymentFail: $error")
}
});