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

POSTApply Promo API

Use Case

This API is used to apply the promotion/offer. Here the offers will be available on card transactions. 
 

Request Attributes

Content Type : JSON

Head

AttributeDescription
requestTimeStamp
string
optional

EPOCH timestamp of the time at which request is being sent.

channelId
string
mandatory

The parameter value identifies the Channel for which the API call is initiated.
 

Possible values: WEB , WAP

tokenType
string
mandatory

Authorization mechanism for this request.
 

Possible values: CHECKSUM

token
string
mandatory

Authorization string corresponding to the tokenType used.
 

Example: 739816707d7444XXXXXXXX6cb4264d0a1590145379323

Body

AttributeDescription
mid
string
mandatory

Unique identifier for each merchant. 
 

Example: 216820000002516036253

requestId
string
mandatory

Unique reference ID which is given in request payload

custId
string
optional

Unique reference ID for every customer which is generated by merchant. Special characters allowed in CustId are @, ! ,_ ,$, .

promocode
string
optional

Title of promocode,if blank Paytm will apply best offer on that merchant.

paymentOptions
string
mandatory

Payment options where promo needs to be applied

paymentOptions
+
AttributeDescription
transactionAmount
string
mandatory

Total transaction amount in rupees

payMethod
string
mandatory

Name of Payment Method.
Possible Values: CREDIT_CARD, DEBIT_CARD

bankCode
string
conditional

Code of the bank.
Note: Becomes mandatory in case of PayMethod as NET_BANKING

cardNo
string
conditional

Card number present on your Debit/Credit Card.
Note: Becomes mandatory in case of PayMethod as CREDIT_CARD, DEBIT_CARD

savedCardId
string
conditional

Paytm saved card Id unique for each card.
Note: Becomes mandatory in case of Saved Credit or Debit Card

vpa
string
conditional

This is needed for UPI transaction.
Note: Becomes mandatory in case of PayMethod as UPI

totalTransactionAmount
string
mandatory

Sum of all the transaction amount in paymentOptions, in rupees.

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.

 

Eg. 1588402269

Body

AttributeDescription
resultinfo
Object

This parameter gives the information about the result of the API response

resultInfo
+
AttributeDescription
resultStatus
string

This parameter is the result specific to the phase of the transaction mentioned in the txnType field

resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64.

resultMsg
string

This parameter is the result message which contains information about the result.

paymentOffers
Object

Payment offers contains promo details like promocode, offer, termsUrl, etc.

paymentOffers
+
AttributeDescription
promocode
string

This is unique code for discount.

offer
object

Offers available.

Offer
+
AttributeDescription
title
string

Name of the promode for display.

text
string

Description of the promocode.

icon
string

Image of the icon.

termsUrl
string

URL to fetch details terms and condition.

termsTitle
string

Terms & condition for applying promo.

validFrom
string

Request timestamp in milliseconds.

validUpto
string

Request timestamp in milliseconds.

isPromoVisible
enum string

To handle flash sale.

Response Codes & Messages

resultCoderesultStatusresultMsg
0000SSuccess.
1001FRequest parameters are not valid.
9999FSomething went wrong
2005FChecksum provided is invalid
1006FSession expired
1007FMissing mandatory element
501FSystem Error
2013FMid in the query param doesn't match with the Mid send in the request
6000FNo promo code currently active on the merchant.
6050FrequestId in the query param doesn't match with the requestId send in the request
2222FInvalid request body
1011FParameter illegal Note: If the value is not allowed in request parameters then the result message should be in the format of "Invalid {field name}" For example:Invalid tokenType, etc
Staging
Production
https://stage-router.paytm.in/aoa-pay-option-service/v2/applyPromo?mid={mid}&requestId={requestId}copy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl --location 'https://stage-router.paytm.in/aoa-pay-option-service/v2/applyPromo?mid=YOUR_MID_HERE&requestId=purnima01' \
--header 'Content-Type: application/json' \
--data '{"body": {"mid": "YOUR_MID_HERE","requestId": "purnima01","custId": "100249293","promocode": "DISCOUNTTEST","paymentOptions": [{"transactionAmount": "10","payMethod": "CREDIT_CARD","bankCode": "HDFC","cardNo": "4111111111111111"}],"totalTransactionAmount": "10"},"head": {"requestTimeStamp": "{requestTimeStamp}","channelId": "WEB","tokenType": "CHECKSUM","token": "{CHECKSUM}"}}'

 

copy icon