Custom checkout flow allows the merchants to design the payment page as per their requirements and integrate the Paytm payment gateway through the different APIs. EMI subvention can be provided in the Custom checkout solution by integrating few additional APIs as explained in this page.
EMI Subvention through Custom Checkout
Overview of payment processing via EMI subvention payment
- User visits your website or mobile application and adds goods into the cart.
- User is shown the different payment modes available e.g. Debit card, credit card, EMI, netbanking etc.
- User selects the option of EMI. You will call the Banks API. This API will return you the list of banks providing the EMI payment options grouped by EMI type (standard or subvention).
- Based on the response of the above API, the user is shown the list of banks with type of cards (credit or debit) providing the EMI payment option (subvention and standard).
- User selects a bank from the subvention list in step 4 and enters the card number. You will call the Tenures API. This API will return the different EMI options available on the product being purchased along with the gratification type (cashback or discount).
- After the user proceeds to make the payment, you will call Validate API. This API will validate the EMI offer against the product attributes, entered card and the tenure chosen. In the response you will receive emiSubventionToken.
- You will call the InitiateTransaction API and send the same emiSubventionToken received in the response of Validate API.
- Paytm will share a transaction token in the response of InitiateTransaction API post validation and you will pass the transaction token to your app/browser.
- You will call Process Transaction API using the same token. Paytm processes the transaction post validating the request and shares the status of the transaction with you. You show the transaction status as received through Paytm.
Before starting the integration make sure, you follow the following steps:
- Create an account on Paytm as a merchant. Click on how to create an account.
- Get the merchant id and merchant key for the integration environment after creating the account.
- Go through the checksum logic to understand how to generate and validate the checksum.
- Get the EMI subvention plans configured for your products. You can collect the data as explained in the section Configuration of EMI subvention plans and send the email with details to your account manager or contact us.
- User adds the product in the cart and proceeds to checkout on your website/app. You call the Fetch Payment Options API to get the list of payment modes and show different payment options including EMI to the user.
- Once the user selects the EMI payment option, you call the Banks API to get the list of banks providing the EMI options for the payment. Based on the item or amount based EMI subvention configuration type, you pass the relevant parameters in the API. In the response, you receive the list of banks grouped by emi type (standard or subvention) available for EMI payment.
- User selects one of the bank options and you call Tenures API to get the list of different emi plans available against the selected bank. In the response, you receive different EMI plans with the details including EMI type, interest and gratification type (cashback or discount type). The EMI plans and their gratification type will be as per the plans which you would have got configured as mentioned in Step 2.
- Once the user selects on a tenure and clicks on the “Pay now” button to proceed for making payment, you call Validate API. In the request you will send the product and plan information along with card number details. In the response, you will receive the emiSubventionToken which you would need to send in the initiate Transaction API.
- You will pass the emisubventionToken in the Initiate Transaction API. Paytm will provide a transaction token in the response to this request.
- You call the Process transaction API to process the transaction.
- Checksumhash received in response to process transaction needs to be verified on merchant server using Paytm library with all the parameters in key-value pairs.
- You should always validate transaction response via server-side request using Transaction Status API. This API requires checksumhash in request and response. You must verify the Order Id and Amount with your DB entries. The status should be treated as the final status of the transaction in all cases.
Post Integration Steps
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 the 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 the "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.