-
User visits your mobile application and adds goods/services into the shopping/order cart.
-
You call the method isPaytmAppInstalled
which checks on the user’s device if the Paytm app is installed or not.
-
You show a user consent checkbox on the cart review page to fetch payment instruments as saved on Paytm.
-
Once the user gives the consent and Proceeds for the payment, you call the method fetchAuthCode
to get the auth code of the logged-in user on the Paytm app.
-
Your backend server hits the OAuth Token API using the auth code received above to get the Paytm user's SSO token.
-
Your backend server calls the Initiate Transaction API with the user token received to get the transaction token.
-
Your backend server calls the Fetch Payment Options API with the transaction token to receive the Paytm user’s saved payment instruments.
-
You initialize the Paytm Custom UI SDK using the transaction token.
-
User is presented your Payment UI listing all the available Payment Modes e.g. Paytm saved instruments, CC/DC, NB, UPI, EMI, etc.
-
The user selects one of the payment options e.g. Credit Card and enters the card details on the App.
-
Your app will create a model of PaymentRequestModel
type in Android and AINativeBaseParameterModel
type in iOS. Call paytmSDK.startTransaction
in Android and AIHandler().callProcessTransactionAPI
in iOS with appropriate parameters to process the transaction.
-
The SDK will call Paytm backend server to process the transaction.
-
You will receive a payment response in interface implementation (PaytmSDKCallbackListener
in Android) and (didFinish
method of AIDelegate in iOS).
-
The SDK calls the Transaction Status API to check the status of the transaction.
-
Paytm will send the transaction details to your backend server which will validate the amount and other parameters.
-
After the successful validation of the transaction, order status is shown to the user on the App.