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) |
PayUReference | C | PayU unique reference number for transaction | VarChar (64) |
MerchantReference | C | MerchantReference supplied for previous transaction | VarChar (64) |
Either PayUReference or MerchantReference should be supplied for the call. If both are supplied the call will fail.
Example:
<GetTransactionRequest Api="1.0" Safekey="{34D0CF84-CEFF-4E32-95FC-1FB9168FD130}" > <PayUReference>34D0CF84-CEFF-4E32-95FC-1FB9168FD130</PayUReference> </GetTransactionRequest> |
---|
Transaction State
A transaction in PayU can be in one of 4 states: NEW, PROCESSING, SUCCESSFUL and FAILED. SUCCESSFUL and FAILED are both final states that cannot be changed. In the case of a DoTransaction for a FINALISE. The transaction will immediately go from, “NEW” to “PROCESSING” state when PayU performs the payment. Upon receiving the response from the payment gateway the state is changed to SUCCESSFUL or FAILED.
Response Parameters
Parameter Name | Description | Values |
GetTransactionResponse | ||
Staged | Whether transaction was staged or not | Boolean |
MerchantReference | Merchant identifier for transaction. | VarChar (64) |
TransactionType | TransactionType on which data is being passed back on: RESERVE FINALIZE PAYMENT EFFECT_STAGING CREDIT RESERVE_CANCEL REGISTER_LINK TOPUP | String |
TransactionState | The current state of the transaction being referenced. NEW PROCESSING SUCCESSFUL FAILED | String |
PointOfFailure | Indicated on failed transactions where the point of failure was, blank if successful transaction | VarChar (64) |
ResultCode | Result code returned by PayU for transaction | Integer |
ResultMessage | Result message relating to result code for transaction | String |
DisplayMessage | Customer friendly message to display in a browser to the customer | 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 | International Currency Code. Example: ZAR | String |
PaymentMethodsUsed | ||
Information | Payment method information (example: loyalty program name) | VarChar (64) |
AmountInCents | Amount in cents for payment method. Format as 1000 for R10.00 | Integer |
NameOnCard | If credit card used, this will return cardholder name of the card | String |
CardNumber | If credit card used, this will return a masked credit card number | VarChar (64) |
MembershipNumber | Loyalty membership number | VarChar (64) |
When multi-tender has taken place, the response will include the breakdown of how much was taken off each payment method.
Example (Successful Response):
<GetTransactionResponse> <MerchantReference>123</MerchantReference> <TransactionType>RESERVE</TransactionType> <TransactionState>SUCCESSFUL</TransactionState> <ResultCode>000</ResultCode> <ResultMessage>Staged</ResultMessage> <PayUReference>234534523452</PayUReference> <Basket> <Description>PnP Basket</Description> <AmountInCents>12300</AmountInCents> <CurrencyCode>ZAR</CurrencyCode> </Basket> <PaymentMethodsUsed> <CreditCard Information="Visa" NameOnCard=”Mr Soap” CardNumber=”522112xxxxxx1234” AmountInCents="10000" FraudIndex="200"> </PaymentMethodsUsed> <Fraud> <ResultCode>V030</ResultCode> <ResultMessage>Approved</ResultMessage> <CaseManagerNote>N/A</CaseManagerNote> </Fraud> </GetTransactionResponse> |
---|
Example (Failed Response):
<GetTransactionResponse> <MerchantReference>123</MerchantReference> <TransactionType>RESERVE</TransactionType> <TransactionState>FAILED</TransactionState> <PointOfFailure>Bank</PointOfFailure> <ResultCode>51</ResultCode> <ResultMessage>Insufficient funds</ResultMessage> <DisplayMessage>Transaction failed, please contact your bank</DisplayMessage> <PayUReference>2345345234523</PayUReference> <Basket> <Description>ORD001</Description> <AmountInCents>12300</AmountInCents> <CurrencyCode>ZAR</CurrencyCode> </Basket> <PaymentMethodsUsed> <CreditCard Information="Visa" NameOnCard=”Mr Soap” CardNumber=”522112xxxxxx1234” AmountInCents="10000" > </PaymentMethodsUsed> <Fraud> <ResultCode>V030</ResultCode> <ResultMessage>Approved</ResultMessage> <CaseManagerNote>N/A</CaseManagerNote> </Fraud> </GetTransactionResponse> |
---|
Page Tree | ||||
---|---|---|---|---|
|