How to deep link my android app to paytm and freecharge app?
Asked Answered
S

1

6

I am creating an android application for browsing plans and tariff of mobile recharges. What I want is that when the user selects a plan from my app, then on clicking either of the one option ie paytm or freecharge:

  1. The mobile recharge screen of the respective app gets open.
  2. User's phone number and amount of recharge gets prefilled.

As far as I know this is possible either through Intends or Deeplinking. But the problem is that:

  1. If I use intends and open paytm/freecharge using their package names it will open the home screen of those apps. Now how to open the recharge mobile screen and prefill the numbers and recharge amount??

  2. If I follow the deeplink approach, for either of the apps what url to call and what parameters to pass?? I got a deeplink url of paytm in their api docs but that too opens only the home screen.

Once this is done, user can proceed to recharge via both these apps. I have seen this feature in a similar app ireff and thats excatly what I want to implement.

Mobile recharge screen of freecharge app Mobile recharge screen of paytm app

Above are the screen on which I want to reach and fill in the phone number and amount which user has filled on my app. Please let me know how to do this I couldn't find anything useful about this on the internet. Thanks.

Samaveda answered 8/8, 2016 at 6:48 Comment(7)
Were you able to do this then?Impecunious
No I wasn't. We skipped the freecharge funtionality for now.Samaveda
Hello Ashwani, for PayTM were you able to do this? Can you tell me high level steps.Jigsaw
@Jigsaw you can refer to this link blog.paytm.com/…Samaveda
thanks sir @AshwaniKumar for the link...... what would be the url for loading payement page? with particular number inside itWeirdo
@josekj Extremely sorry but I don't have that code now. I did it 2yrs back so can't recal.Samaveda
ok.... anyway thanks for quick replayWeirdo
I
1

I have done for paytm in kotlin

fun paytm(amount:String,contact_number:String){
val intent = Intent()
val bundle = Bundle()
bundle.putString(PaytmConstants.TRANSACTION_AMOUNT, amount)
bundle.putString(
PaytmConstants.PAYEE_MOBILE_NUMBER,
contact_number
)
bundle.putBoolean(PaytmConstants.IS_MOBILE_NUMBER_EDITABLE, false)
bundle.putBoolean(PaytmConstants.IS_AMOUNT_EDITABLE, false)
intent.component = ComponentName("net.one97.paytm", "net.one97.paytm.AJRJarvisSplash")
intent.putExtra(PaytmConstants.PAYMENT_MODE, 1)
intent.putExtra(PaytmConstants.MERCHANT_DATA, bundle)
startActivityForResult(intent, 103)
}
Incidentally answered 28/5, 2019 at 4:39 Comment(1)
also brother if possible replace PaytmConstants with correct string valueWeirdo

© 2022 - 2024 — McMap. All rights reserved.