Skip to content

Offers API

| View as Markdown

This Api will be called from offers system to verify the unique id provided in offers URL for accessing coupons. On load of this URL we will initiate a api call to affiliate call back URL to verify the unique id. In response “data” parameter will return details about the transaction. Returned customer name will be visible in offers page. The amount returned in data parameter in response will decide the number of coupons to be displayed. Default count of token to display else we will show the token amount as per transaction amount. Amount > 2000 --- 8 coupons to display 2000 > Amount > 1000 --- 4 coupons to display 1000 > Amount > 500 --- 2 coupons to display If the value of “expiryday” is available, we have to consider that as expiry time period else we will consider it from standard expiry day from affiliate data. Expiry day will be considered from the day of transaction datetime. The URL will be having a specific time period of its accessibility which we will be taking at the time of affiliate onboarding.

https://offers.airpay.co.in/app/<affiliatecode>/<uniqueid>
FieldTypeDescription
Content-TypeStringapplication/json
checksumTextChecksum value(length 64) (required) hash(‘sha256’,<affiliateid+airpaykey+allvalues>);
FieldTypeDescription
affiliateidStringaffilate identification code(max length 10) (required)
uniqueidStringunique id entered in url in base64 format(max length 10) (required)
curl --location --request POST '{{Affiliate Verification Url}}' \
--header 'Content-Type: application/json' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--data-raw '{
"affiliateid":"91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps","uniqueid":"91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
}'
FieldTypeDescription
statusNumberSattus Code(400- fail,200-success)(required)(length 3)
messageStringStatus Message(success,fail)(required)
datajsonResponse data(required) Example: { “transactiontime”:“Y:m:d H:i:s”,“customer”:“ravi dubey”,“amount”:“1000.00”,“expiryday”:“4”, }
checksumStringChecksum value(required)(length 64) hash(‘sha256’,<affiliateid+airpaykey+allvalues>);
{
"status": 200,
"message": "success",
"data": {
"transactiontime": "2021-04-18 00:00:00",
"customer": "ravi dubey",
"amount": "1000.00",
"expiry": "72"
},
"checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
}