The lookup transaction method is used to lookup various details regarding users, transactions and services. The core parameters identify the merchant, the lookup type and additional custom fields.
Request Parameters
Request Parameters | ||||
Parameter Name | Mandatory | Description | Values | |
GetTransactionRequest | ||||
API | Y | Version of the API. Current Version: 1.0 | VarChar(4) | |
Safekey | Y | PayU Merchant Identifier. Provided to merchant upon integration | Char(38) | |
LookupTransactionType | Y | The type of transaction being performed PAYMENT_METHODS | VarChar (64) | |
CustomFields | ||||
Key | Y | Identification for custom field | VarChar (64) | |
Value | Y | Value for custom field | VarChar (64) |
PAYMENT_METHODS lookup
PayU wallet customers can choose to set up a handshake with a merchant where the user gives the merchant permission to transact from the users PayU wallet via API. This call is used by a merchant to lookup what payment methods exist for a specific user.
The merchant should pass in the transaction amount and currency, such that PayU can perform calculations for the merchant and give a simple response back on whether certain payments have sufficient funds to make the payment.
LookupTransaction Request | |||
MerchantUserID | Y | The unique merchant identifier for the user that was provided when the user authorised the merchant for handshake | VarChar(64) |
AmountInCents | Y | The transaction value | Integer |
Currency | Y | The transaction currency in international format (eg ZAR) | VarChar (3) |
Example:
<LookupTransaction> <Api>1.0</Api> <Safekey>{86903CCB-79A9-42EE-8637-1ACE90185507}</Safekey> <LookupTransactionType>PAYMENT_METHODS</LookupTransactionType> <Customfield> <key>MerchantUserId</key> <value>3</value> </Customfield> <Customfield> <key>AmountInCents</key> <value>1000</value> </Customfield> <Customfield> <key>Currency</key> <value>ZAR</value> </Customfield> </LookupTransaction> |
---|
LookupTransaction Response | ||||||||||||||
ResultCode | Result code returned by PayU for transaction | Integer | ||||||||||||
ResultMessage | Result message relating to result code for transaction | VarChar (64) | ||||||||||||
DisplayMessage | Customer friendly message to display in a browser to the customer | VarChar (64) | ||||||||||||
LookupData | Array of key value pairs within entry nodes where value is a JSON object | Array of JSON objects | ||||||||||||
CreditCard key | The following fields are returned:
| JSON object | ||||||||||||
Wallet key | The following fields are returned:
| JSON object |
Example:
<getLookupTransactionResponse> <return> <displayMessage>Successful</displayMessage> <lookupData> <entry> <key>CREDITCARD</key> <value> <item>{"information":"Visa","nameOnCard":"Chris Robb","description":"VISA Hello 0459","verified":"false","pmId":"DxcyAUk9MEE8REp0SWF8XG9JEXpBFnoVVndRZXxRYElc","defaultPM":"false"}</item> </value> </entry> <entry> <key>WALLET</key> <value> <item>{"cardBalance":"0.0","cashBalance":"0.0","loyaltyBalance":"0.0","pmId":"GwQ7CUU9XxFiEEp0VmF6UWJVEnxDFn0YSjk\u003d","defaultPM":"false"}</item> </value> </entry> </lookupData> <resultCode>00</resultCode> <resultMessage>Successful</resultMessage> </return> </getLookupTransactionResponse> |
---|