Step 1: Customize your payment page
The user adds the product into the cart and goes to the payment page. You show different payment options to the user like Credit/Debit card, Netbanking, UPI etc. on this page. You call the Fetch UPI Apps API from your backend server to fetch the list of PSP apps with their icons which can be displayed on your checkout page.
Note:
- Current set of supported apps are Paytm, PhonePe, and GooglePay
- It is suggested to cache the response of this API so that it is not called for every transaction
Step 2: Check UPI account status of Paytm user
You can use the Check UPI Account Exist API for checking whether the UPI account exists for a particular user mobile or not. This can be used to display Paytm as a payment option only to the users who have their UPI profile enabled on the Paytm app.
Step 3: Hit Initiate Transaction API and get a transaction token
After the user selects the UPI app and proceeds for the payment, you hit Initiate Transaction API from your backend server. Paytm PG provides the transaction token in the response to this API.
Step 4: Call the Process Transaction API
You call this API to create a deep link specific to the PSP app that the user has selected for making the UPI Intent payment. Please refer to the sample request/response of this API here.
Step 5: Invoke the PSP App and payment completion by the user
You append the callback URL in the intent URL and invoke the UPI app selected by the user. The user completes the payment by entering the MPIN.
Step 6: Payment processing by NPCI and user comes back on Merchant app
NPCI processes the payment and notifies the result to both the UPI app and Paytm PG. UPI PSP app invokes the merchant app via merchant app callback. The user comes back on the merchant app.
Step 7: Merchant calls transaction status API
Merchant calls the Transaction Status API from the backend and confirms the order status. The order status is returned back to the app which displays the same to the user.