Integration Steps: iOS

Integration steps for UPI Intent in iOS platform

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.

  1. Current set of supported apps are Paytm, PhonePe, and GooglePay
  2. 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.

On completion of your integration

Post completion of integration on your staging environment, do a complete transaction from the order summary page on a mobile app.

  1. Attempt a test transaction using the Test Paymodes Credentials.
  2. Ensure you re-verify transaction response with Transaction Status API via server to server call in payment flow and not separately as a one-time activity.
  3. See the transaction details in the "Test Data" mode on your dashboard.

Once the test transaction is complete, move your code to a live environment with production account details, which you would have received from Paytm.


Lastly, it's recommended that you read about Managing Refunds and late payment notifications.


In case of any issues with integration, please Get in touch.