- You can integrate the UPI Intent solution in your business app or mobile website (m-web). Here, a user will build their cart/shopping bag by adding products and will proceed for payment.
- Your backend server calls Initiate Transaction API to get the Transaction Token.
- You show different payment modes available to the user e.g. Debit Card, Credit Card, EMI, net banking, UPI, etc.
- User selects the payment mode as UPI. You will call the Process Transaction API with transaction token as received in response to Initiate Transaction API and paymentMode sent as UPI_INTENT. You will receive the deep link provided by the Paytm in response.
- You will call the deep link provided which will invoke all the UPI PSP Apps on the device and shown to the user.
- User selects the PSP App using which they want to pay with and is redirected to it with details like amount, Payee VPA already filled.
- User enters the UPI PIN to complete the transaction.
- Post the debit and credit at payer and payee bank A/Cs, Paytm system will send an S2S notification to the merchant on the specified URL.
- You can also call the Transaction Status API to confirm the payment status.
- User is shown the order confirmation screen after you receive the final payment status.
UPI Intent Integration
Overview of the Paytm UPI Intent flow
Demo of the UPI Intent
Flow diagram for UPI Intent Integration:
Steps in processing payments through Paytm UPI Intent
STEP 1: Following are the pre-requisites for integrating the UPI Intent solution:
- MID: A unique merchant identifier issued by Paytm for your account.
- Merchant Key: This is a unique secret key used to secure encryption of every request. This needs to be kept on server-side and should not be shared with anyone.
- Merchant website’s S2S notification URL: Paytm will send the transaction details/status on the callback URL provided by you.
STEP 2: Customize your payment page and Initiate the transaction
The user adds the product into the cart and goes to the payment page. You can show different payment options to the user like Credit/Debit card, Netbanking, UPI etc. on this page. Your backend server creates the order and calls Paytm's Initiate Transaction API. Paytm will provide a transaction token in the response to this request.
STEP 3: Call the Process Transaction API
The user selects the payment mode as UPI. You call the Process Transaction API with the transaction token received earlier. Paytm server on receiving Process transaction request, calls UPI Switch’s UPI Intent API. Once UPI Switch acknowledges the request, Paytm server sends the deep link in response to Process Transaction API request.
STEP 4: Open the available PSP Apps on the user's phone
Your App receives a deep link from your server which gives control to the android in order to open the available PSP Apps on the user’s device. The user can then select the PSP App of his choice from the different PSP Apps opened in order to proceed for the payment.
STEP 5: User selects the PSP App and proceeds for the payment
The user selects one of PSP App e.g. google pay to proceed for the payment for the order. User enters the UPI PIN on the NPCI main page opened by the PSP App with the order details like order amount and Payee VPA address are already filled.
STEP 6: Processing of payment transaction at PSP App and NPCI
After the user enters the UPI PIN and presses the submit button, PSP App sends the money request to NPCI which in turn will request UPI switch to resolve the merchant VPA (with the user account number and ESN). UPI switch will validate the same and send the account details to NPCI. NPCI confirms the payment to both PSP App and the UPI Switch.
STEP 7: PSP App gives the control back to Merchant App
After receiving the payment confirmation status, PSP App gives the control back to the merchant App. UPI Switch also forwards the payment status to the Paytm server.
STEP 8: Paytm server sends the payment status on merchant’s S2S URL
Paytm server sends the payment status on the S2S URL configured by the merchant. You should also validate the response via server-side request using Transaction Status API. This API requires checksumhash in request and response. You must verify the Order Id and Amount with your DB entries. The status should be treated as the final status of the transaction in all cases.