doTransaction (RPP)

For the SOAP headers that have to accompany this message, see the section on RPP SOAP headers.

You will use a doTransaction in the following situations:

  • RESERVE_CANCEL
  • FINALIZE
  • CREDIT
  • EFFECT_STAGING

Please note: no special characters are allowed in any of the API call parameters as downstream systems are unable to process them.

For more information read this.


The doTransaction SOAP call is used to action a type of transaction defined by the value in the transaction type parameter against a specified the PayU reference number.
If the setTransaction call sent through a transaction type that requires a follow up (RESERVE → FINALISE) then a doTransaction call needs to be done in order to complete the transaction.
Additionally, a doTransaction call can be done in order to CREDIT a PAYMENT done in the setTransaction.

In the case of a doTransaction for a FINALIZE. The transaction will go almost immediately from the NEW state to PROCESSING when PayU go off to the payment gateway to perform the payment. Upon receiving the response from the payment gateway the state is changed to SUCCESSFUL or FAILED.

 

doTransaction: Request Parameters

Parameter Name

Description

Data type

Required field for request

DoTransactionRequest

RESERVE_CANCEL

FINALIZE

CREDIT

Api

Version of the API. Current Version: 1.0 (SOAP: ONE_ZERO)

String

Y

Y

Y

Safekey

PayU Merchant Identifier. Provided to merchant upon integration

String

Y

Y

Y

TransactionType

The type of transaction being performed.
RESERVE_CANCEL
FINALIZE
CREDIT
EFFECT_STAGING

String

Y

Y

Y

PayUReference

PayU unique reference number for transaction

String

Y

Y

Y

AdditionalInformation

MerchantReference

Merchant identifier for transaction.

String

Y

Y

Y

DemoMode

To determine if the API request should be handled as a demo transaction. Values: True/False FUTURE USE

String

N/A

N/A

N/A

NotificationURL

URL where the merchant would like to be notified of transaction result via IPN (Instant Payment Notification). FUTURE USE

(max length is 255 characters)

String

N

N

N

Customer

FirstName

Customer first name

String

N

N

N

LastName

Customer last name

String

N

N

N

RegionalId

Regional identifier for customer such as RSA ID

String

N

N

N

Mobile

Customer Mobile Number in international format without +( eg 27827891248)

String

N

N

N

Email

Customer Email Address

String

N

N

N

MerchUserId

Unique Customer ID in merchant system

String

N

N

N

Basket

Description

Basket description that will show on PayU

String

N/A

N/A

N/A

AmountInCents

Total amount of the basket in cents. Format as 1000 for R10.00

String

Y

Y(2)

Y(2)

CurrencyCode

Currency code defined by PayU. Example: ZAR

String

Y

Y

Y

PaymentMethods – Credit Card

AmountInCents

Amount in cents for payment method. Format as 1000 for R10.00

String

Y

Y

Y

CustomFields

Key

Identification for custom field

String

N

N

N

Value

Value for custom field

String

N

N

N

doTransaction: Response Parameters

Parameter Name

Description

Values

Stage

Allows the merchant to stage a transaction. Values: true / false

String

MerchantReference

Merchant identifier for transaction.

String

Successful

Boolean value to determine if the transaction was successful or not.

String

PointOfFailure

Indicated on failed transactions where the point of failure was

String

ResultCode

Result code returned by PayU for transaction

String

ResultMessage

Result message relating to result code for transaction

String

DisplayMessage

Customer friendly message to display in a browser to the customer

String

PayUReference

PayU unique reference number for transaction

String

Description

Basket description that will show on PayU

String

AmountInCents

Total amount of the basket in cents. Format as 1000 for R10.00

String

CurrencyCode

Currency code defined by PayU. Example: ZAR

String

Information

Payment method information (example: Loyalty program name)

String

NameOnCard

If Credit Card used, this will return Card holder name of the card

String

CardNumber

If Credit Card used, this will return a masked Credit Card number

String

AmountInCents

Amount in cents for payment method. Format as 1000 for R10.00

String

FraudIndex

If credit card is the payment method, this will be the fraud index returned from SafeShop.

String

doTransaction: SOAP request example
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.api.controller.web.payjar.com/" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <SOAP-ENV:Header>
        <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-9" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>Staging Integration Store 3</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">WSAUFbw6</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:doTransaction>
            <Api>ONE_ZERO</Api>
            <Safekey>{07F70723-1B96-4B97-B891-7BF708594EEA}</Safekey>
            <TransactionType>FINALIZE</TransactionType>
            <AdditionalInformation>
                <merchantReference>mercRef_1395758911</merchantReference>
                <payUReference>150243726115</payUReference>
            </AdditionalInformation>
            <Customer>
                <email>
                </email>
                <firstName>firstName_1395758911</firstName>
                <lastName>lastName_1395758911</lastName>
                <merchantUserId>merchantUserId_1395758911</merchantUserId>
                <mobile>
                </mobile>
                <regionalId>regionalId_1395758911</regionalId>
            </Customer>
            <Basket>
                <amountInCents>8264</amountInCents>
                <currencyCode>ZAR</currencyCode>
            </Basket>
            <Creditcard>
                <amountInCents>8264</amountInCents>
            </Creditcard>
        </ns1:doTransaction>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
doTransaction: SOAP response example
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:doTransactionResponse xmlns:ns2="http://soap.api.controller.web.payjar.com/">
            <return>
                <merchantReference>mercRef_1395758911</merchantReference>
                <payUReference>150243726115</payUReference>
                <resultCode>00</resultCode>
                <resultMessage>Successful</resultMessage>
                <successful>true</successful>
            </return>
        </ns2:doTransactionResponse>
    </soap:Body>
</soap:Envelope>