search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

Standard Integration

Overview

 

Custom checkout flow allows the merchants to design the payment page as per their requirements and integrate the Paytm payment gateway through applicable APIs. Hereby, Bank offer / EMI Subvention integration on Custom Checkout uses offer APIs namely Offer Discovery API, Fetch BIN API, and Apply Offers API to apply offers on any transaction. 

 

With Standard Integration, the merchant

  • Can determine offer eligibility for a cart item from Paytm via APIs and accordingly show the eligibility to the user
  • Can determine eligibility on different tenures for Subvention via Paytm APIs, which can be displayed to the user
  • Does not need to modify the order as offer details are passed on to the merchant before the transaction is processed
  • Can show the offer details (discount / cashback) against a payment instrument to its users (as shown in the demo below) before the users click the Pay button and the transaction gets processed at Paytm's end

 

To learn about prerequisites for integration, please refer to Prerequisite section.

Demo

Transaction Flow

  1. User adds products to the cart and proceeds to checkout.
  2. Merchant calls Offer Discovery API to display the relevant offers on the cart and payment page to the customers. This is required to show promo codes/offers to the users otherwise this is a non-mandatory step. 
  3. Paytm returns all applicable offers configured for the merchant.
  4. User selects a payment instrument.

     Note: In the case of EMI, the user has to be shown banks and tenures. Merchants store the information at their end or call the Offer Discovery API for the banks, tenures, and offers applicable on these tenures.

  5. User selects a tenure and enters the card details

     Note: If a user selects any card-based payment instruments, the merchant calls Fetch Bin Details API which returns issuingBankCode, paymentMode, etc in response to be used in the next step.

  6. Merchant calls Apply Offers API, this API helps in validating a bank offer and / or subvention campaign against the chosen instrument. If both bank offer and subvention are applicable on a transaction, pass both emiOfferDetails and bankOfferDetails in the request
  7. On sending the offerId, the API would return the applicability of that particular offer only against that selected instrument. Since it is mandatory to provide an offer construct in Initiate transaction API, it is mandatory to call Apply Offers API, using which the merchant gets the unifiedOffersToken that has to be passed in Initiate transaction API.
  8. Once the validation is done, the merchant calls Initiate transaction API. Here both payment and offer intent will be passed to Paytm. Offer intent as a token will be as per the response of Apply Offers API, and payment intent would be payment-related information of the transaction as entered by the user.
  9. Paytm shares a transaction token in response to this API post-validation.
  10. Once the user clicks on the Pay button, the merchant calls Process Transaction API using the transaction token. 
  11. Paytm validates the transaction token against the one shared in the response of the Initiate transaction API.
  12. Paytm processes the transaction post validating the request and shares the status of the transaction with the merchant. Then, the merchant shows the transaction status as received through Paytm.

 Note: In case of a discount, Paytm will only settle the discounted transaction amount.

 

For example: If the cart value of a customer is Rs 1000, and there is a Bank offer that entitles a user to a discount of Rs 100 on a min cart value / order value of Rs 1000, then the effective order value would be Rs 900 only. Paytm would process transactions that would be valued at Rs 900. In the case of cashback, the transaction value would be Rs 1000 only, as cashbacks have to be honoured by banks.

 

Steps to Process an Offer

 

1. Configure an offer

Merchant can configure a bank offer / EMI Subvention by providing the offer construct in an email to Paytm’s account manager, client management team, or contact us

 

2. Display Offers and Payment Options

a) Display offers on cart or PDP page

Show the available offers that merchant will get in response to Offer Discovery API. The offers can be retrieved in Offer Discovery API by sending paymentDetails such as orderAmount, paymentMode, MID, and items in case of SKU-based offers. 

 

b) Display payment options

The merchant's backend server calls the Fetch Payment Options API using the Transaction token to receive the available payment options like Wallet, CC / DC, NB, UPI, EMI, etc., and the user's saved instruments. For showing tenures and bank corresponding to EMI, a merchant can hit Offer Discovery API with payMethod as EMI. This is not mandatory for merchants who store the payment options information at their end.

 

3. Apply an Offer

a) Specific Offer Validation: Merchant passes specific bank offerId and/or subvention offerId in Apply Offers API as per user selection. Paytm validates the offer and provides a response accordingly.

 

b) Automatic Selection of Offer: Paytm applies the best offer in case the merchant does not pass any offer.

 

Behaviour Payment Option BankOfferDetails EMIOfferDetails
To apply bank offer Other than EMI OfferId is sent N/A
To apply bank offer EMI OfferId is sent OfferId is not sent
To apply subvention EMI OfferId is not sent OfferId is sent
To apply both bank offer and subvention EMI OfferId is sent OfferId is sent

4. Initiate transaction with Bank Offer

Merchant passes the unifiedOffersToken and payableAmount received in the response of Apply Offers API in the Initiate Transaction API under the unifiedOffersToken parameter and payableAmount. Paytm provides a transaction token in response to this request.
 

5. Process transaction

Merchant calls the Process Transaction API to process the transaction.
 

6. Validate Checksum

Checksumhash received in response to the process transaction needs to be verified on the merchant server using the Paytm library with all the parameters in key-value pairs.
 

7. Validate Transaction

Merchants should always validate transaction responses via server-side requests using Transaction Status API. This API requires checksumhash in request and response. Merchant must verify the Order Id and Amount with your database entries. The status should be treated as the final status of the transaction in all cases.
 

Post Integration Steps

 

Post completion of integration on merchant staging environment, do a complete transaction from the order summary page on the website or mobile app.

 

  1. Attempt a test transaction using the test paymodes credentials.
  2. 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 the merchant dashboard.
  4. Once the test transaction is complete, move the code to the live environment with production account details, which are received from Paytm.

 Recommendation: It's recommended to read about Managing Refunds and Late Payment Notifications. In case of any issues with integration, please contact us.