Overview of Pre-auth processing steps
Step 1 : Link a user’s Paytm account with your application
- User visits merchant's website or mobile application.
- Merchant's ask the user to link their Paytm account with their website or mobile application for seamless payments.
- Merchant initiates the account linking process using Send OTP API and Validate OTP API.
- Once the user account is successfully linked, Paytm shares the user SSO_TOKEN with the merchant.
Demo of Paytm Account Linking
Paytm account linking flow
Please find below the list of APIs and their use cases with respect to the Paytm account linking on merchant App/website.
Send OTP to entered mobile number
|Send OTP API||This API is used to send an OTP to a user's mobile number so as to start linking of Paytm user’s account on merchant web/app|
Linking of Paytm account
|Validate OTP API||
This API is used to verify the OTP entered by a user and provide the required tokens in response.
Refresh Paytm user’s SSO token
|Refresh Token API||This API is used to retrieve the new SSO token of Paytm user account upon its expiry|
Validate Paytm user’s SSO token
|Validate Token API||This API is used to validate the Paytm user’s SSO token|
De-link Paytm user’s account
|Revoke Access API||This API is used to expire the Paytm user’s SSO token. This is done in case a user deletes or de-links the account on your application.|
Step 2 : Check Balance and Add Money
- User adds the goods and services into the shopping/order cart.
- Merchant calculates the total amount and calls the Paytm Check Balance API.
- Paytm validates if the given amount exists in any Paytm proprietary payment instrument (Paytm Balance and Paytm Postpaid).
- If any of the proprietary payment instruments don’t have sufficient balance then API returns the differential Amount.
- For example A user has Rs.100 in their Paytm Wallet and Rs.150 in Paytm Postpaid. The transaction amount for the order is Rs. 220. In this case, no payment method has sufficient funds so the API returns the differential amount (transaction amount - wallet amount) i.e Rs.120. You have to prompt the user to add money in their Wallet.
- In case a user needs to add money to pay for an order, you initiate the Add Money process.
Step 3 : Blocking of amount in user's Paytm wallet/postpaid account
- Merchant calls the Paytm Pre-auth API to block amount from the user's Paytm account (wallet/postpaid).
- Paytm blocks the amount in user's Paytm account and shares the unique Pre-auth ID in response to the merchant.
Pre-auth flow for Paytm Wallet/Postpaid