doTransaction (Enterprise API)

A doTransaction can be done to initiate any of the following processes:

  • RESERVE
  • RESERVE_CANCEL
  • PAYMENT
  • FINALIZE
  • CREDIT

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

Request Parameters

Parameter Name

Description

Data type

DoTransactionRequest

Api

Version of the API. Current Version: 1.0

VarChar(4)

Safekey

PayU Merchant Identifier. Provided to merchant upon integration

Char(38)

TransactionType

The type of transaction being performed

RESERVE

RESERVE_CANCEL

PAYMENT

FINALIZE

CREDIT

String

AuthenticationType

The method of authentication used if a payment is being made that requires a user’s permission

NA

HANDSHAKE

TOKEN * (2nd call and subsequent calls)

VCO

String

storePaymentMethod

Indicates if PayU must save this card and provide the merchant with a token to use for subsequent payments for the customer - True or False * (Only required for the first call, do not resend on subsequent calls for the customer)

 

Additional Information

MerchantReference

Unique merchant identifier for transaction

VarChar (64)

PayUReference

PayU unique reference number for transaction

VarChar(24)

DemoMode

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

Boolean

NotificationURL

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

String

Basket

Description

Basket description that will show on PayU

VarChar (64)

AmountInCents

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

Integer

CurrencyCode

Currency code defined by PayU. Example: ZAR

VarChar(2)

Customer

FirstName

Customer first name

VarChar (64)

LastName

Customer last name

VarChar (64)

RegionalId

Regional identifier for customer such as RSA ID

String

Mobile

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

String

Email

Customer Email Address

VarChar (64)

MerchantUserId

*Unique Customer ID in merchant system (Required for Token payment)

VarChar (64)

DOB

Customer Date of Birth. Format 1970-07-30

VarChar (10)

Payment Methods – Credit Card (No handshake)

CardNumber

The credit card number that appears on the credit card

VarChar(24)

CardExpiry

The expiry month and year of the credit card. Format required: 042002 where the first two digits represents the month and the last four represents the year in the following format MMYYYY

VarChar(6)

CVV

The credit card CVV number. Maximum length is 4 and the numbers must be positive integer

VarChar(4)

NameOnCard

The full names that appears on the credit card, e.g. John Doe

VarChar(64)

BudgetPeriod

The budget term of payment. This indicates whether buyer wishes to pay once off, or spread the period of payment over several months. The period of payment starts at 0 (once off payment), 6 months, 12 months etc. Maximum 60 months

Integer

AmountInCents

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

Integer

Payment Methods – Credit Card (with handshake/token authentication)

pmID

The time-expired unique reference for the payment method of the user

VarChar (64)

CVV

The credit card CVV number. Maximum length is 4 and the numbers must be positive integer

VarChar(4)

AmountInCents

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

Integer

Payment Methods - EFT

BankName

Name of the bank the customer is paying into

VarChar (64)

Payment Methods - Loyalty

Information

Payment method name (example: Loyalty program name)

VarChar (64)

MembershipNumber

Membership number of a loyalty scheme

VarChar (64)

AmountInCents

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

Integer

Payment Methods –  (with handshake/token authentication)

pmID

The token obtained for the user from the LookupTransaction (PAYMENT_METHODS) call.

VarChar (64)

AmountInCents

The value of the transaction. Set to zero if you wish to only accept loyalty as payment

Integer

LoyaltyAmountInCents

The value of the transaction that may be paid for using loyalty

Integer

Custom Fields

Key

Identification for custom field

VarChar (64)

Value

Value for custom field

VarChar (64)

Required Fields for Request

 

RESERVE

RESERVE_CANCEL

PAYMENT

FINALIZE

CREDIT

DoTransaction Request

Api

Y

Y

Y

Y

Y

Safekey

Y

Y

Y

Y

Y

TransactionType

Y

Y

Y

Y

Y

AuthenticationType

N(3)

N

N(3)

N

N

storePaymentMethod

N

N

N(4)

N

N

Additional Information

MerchantReference

Y

Y

Y

Y

Y

PayUReference

NA

Y

NA

Y

Y

DemoMode

N

NA

N

NA

NA

NotificationURL

N

N

N

N

N

Basket

Description

Y

NA

Y

NA

NA

AmountInCents

Y (1)

Y

Y(1)

Y (1,2)

Y (1,2)

CurrencyCode

Y

Y

Y

Y

Y

Customer

FirstName

N

N

N

N

N

LastName

N

N

N

N

N

RegionalId

N

N

N

N

N

Mobile

N

N

N

N

N

Email

N

N

N

N

N

MerchantUserId

N

N

N(4)

N

N

DOB

N

N

N

N

N

Payment Methods – Loyalty

Information

NA

NA

NA

Y

NA

MermbershipNumber

NA

NA

NA

Y

NA

AmountInCents

NA

NA

NA

Y

NA

Payment Methods - Credit Card

CardNumber

Y

NA

Y

NA

NA

CardExpiry

Y

NA

Y

NA

NA

CVV

Y

NA

Y

NA

NA

NameOnCard

Y

NA

Y

NA

NA

BudgetPeriod

N

NA

N

NA

NA

AmountInCents

Y

Y

Y

Y

Y

Custom Fields

Key

N

N

N

N

N

Value

N

N

N

N

N

Y - Mandatory

N - Optional

NA - Not Allowed

 

(1) Basket Amount must equal sum of PaymentMethod Amount's

(2) Amount must equal to or less than the original transaction amount

(3) Field is required to be set to HANDSHAKE if payment is being made with stored credit card

(4) Field is required when doing a transaction with a TOKEN or to generate a TOKEN

 

 

For examples of doTransaction API calls please go to the doTransaction API call example page here