1. Home
  2. Docs
  3. Developers Guide
  4. Integration APIs
  5. Offers
  6. check_offer_status (1st Usage)

check_offer_status (1st Usage)

This API is used to check the status of an offer for a particular merchant when all the details are passed. The return parameters are status, msg, discount/error_code, category, offer_key, offer_type(instant/ cashback) , offer_availed_count, offer_remaining_count.

Request Parameters

ParameterDescriptionSample Value
var1
Offer Key(mandatory)
offer@123
var2Payment amount of the particular transaction10000
var3It defines the payment category that the merchant wants the user to see by default on the PayU’s payment page.CC
var4Bank Code CC
var5Card Number (mandatory) 5432112345678901
var6Name on the cardNitesh
var7Phone Number9988776655
var 8Email Id
abc@xyz.com

Error Codes

1. ‘INV ALID_OFFER’=>’E001′
2. ‘INVALID_PAYMENT_METHOD’=>’E002’

In the Output:

Parameter ‘status’ = 1, means offer is valid
Parameter ‘status’ = 0, means offer is invalid

Web Service Responses

Note: In the response, category will be the passed Category

a. If the offer is a valid offer:

Array 
(
[status] => 1
[msg] => Valid offer
[discount] => 15
[category] => creditcard [offer_key] => testoffer12312@5788
[offer_type] => instant [offer_availed_count] => 5 [offer_remaining_count] => 3
)

b. If the offer is expired:

Array 
(
[status] => 0
[msg] => Offer expired. 
[error_code] => E001
[category] => creditcard 
[offer_key] => newoffer1@5686 
[offer_type] => instant 
[offer_availed_count] => Unknown 
[offer_remaining_count] => Unknown
)

c. If the card limit is exhausted:

Array 
(
[status] => 0
[msg] => Offer Exhausted 
[error_code] => E001
[category] => creditcard 
[offer_key] => newoffer1@568 
[offer_type] => Unknown 
[offer_availed_count] => Unknown 
[offer_remaining_count => Unknown
)

d. If offerKey is invalid:

Array 
(
[status] => 0
[msg] => Invalid offer Key 
[error_code] => E001
[offer_key] => newoffer1@568 
[offer_type] => Unknown 
[offer_availed_count] => Unknown 
[offer_remaining_count] => Unknown
)