Skip to content

Repository files navigation

PaySetu

PaySetu is an Android SDK that allows offline UPI payments using BHIM USSD. It is inspired from FreePay.

🚀 Concept

  • 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.

⚠️ Note:

  • The USSD behaviour is dependent on device and mobile operator and it is error prone.
  • Google Play policy can be restrict about accessibility permission.

Integration

Step 1: Define name and description for accessibility service

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>

Step 2: Initialize PaySetu SDK

PaySetu.init(this@MainActivity.application)

Step 3: Call PaySetu.sendMoney to make a payment to a mobile number

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")
    }

});

About

PaySetu is an Android SDK that allows UPI payments offline using BHIM USSD.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages