Auto-debit is a one-click payment experience for your website or mobile app enabling payments via Paytm wallet, Paytm postpaid and your gift vouchers issued by Paytm. Your customers need to authorize and link their Paytm account with your application once and enjoy superfast checkout every time after that.
Demo of Auto Debit
Overview of payment processing via Paytm Auto-Debit
- User visits your website or mobile application
- You ask the user to link his/her Paytm account for seamless payments
- You initiate the account linking process using Send OTP API and Validate OTP API
- Once user account is successfully linked, Paytm shares the user SSO_TOKEN with you
- User adds goods/services into the shopping/order cart
- You calculate the total order amount and call the Paytm Fetch Instrument API
- Paytm returns all applicable instruments having sufficient balance out of (Paytm Wallet, Paytm Postpaid and Merchant Gift Voucher) as per customer and merchant combination.
- User selects the payment instrument from the listed options and merchant calls the Auto Debit API with the selected instrument to deduct funds
- In case balance is insufficient in all the payment instruments returned in Fetch Instrument API, you can invoke Paytm App to complete payment.
- Post payment completion call the Transaction Status API to verify the transaction response
- Notify the payment status to user and proceed with the order/service fulfillment
Steps in processing payments via Paytm Auto-Debit
STEP 1: Get your authentication keys
- Client ID: a unique alphanumeric identifier issued by Paytm for your account
- Client Secret: a unique alphanumeric key issued by Paytm for your account
- 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.
STEP 2: Link a user’s Paytm account with your application
Demo of Paytm Account Linking
Find the detailed interaction of each system component for Paytm account linking in the flowchart below:
Please find below the APIs list and their use cases with respect to the paytm account linking on merchant App/website.
|Use case category||API Name||Details|
|Sending of 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 the user and provide 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 expir|
|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 for expiring the Paytm user’s SSO token. This is done in the case of user deleting or de-linking the account on your application.|
STEP 3: Fetch available Payment instruments
Demo of Paytm app invoke in case of insufficient balance
Flow diagram of Paytm app invoke in case of insufficient balance
If any of the proprietary payment instruments don’t have sufficient balance then invoke Paytm App for payment.
STEP 4: Debit amount from user's Paytm account and confirm the transaction
Now that you have ensured that your customer has enough balance to pay for the order, you can debit the amount using the Auto Debit API and confirm the transaction using Transaction Status API
STEP 5: Managing Refunds
On completion of your integration -
Post completion of integration on your staging environment, do a complete transaction from order summary page on your website or mobile app
Attempt a test transaction using test paymodes credentials
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
See the transaction details in "Test Data" mode on your dashboard
Once the test transaction is complete, move your code to live environment with production account details, which you would have received from Paytm.
In case of any issues with integration, please get in touch