Lookup API
This is used when integrating Multi-Currency Payments
Follow below steps to integrate this API
Pre-requisites
Kindly connect with your Key Account Manager at PayU to get below credentials -
Merchant Access Key
Merchant Secret Key
Create Request
Lookup Api needs a JSON request. Product Type need to be passed either as DCC or MCP. DCC means Direct Currency Conversion, i.e it returns the conversion prices for card currency only. To get all enabled currencies on Merchant Access Key along with their conversion prices, use product type as MCP. For DCC, cardBin is mandatory, while for MCP cardBin is not required
Below is example request for DCC as product type
{
"merchantAccessKey":"E5ABOXOWAAZNXB6JEF5Z",
"baseAmount":{
"value":10000.00,
"currency":"INR"
},
"cardBin":"513382",
"merchantOrderId":"OBE-JU89-13151-110",
"productType":"DCC",
"signature":"be5a56667354d9e2ea5ea1c6af78b0afc1894eb2"
}To create Lookup API request like above, use LookupApiRequestBuilder class as below
Below is example request for MCP as product type
To create Lookup API request for MCP, use LookupApiRequestBuilder class as below
PFB details for params used in Lookup API
Parameter Name
Description
Amount
Transaction Amount
Card Bin
First 6 digits of card number
Currency
Base Currency of Transaction
Merchant Access Key
Merchant Access Key provided by PayU
Merchant OrderId
A unique request id for Lookup API request
Product Type
Use MCP to get all enabled currency on Merchant Access Key or DCC to get direct currency conversion for card currency
Signature
Hmac SHA1 hash created with formula explained below
To calculate signature, Create HmacSHA1 hash of below data
Call LookupTask
Here, this is object of a class that implements LookupApiListener. Below is signature of LookupApiListener
Get Lookup Api Response
Once you call ‘execute’ on LookupTask, ‘onLookupApiResponse’ callback method is called.
Last updated
Was this helpful?