UPI Payment using Activity Starter

Hello Everyone. I hope you all are Good.
Today i am back with my new tutorial about how you can make upi payments using activity starter only …
So let’s start…

4 Components Required.

  1. Activity starter ( to make & check payment)
  2. 2 Textbox ( to enter amount & note)
  3. 1 label ( to get result like payment success or fail)
  4. Button ( to trigger the activity starter)

Now blocks Part .

1st you need global variable to create 6 digit random order id for payment.

IMG_20200726_223539

Now set activity action android.intent.action.VIEW

Now set data uri

upi:\pay?pa=your upi address like(googlepay@oksbi)&pn=Your name&tr=orderid(use global variable)&mc=4411&am=amount&tn=note

Now set activity starter result name = response

You can set all such things on button click or on screen initialize.
To start activity we will use button.

Now once activity is completed it’s time to check result .

So i am using block
After activity result .
first i use for each item & split text block to get payment status details …Because the result contains to many things like response code , transaction id , payment status etc.

Then i use local variable to split the result then i use if then block to check if the split item is status & if its true then i show the result on label 1.

IMG_20200726_223610

I hope you all like the tutorial & i am able to explain you all the blocks.

Here i am providing aia if there is any confusion & also blocks screenshots.( To know more About (mc = Merchant Code) use google.

Upigateway.aia (51.0 KB)

@sonumohammad333 thanks for suggestions…
Note:- This app completely works with
Google Pay
Phone Pe
Paytm Upi
Airtel Pay …

Not working with
Amazon Pay

Thanks…

39 Likes

Amazing and easy tutorial!!

2 Likes

Nice guide! :+1:

2 Likes

Good Tutorial :+1:

4 Likes

Finally. Useful information​:grin:

2 Likes

Awesome fully working guide… Ty

1 Like

This post was flagged by the community and is temporarily hidden.

1 Like

The language of community is English, so post in English.

2 Likes

Nice work @Alapjeet. Is it Hackable?

2 Likes

Awesome, thanks for sharing

2 Likes

use obfuscated text block in front of the API @netsolutions1

4 Likes

There’s no api… yes for data uri use obfuscated text block because it contains your upi address …

4 Likes

I don’t think so… …

3 Likes

@Alapjeet Nice work

2 Likes

Thanks for this guide.
This is what I was searching for. :relieved:

2 Likes

@Alapjeet
Will this method work for all UPI apps?
UPI extensions are not working with Phonepe, Amazon Pay

2 Likes

I checked it with phone pe, Google. Pay & paytm upi… & it’s working… Don’t know about Amazon pay @sonumohammad333

3 Likes

Please mentions UPI apps working for you
So we can make a list of working and non working apps

2 Likes

Done… Created a note at last for working apps…

1 Like

Working UPI Apps

Google Pay
Phonepe
Paytm
Airtel UPI

Non-Working UPI Apps

Amazon Pay

Others can check and reply
Will be added to this list

3 Likes