Offer validation happens after payment
This solution has been introduced to further ease the integration of bank offers on custom checkout flow. We intend to make this integration with minimal changes with quick turnaround time. With this integration, a merchant will no longer have to integrate multiple promo APIs as mentioned in Bank offer custom checkout integration type 1, rather will have to just pass an object in initiate transaction API. In this integration of bank offers, merchants won't be able to show discount/cashback details to its end users before the transaction is processed. For instance, in discount led offer transaction on credit card, user will be able to see reduced transaction amount(post discount) once he/she lands on bank page. Here, merchant and Paytm both will modify the order once offer is successfully applied to any transaction for reconciliation purpose.
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: Initiate transaction with Bank Offer
You will pass a object “simplifiedPaymentOffers” with “promocode”,”applyavailablepromo” and ”validatepromo” in the Initiate transaction API parameter. Paytm will provide a transaction token in the response to this request.
Step 3: Process transaction
Call the Process Transaction API to process the transaction.
Step 4: Validating Checksum
Checksumhash received in response to the process transaction needs to be verified on the merchant server using Paytm library with all the parameters in the key-value pairs.
Step 5: Validate Transaction (Implementation: Mandatory)
You must validate the transaction response via server-side request using the Transaction Status API or Payment Status Webhook.
Webhook - Paytm sends a server to server (S2S) response in a key-value pair on the configured URL. Payment Status Webhook is sent only when the transaction has reached a terminal state (success/fail). To configure the URL, please connect with Paytm.
Transaction Status API: You should always validate transaction response via server-side request using the Transaction Status API. This API requires checksumhash in request and response.
The merchant receives “PAYABLE_AMOUNT” parameter and “PAYMENT_PROMO_CHECKOUT_DATA” object via Transaction Status API and Payment Status Webhook response which the merchant must mandatorily implement in their system to record the final payment details whenever a promocode or any bank offer is successfully applied.
- PAYABLE_AMOUNT: Original amount of the transaction which is sent in the Initiate transaction API
- PAYMENT_PROMO_CHECKOUT_DATA: This object contains the following parameters:
PARAMETER |
DESCRIPTION |
DATA TYPE |
SAMPLE VALUE |
promocode |
Actual promocode which got applied |
String |
HDFC10 |
promotext |
Promo message |
String |
Payment OK |
savings |
Benefit amount |
Numeric string |
100 |
redemptionType |
discount/ cashback |
string |
Cashback |