Skip to content

Offers API

| View as Markdown

This API is triggered by the offers system to verify the unique ID in the offers URL for coupon access. When the URL loads, an API call is made to the affiliate callback URL to validate the ID. The response’s “data” parameter provides transaction details, including the customer’s name (displayed on the offers page) and the amount, which determines the number of coupons shown:

  • Amount > 2000: 8 coupons.

  • 2000 > Amount > 1000: 4 coupons.

  • 1000 > Amount > 500: 2 coupons.

Otherwise, show the default token count.

If “expiryday” is present, use it as the expiry period; otherwise, use the standard expiry from affiliate data. Expiry day will be considered from the day of transaction datetime. The URL’s accessibility period is set during affiliate onboarding.

https://offers.airpay.co.in/app/<affiliatecode>/<uniqueid>
ParameterType ValueDescriptionValue Like
Content-Type requiredStringapplication/json
checksum requiredText
(64)
Checksum value(length 64) hash(‘sha256’,<affiliateid+airpaykey+allvalues>);91f5evhk72f5
ParameterType ValueDescriptionValue Like
affiliateid requiredString
(10)
affilate identification code91fc5evhk7
uniqueid requiredStringunique id entered in url in base64 format(max length 10) (required)
ParameterType ValueDescriptionValue Like
status requiredNumberSattus Code(400- fail,200-success)(required)(length 3)
message requiredStringStatus Message(success,fail)(required)
data requiredjsonResponse data(required) Example: { “transactiontime”:“Y:m:d H:i:s”,“customer”:“ravi dubey”,“amount”:“1000.00”,“expiryday”:“4”, }
checksum requiredStringChecksum value(required)(length 64) hash(‘sha256’,<affiliateid+airpaykey+allvalues>);
curl --location --request POST '{{Affiliate Verification Url}}' \
--header 'Content-Type: application/json' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--data-raw '{
"affiliateid":"91fc5evhk7","uniqueid":"30912508233b7r37562g2hps"
}'
{
"status": 200,
"message": "success",
"data": {
"transactiontime": "2021-04-18 00:00:00",
"customer": "ravi dubey",
"amount": "1000.00",
"expiry": "72"
},
"checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
}