Similar issue here and the solution seems to be to create a merchant account (business account) and pass the parameters from that account (including merchant id “mc”) for payment processing. See UPI specifications by Google here. That being said, I tested it with only four parameters, pa, pn, tn and am but I generated a QR code and scanned from GPay app and it worked without an issue.
My conclusion is that the security measure applies to in-app generated upi payment URI only and if we are scanning from an UPI payment app, these additional parameters are not considered.
If we could generate the QR code and make a payment through scanning from the UPI app it would work. But I don’t think we can make another app scan our generated QR code.
I was able to successfully make an UPI payment to a non merchant account but I cannot do an automatic payment verification. If you would like to resort to this method then read on.
- The payment needs to be verified manually by transaction ID, in my case I generate a bill number for reference.
- User has to take a screenshot of the QR code (or you can write a screencap snippet) and manually pay via QR code scan -> scan from gallery or image source.
- Totally not suitable for applications that require automatic payment verification.
How to do:
- Create a QR code with the following parameters:
- pa – payee address (UPI ID)
- pn – payee name
- am – amount to be paid
- tn – transaction note (I set my bill number here)
- Request user to scan via gallery after taking screenshot or write code to save screenshot of the QR in device.
- Manually confirm after payment in made with reference to the transaction note.
I know this is not even close to an ideal solution but I have tried with the registered merchant account and simple user account and it works on both cases. I tried to pass the merchant account parameters I found in addition to the above mentioned parameters but it didn’t work for some reason. I will update if I found the cause of it in future.
CLICK HERE to find out more related problems solutions.