Offers and Subvention on All-in-One SDK flow can be integrated with minimal effort at merchant side. Merchant will have to just pass an object in initiate transaction API. Majority of the experience w.r.t payment page and offer validation would be managed at Paytm end. Merchant can show the offer details (discount/cashback) against a payment instrument to its end users (as shown in demo below) before the users clicks on the pay button and the transaction gets processed at our end. Here, merchant and Paytm both will modify the order once offer is successfully applied to any transaction for reconciliation purpose.
Offer and Subvention integration in All-in-One SDK flow
Demo
Overview
- User adds a product / service to the cart and proceeds to checkout.
- Merchant calls the Initiate transaction API with simplifiedUnifiedOffers as an object.
- For Bank Offers
a. Merchant calls the Initiate transaction API with simplifiedUnifiedOffers as an object with promoDetails object populated in it. To apply a specific offer, the merchant uses the offerId parameter in the above object but to apply the best available offer as per the eligibility on a transaction, send the applyAvailablePromo parameter as True to get verified by Paytm.
b. If merchant wants to execute a transaction only with the promo code successfully applied, then they need to send the validatePromo parameter as True as the default value is False.
Note: For running item-based offers, items in the cart must be sent in the items object in the simplifiedUnifiedOffers and isAmountBasedBankOffer must be set to false in the promoDetails object.
App is invoked and the corresponding offers are shown in the offer strip. On selecting a payment option and entering the details, the offer gets applied and the final payable amount is shown on the app which the user can pay by clicking on "Proceed to Pay"
For EMI Subvention
Merchant calls the Initiate transaction API with the simplifiedUnifiedOffers object with subvention details in the subventionDetails object. This object shall have the parameters of plan information and subvention identifiers.
-
App is invoked
-
User selects EMI and App shows different plans available to the user by fetching from the database
-
User selects one of the zero-cost EMI tenures and proceeds with the payment.
Note: For running item-based subvention, items in the cart must be sent in the items object in the simplifiedUnifiedOffers, and isAmountBasedBankOffer must be set to false in the subventionDetails object.
In Transaction status API and Payment status Webhook, merchants will get the final order and offer construct details which got processed ultimately. This is a mandatory step. For more details refer here.
Note: In case of 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 which entitles a user a discount of Rs 100 on min cart value/order value of Rs 1000, then the effective order value would be Rs 900 only. Paytm will process the transaction which would be worth Rs 900. In case of cashbacks, the transaction value would be Rs 1000 only, as cashbacks have to be honoured by banks.
Key scenarios of “simplifiedUnifiedOffers” object
Merchant can see below a few key scenarios to understand the simplifiedUnifiedOffers object:
S.No | Promo Code | Apply Available Promo | Validate Promo | Subvention Details | Description |
---|---|---|---|---|---|
1 | Not Null | True | True | Both promo code and applyAvailablePromo can't be true for the same order. In this scenario, the Promocode param value would be given preference at the Paytm end. | |
2 | Not Null | Null | True | Txn will only execute, if a given promocode is applicable, else the txn will fail. | |
3 | Null | Null | False | False | This is invalid if both the 1st and 2nd params are null. There is no point in having this object at all let alone validatePromo |
4 | Null | True | False | Txn will be executed even if there is no valid promo applicable | |
5 | Null | True | True | No txn will be executed if no valid promo is available |
Note: To learn about prerequisites, please refer to Prerequisite section.
Steps to process an offer
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.
2. Initiate transaction with Bank Offer/Subvention
You will pass a object “simplifiedUnifiedOffers” with “promoDetails”, "subventionDetails" in the Initiate transaction API parameter. Paytm will provide a transaction token in the response to this request.
3. Invoke All-in-one-SDK
App gets invoked on the integration.
4. 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