search

Bank offer with Custom Checkout

Offer validation happens before payment

Bank offer integration on custom checkout flow uses promo APIs namely Fetch all Offers APIFetch BIN API and Apply promo API to apply offers on any transaction. In this flow, the merchant does not need to modify the order as offer details are passed on to the merchant before the transaction is processed. Merchant can show the offer details (discount/cashback) against a payment instrument to its end users (as shown in demo below) before the users click the Pay button and transaction gets processed at our end.

Demo

Overview

  1. User adds products into the cart and proceeds to checkout.
  2. You will call Fetch All Offer API to display the relevant offers on payment page to the customers. This is required to show promo codes/offers to your users otherwise this a non-mandatory step.
  3. Paytm will return all applicable offers configured for the merchant.
  4. User selects a payment instrument.
  5. You will call Fetch Bin Details API.
  6. This API will give you “issuingBankCode”, “payment Mode” etc in response. Bank code received here would be used in the next step.
  7. You will next call Apply Promo API, this API helps in validating an offer against the chosen instrument.
  8. This API will return the best offer available configured at Paytm end by you. Incase Promo code is already sent to Paytm in this API, this API would return applicability of that particular offer only against that selected instrument. Since it is mandatory to provide offer construct in Initiate transaction API. (next step), it is mandatory to call Apply Promo API, using which you will get offer construct which has to be passed in Initiate transaction API.
  9. Once validation part is done, you will call Initiate transaction API. Here both payment and offer intent will be passed to paytm. Offer intent will be as per the response of Apply Promo API, and payment intent would be payment related information of the transaction as entered by the user.
  10. Paytm will share a transaction token in the response of this API post validation.
  11. Using the transaction token received in the above step, merchant will validate the response and returns transaction token to merchant app/browser.
  12. You will call Process Transaction API using the token once user clicks on pay button.Since Paytm validates the transaction token as the unique parameter to honour the request to execute transaction, transaction token should be same as in the response received from Initiate transaction API.
  13. Paytm processes the transaction post validating the request and shares the status of the transaction with you. You would show the transaction status as received through Paytm.

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

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

 

Prerequisite

To apply Paytm instrument based offer you have to create your own payment experience using Paytm Custom Checkout APIs and process payment via Paytm.

Steps to process an offer

Step 1: Configure an offer

You can configure a bank offer by providing the offer construct in an email to your Paytm’s account manager, client management team, or you may contact us. Paytm has introduced a solution for select merchants to configure and customize the bank offers campaigns in a DIY mode through Paytm Dashboard. To get more information on this, refer to documentation mentioned on Offer configuration via Paytm Dashboard page.
 

Step 2: Display Offers to Customer

Show the available offers which merchant will get in the response of Fetch All Offer API.
 

Step 3: Apply an Offer

Automatic Selection of an Offer : Paytm will apply best offer in case merchant will not pass any offer.Specific offer Validation : Merchant will pass specific offer in Apply Promo API as per user selection. Paytm will validate the offer and provide the response accordingly.
 

Step 4: Initiate transaction with Bank Offer

You will pass json string paymentoffer in the Initiate Transaction API under paymentoffersApplied parameter, this should be same as what you would have received in response of Apply Promo API. Paytm will provide transaction token in the response to this request.
 

Step 5: Process transaction.

Call the Process Transaction API API to process the transaction.
 

Step 6: Validating Checksum

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.
 

Step 7: Validate the Transaction

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.