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
Head
Attribute | Description |
---|---|
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
Attribute | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 +
| |||||||||||||||
totalTransactionAmount string mandatory | Sum of all the transaction amount in paymentOptions, in rupees. |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | EPOCH timestamp of the time at which response is being sent. Eg. 1588402269 |
Body
Attribute | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultinfo Object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||
resultInfo +
| |||||||||||||||||||||||||||
paymentOffers Object | Payment offers contains promo details like promocode, offer, termsUrl, etc. | ||||||||||||||||||||||||||
paymentOffers +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0000 | S | Success. |
1001 | F | Request parameters are not valid. |
9999 | F | Something went wrong |
2005 | F | Checksum provided is invalid |
1006 | F | Session expired |
1007 | F | Missing mandatory element |
501 | F | System Error |
2013 | F | Mid in the query param doesn't match with the Mid send in the request |
6000 | F | No promo code currently active on the merchant. |
6050 | F | requestId in the query param doesn't match with the requestId send in the request |
2222 | F | Invalid request body |
1011 | F | Parameter 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 |
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}"}}'