11
votes

I am facing this weird problem with my Google pay integration in android app. When I am sending an amount more than 2000(INR) I am getting the error "You have exceeded the maximum transaction amount set by your bank" even though I have not transacted any amount. And when I try to send amount directly from Google pay it works. It is also working for the amounts below 2000(INR) but not for more than that.

Here is code

  val uri: Uri = Uri.Builder()
        .scheme("upi")
        .authority("pay")
        .appendQueryParameter("pa", MY_UPI_ID)
        .appendQueryParameter("pn", MY_USER_NAME)
        //.appendQueryParameter("mc", "1234")
        //.appendQueryParameter("tr", "123456789")
        .appendQueryParameter("tn", "test transaction note")
        .appendQueryParameter("am", "2500.00")
        .appendQueryParameter("cu", "INR")
        //.appendQueryParameter("url", "https://test.merchant.website")
        .build()
    
    
    val intent = Intent(Intent.ACTION_VIEW)
    intent.data = uri
    intent.setPackage(GOOGLE_PAY_PACKAGE_NAME)
    startActivityForResult(intent, PAY_REQUEST_CODE)

I have read a lot of blogs, docs but didn't found any solution. Any help or suggestions?

2
Have you hit any of the transaction limits referenced in this document? upipayments.co.in/exceeded-maximum-transaction-limitSoc
No. I am facing this issue even if it is my first transaction of the day.AkashK
did you figure out the solution?Bala Saikrupa Puram
I am facing this issue for any amount I enter and if I pay directly using Google pay without my app as a mediator it works.nayan dhabarde
Does your bank have a limit on how much a single transaction can be? You said it works ok for smaller amounts, and maybe Google Pay's app is "trusted" so they allow larger payments. I'm in the UK and we have a £30 limit on contactless payments with a card, but there's no limit if you make a contactless payment with Google Pay (using the same card!) so maybe it's like that? You should probably talk to your bank and askcactustictacs

2 Answers

0
votes
Uri uri = Uri.parse("upi://pay").buildUpon()
     .appendQueryParameter("pa", upiId)  // google pay business id
     .appendQueryParameter("pn", name)
     .appendQueryParameter("mc", "")            /// 1st param - use it (it was commented on my earlier tutorial)
     //.appendQueryParameter("tid", "02125412")
     .appendQueryParameter("tr", "25584584")   /// 2nd param - use it (it was commented on my earlier tutorial)
     .appendQueryParameter("tn", note)
     .appendQueryParameter("am", amount)
     .appendQueryParameter("cu", "INR")
     //.appendQueryParameter("refUrl", "blueapp")
     .build();

there are two modification you need to do.

  1. use Google pay business App ID only
  2. use "mc" and "tr" param in intent call.

"mc" - merchant code(it can be blank). "tr" - transaction refer id(it can be any random number). Working Reference Post here

-1
votes

I have solved the issue pls download and install google pay for the business, change MY_UPI_ID(pa) and try I will works