POSTOffer Discovery API
Use Case
Offer Discovery API can help the merchant discover Bank offers and Subvention campaigns configured with Paytm. With the help of this API:-
- Both Amount and Item-based bank offers and subvention campaigns can be retrieved
- The offers can be retrieved on all the desired payment instruments by passing them in the payMethods
Request Attributes
Head
Attribute | Description |
---|---|
token string mandatory | Authorization string corresponding to the tokenType used. Example: 739816707d7444XXXXXXXX6cb4264d0a1590145379323 |
tokenType string mandatory | Authorization method for this request. Possible values:
ACCESS
,
To be used in case authentication is done using accessToken and this is received in the response of Access Token API
CHECKSUM
,
To be used in case authentication is done using CHECKSUM,
TXN_TOKEN
To be used incase authentication is done using TXN_TOKEN i.e, the unique transaction token received in the response of Initiate Transaction API or Initiate Subscription API. It is valid for 15 minutes.
|
channelId string mandatory | The parameter value identifies the Channel for which API call is initiated. Possible values:
WEB
,
For websites, the value to be passed should be "WEB"
WAP
For Mobile websites/App, the value to be passed should be "WAP"
|
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
items List<Object> conditional | List of items on which offers have to be retrieved Note: Required for items based offers not required for amount based offers | ||||||||||||||||||||||||||||||||||||
Items +
| |||||||||||||||||||||||||||||||||||||
mid string(20) mandatory | Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation. Example: INTEGR7769XXXXXX9383 | ||||||||||||||||||||||||||||||||||||
paymentDetails object mandatory | List of payment methods for which offers have to be retrieved | ||||||||||||||||||||||||||||||||||||
paymentDetails +
| |||||||||||||||||||||||||||||||||||||
amountBasedBankOffer boolean conditional | Flag to identify the type of offer to applied i.e, Amount based or SKU based offer. Mandatory to be sent as false for item based offer | ||||||||||||||||||||||||||||||||||||
amountBasedSubvention boolean conditional | Flag to identify the type of subvention to applied i.e, Amount based or SKU based subvention. Mandatory to be sent as false for item based subvention | ||||||||||||||||||||||||||||||||||||
discoveryLiteResponse boolean optional | For a lighter version of offer details without calculation, this flag can be set to true. |
Response Attributes
Head
Attribute | Description |
---|---|
requestId string | Unique reference ID which is given in request payload |
responseTimeStamp string(15) | EPOCH timestamp of the time at which request is being sent. |
version string(4) | Version of the API Example: v2 |
mid string(20) | Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation. Example: INTEGR7769XXXXXX9383 |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resultInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentDetails List<Object> | List of payment methods having offer details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paymentDetails +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
1001 | F | Request parameters are not valid |
0001 | F | Failed |
1006 | F | Your session has expired |
2005 | F | Checksum provided is invalid |
1002 | F | Token validation failed |
0002 | F | No Offers Available |
curl --location 'https://securegw-stage.paytm.in/theia/api/v1/offerDiscovery?referenceId=jsRef_20230613134141' \
--header 'Content-Type: application/json' \
--data '{"body":{"items":[{"id":"1234586674","productId":"1","brandId":"10002","categoryId":"10001","price":10000}],"mid":"YOUR_MID_HERE","paymentDetails":{"orderAmount":10000,"paymentOptions":[{"payMethod":"EMI"}]}},"head":{"channelId":"WEB","token":"{CHECKSUM}","tokenType":"CHECKSUM"}}'