Step by Step Integration Guide
Step 1: Getting Ready
During onboarding receive the following details from Paytm team:
- Auth clientId and Secret
- PG MID and Key
- Paytm’s Apps (MiniProgram APK & IPA files) to test your Mini Program
Step 2: Test your Mini Program inside Paytm
Download the Paytm UAT App to build your Mini Program. Links for the same for both Android / iOS will be shared during on-boarding. Steps to perform testing through UAT build
- Append your Web URL to the following URL:paytmmp://mini-app?aId=05f4b836f67219b3b4d4f2ba9fb3631c0fd49988&url=<'Your URL'>
- Generate the QR of the URL made using the above step using any online QR generator
- Scan the QR using the Scan feature of Paytm App in UAT build shared.
- Mini Programs supports only the HTTPS URL in Android & both HTTP, HTTPS in iOS
Step 3: Essentials for Integration
To onboard as Paytm Mini Program there are only two essential integration merchants need to implement:
There are few optional integrations merchants can do to make the user experience more seamless:
Step 4: Login IntegrationPaytm Mini Programs platform requires merchant to mandatorily integrate the login flow for Mini Programs. For the same when merchant need user credentials for proceeding with the flow, merchant need to call the paytmFetchAuthCode JS API to get the required details. Paytm will show a popup where users can explicitly provide their consent to proceed with the flow. The flow for the same works like this:
User clicks on merchant's Mini Program Icon and lands into the landing page.
User browses the catalogue/ adds items to their cart.
When user details are required call paytmFetchAuthCode JS API and post user consent, login the user seamlessly.
Once the user is logged into merchant's system, they should manage their session by dropping/managing a secure HTTPS cookie so that there is no need of the authentication steps each time the user opens the Mini Program.
Please Note: The consent will only come once and for returning users, merchant can seamlessly access user details to facilitate login.
Detailed Login steps can be found here
Step 5: Payment Integration
Paytm mandates integration of Paytm PG for Mini Programs. Payment happens with Paytm app with all linked payment mode availble for users. This creates seamless payment checkout experience for the end user along with ensuring high success rates.
The Payment flow works like this:
- User adds items to merchants cart and clicks on Proceed to Pay by calling .
- User is then shown a popout of Paytm PG right within Paytm App, where all configured payment modes are visible
- User completes payment and is landed back seamlessly to merchant Mini Program.
Detailed Payment Integration steps can be found here
Step 6: Notification Integration (Optional)
Paytm also provides the functionality to send Order related notifications to MiniProgram users. For the same merchant needs to submit their requirements of Notification Templates. Once approved,notifications can be sent via a S2S hit to Paytm server.There are few conditions merchant need to ensure while sending Notifications:
Only whitelisted templates are allowed
Merchant can only send Order related Notifications to the user
There is a limit on the number of Notification allowed per order ( By default it is 3 notifications within 7 days from the date of order for each unique order placed through Mini Programs).
Please NOTE: Do not send any promotional messages as part of this functionality. Violating this might lead to blacklisting of your Mini Program.
Detailed Notification Flow can be found here
Step 7: Additional JSAPI Integrations (Optional)
Paytm also provides a rich catalogue of Additional JS APIs for you to match Native like experience for your Paytm Mini Program user. For the same the detailed list of JS APIs can be found here. Please note this is an optional step and merchant may choose to continue using the existing web methods. However we recommend using the inbuilt APIs for a seamless user experience.
Step 8: Complete Integration Checklist
Once the required integration steps have been completed, next steps is to connect with Paytm team for final integration checklist. Merchant must confirm the checklist items from their end and share it with Paytm for final approval.
Step 9: Going Live
Once the checklist is confirmed by Merchant, Paytm will have an internal sanity testing. Post sign-off Merchant's Mini Program will be made live to Paytm userbase.