EMI subvention on JS checkout can be integrated with minimal effort at the merchant side. Merchant passes the relevant object in the Initiate transaction API and invokes the JS module through a transaction token. Paytm backend configures the banks and EMI plans on which merchant wants to offer EMI subvention. Once this configuration is done then Paytm would manage the eligibility during the transaction.
EMI Subvention through JS Checkout
Transaction flow
After the user adds the items in the cart, the merchant calls the Initiate transaction API with an additional simplifiedSubvention object. Please refer to the below example explaining the simplifiedSubvention object that needs to be sent as part of the initiate transaction API.
In case you want to integrate an amount based EMI subvention, you need to pass the simplifiedSubvention Object as explained in the example below. In this example, the total cart amount is of Rs. 2000 out of which you want to offer EMI subvention on Rs. 1100.
"simplifiedSubvention":{ "customerId": "1234", "selectPlanOnCashierPage": true, "subventionAmount":"1100.00" // subvention amount },
Paytm receives the request and returns the transaction token in the response to the merchant.
The merchant uses the transaction token along with other parameters to initialise the JS module. The other parameters required are mentioned below:
- transactionAmount
- tokenType
- token
Merchant invokes the JS module.
JS module renders the cashier page on the browser, preset with the configurations received.
User selects the payment instrument and fills the required payment details like card number, expiry date etc.
Paytm receives the request and internally calls the Process transaction API and returns the transaction status to the merchant UI via callback.
Note: To learn about prerequisites, please refer to the Prerequisite section
User is redirected to the bank page for authorization. Once the transaction is authorized, Paytm receives the response from the bank and returns a status to the website via your callback URL. Please refer to the sample callback response here
API Integration
Integrate following APIs to enable EMI Subvention through JS Checkout:
- Initiate Transaction API
To offer No cost EMI as a payment option to the user for the transaction, include the "simplifiedSubvention" object in the Initiate Transaction API.
- Transaction Status API
Post Integration Steps
Post completion of integration on merchant's staging environment, do a complete transaction from order summary page on the mobile app.
- Attempt a test transaction using the test paymodes credentials.
- 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 the dashboard.
Once the test transaction is complete, move the code to a live environment with production account details, which merchant would have received from Paytm.
In case of any issues with integration, please get in touch.