Reputation: 302
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();
}
Upvotes: 4
Views: 9272
Reputation: 147
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.
Upvotes: 5
Reputation: 1016
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
Upvotes: 2