search

EMI Subvention through Custom Checkout

Standard integration through APIs

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. Some of the key points about integrating EMI subvention on custom checkout are listed below:

  • You can provide EMI subvention as a payment option by integrating a few simple APIs
  • You can determine EMI subvention eligibility for a cart item from Paytm via APIs and accordingly show the different tenures to user
  • You can send the subvention identifiers in the API request and get the relevant bank tenures in the response

Demo

Overview of payment processing via EMI subvention payment

  1. User visits your website or mobile application and adds goods into the cart. 
  2. User is shown the different payment modes available e.g. Debit card, credit card, EMI, netbanking etc. 
  3. 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). 
  4. 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). 
  5. 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). 
  6. 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. 
  7. You will call the InitiateTransaction API and send the same emiSubventionToken received in the response of Validate API.
  8. 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.
  9. 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.

Pre-requisites

Before starting the integration make sure, you follow the following steps:

  1. Create an account on Paytm as a merchant. Click on how to create an account.
  2. Get the merchant id and merchant key for the integration environment after creating the account.
  3. Go through the checksum logic to understand how to generate and validate the checksum.
  4. 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.

Flow chart

flow chart for EMI Subvention

Integration Steps

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. You will pass the emisubventionToken in the Initiate Transaction API. Paytm will provide a transaction token in the response to this request.
  6. You call the Process transaction API to process the transaction.
  7. 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.
  8. 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.

  1. Attempt a test transaction using the test paymodes credentials.

  2. 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.

  3. 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.

 

Lastly, it's recommended that you read about Managing Refunds and late payment notifications.

 

In case of any issues with integration, please get in touch.