3

I am trying to integrate UPI payment in Android using upi:// (Deep Link URL). I am good going with successful transactions, but I need transaction details on the server-side as like in the android intent returning result after payment. Callback / Webhook has to configure

Official UPI Docs is here

They specify URL field (page 6 in approx). But no reply has received to the server when transaction occurs. I need to know the proper implementation of callback with transaction details. And Here is the Deep link I used

    val upiURI = "upi://pay?pa=*******@okhdfcbank&url=https://glancer.in/payment_callback.php?id=***&pn=Balu&mc=&tn=TestPay&am=1.00&mam=null&cu=INR&mode=00"
    val intent = Intent(Intent.ACTION_VIEW, Uri.parse(upiURI));
    if (intent.resolveActivity(getPackageManager()) != null) {
        startActivity(intent);
    } else {
        Toast.makeText(this, "No application available to handle this request!", Toast.LENGTH_SHORT).show();
    }
Praveen
  • 294
  • 4
  • 9

2 Answers2

4

Hope I am not too late to answer this, as mentioned in your comments you'd have to integrate with a bank API to get notified on any credit to your bank account. Unfortunately, it's very difficult to do that with a bank, takes nearly 6 months just to get onboarded (not kidding). Here's something that I think can help you. It's pretty cheap and the service is reliable: https://docs.setu.co/collect/biller/upi-deep-links Setu calls your server side API to notify you for every payment made on the payment link you have created via Setu. They provide much more than a callback url. You get reports and ability to check status of the link as well.

1

The docs say:

This should be a URL when clicked provides customer with further transaction details like complete bill details, bill copy, order copy, ticket details, etc. This can also be used to deliver digital goods such as mp3 files etc. after payment

URL is not a web hook. It is there for the convenience of the user who wants to get more information about the transaction

Hemil
  • 916
  • 9
  • 27
  • Then, how do I get the information from the URL parameter – Praveen Aug 12 '20 at 09:24
  • 2
    I need about payment status (Success, Failure), I simply need a web hook-like in UPI to check status about transaction also from server (other than receiving in an app) – Praveen Aug 13 '20 at 17:46
  • I also wanted the same information. 1. You will have to register yourself as a merchant to through BHIM app. And 2. You will have to contact a bank with API banking, open an account there and then use their API to verify your transactions. ICICI and yes bank have apis – Hemil Aug 14 '20 at 05:10