Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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 customers can choose to set up a handshake with a merchant where the user gives the merchant permission to transact from the users PayU 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:

information

Card Type

nameOnCard

Name of card owner

description

Customer selected card description

verified

Whether the card has been verified

pmId

A token to use for transacting with the payment method

defaultPM

Flag indicating if the payment method is the users default payment method

JSON object

Wallet key

The following fields are returned:

cardBalance

Card balance of the user

cashBalance

Caash balance of the user

loyaltyBalance

Loyalty balance of the user for the particular merchant

pmId

A token to use for transacting with the payment method

defaultPM

Flag indicating if the payment method is the users default payment method

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>

  • No labels