Fetch offers for a merchant, or validate one offer against the payment and the customer.
These two pages talk to the PayU Offers service. Fetch Offers returns the offers for a merchant. Validate Offer checks one offer against the payment category and the customer.
Authentication
Both pages use a Bearer token.
| Environment | Base URL |
|---|---|
| Test | https://test-partnerapilayer.payu.in/apilayer |
| Production | https://api.payu.in |
Send Authorization: Bearer {access_token} on both calls. Both require merchant_id, reseller_id, and hash. The hash input is merchant_id followed by the client secret.
| Page | Route | Required besides the token |
|---|---|---|
| Fetch Offers | POST /partner/fetchOffer | merchant_id, reseller_id, hash |
| Validate Offer | POST /partner/validateOffer | merchant_id, reseller_id, hash, paymentDetail.category, userDetail.userToken |
Endpoints
These are the Offers pages.
POST /partner/fetchOffer. Returns offers for a merchant. amount, offerKeys, paymentId, userToken, and skusDetail are optional. The response is the Offers service JSON.
POST /partner/validateOffer. Checks an offer against paymentDetail and userDetail. category and userToken are required inside those objects. The response is the Offers validate JSON.
How It Works
Fetch the offers
Call Fetch Offers with merchant_id, reseller_id, and hash. Add amount, offer keys, payment id, user token, or SKU details when you have them.
Validate one offer
Call Validate Offer with the same merchant, reseller, and hash, plus paymentDetail.category and userDetail.userToken.
