Push Payments Callback

Receive automatic pushPayments notifications from DPO after successful payments and return OK to acknowledge them.

Push Payments Callback

Receive an automatic pushPayments notification from DPO after a successful payment and return OK to acknowledge it.

DPO sends the notification to the URL provided for your merchant account after a successful payment. Use this callback to update your system when a transaction is paid.


Usage

The pushPayments API notifies the merchant for each successful payment.

Your callback endpoint should:

  1. Receive the XML payload from DPO.
  2. Read the transaction and customer details from the payload.
  3. Update the transaction status in your system.
  4. Return OK in the XML response to confirm that the push payment was received.

Response requirement

The merchant must return OK to approve and confirm the push payment notification.

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Response>OK</Response>
</API3G>

Push notification parameters

The server pushes the pushPayments API notification using the following parameters.

ParameterData typeDescription
Result3-digit codeCode sent with the result of the request.
ResultExplanationTextFree text result explanation.
TransactionTokenTokenTransaction token.
TransactionRefTextReference sent during the createToken API request.
CustomerNameTextCustomer name as entered on the 3GDirectpay payment page.
CustomerCreditTextLast 4 digits of the credit card. Sent if the transaction was paid by credit card.
CustomerCreditTypeTextCredit card type.
TransactionApprovalTextTransaction approval number.
TransactionCurrencyTextFinal payment currency. The customer can convert the payment.
TransactionAmountMoneyPaid amount.
FraudAlert3-digit codeFraud code according to the fraud codes table.
FraudExplnationTextFree text fraud analysis.
TransactionNetAmountMoneyNet transaction amount.
TransactionSettlementDateDateTransaction settlement date.
TransactionRollingReserveAmountMoneyTransaction rolling reserve amount.
TransactionRollingReserveDateDateRolling reserve release date.
CustomerPhoneTextCustomer phone number.
CustomerCountryTextCustomer country.
CustomerAddressTextCustomer address.
CustomerCityTextCustomer city.
CustomerZipTextCustomer ZIP code.
MobilePaymentRequestTextMobile payment request status.
AccRefTextInternal accounting reference number.

Push notification example

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Result>000</Result>
  <ResultExplanation>Transaction paid</ResultExplanation>
  <TransactionToken>68B90B5E-25F6-4146-8AB1-G5B3A0C41N9E</TransactionToken>
  <TransactionRef>A123BEWDSD</TransactionRef>
  <CustomerName>John Doe</CustomerName>
  <CustomerCredit>4432</CustomerCredit>
  <TransactionApproval>938204312</TransactionApproval>
  <TransactionCurrency>USD</TransactionCurrency>
  <TransactionAmount>950.00</TransactionAmount>
  <FraudAlert>000</FraudAlert>
  <FraudExplnation>No Fraud detected</FraudExplnation>
  <TransactionNetAmount>945</TransactionNetAmount>
  <TransactionSettlementDate>2013/12/31</TransactionSettlementDate>
  <TransactionRollingReserveAmount>5</TransactionRollingReserveAmount>
  <TransactionRollingReserveDate>2014/12/31</TransactionRollingReserveDate>
  <CustomerPhone>254123456789</CustomerPhone>
  <CustomerCountry>KE</CustomerCountry>
  <CustomerAddress>Stranfe blvd.</CustomerAddress>
  <CustomerCity>Nairobi</CustomerCity>
  <CustomerZip>AH1</CustomerZip>
  <MobilePaymentRequest>Sent</MobilePaymentRequest>
  <AccRef>ABC123REF</AccRef>
</API3G>

Callback response variables

Return these variables from your callback endpoint.

ParameterData typeDescriptionRequired
ResponseTextMust return OK to confirm the push payment.Mandatory
CompanyRefTextCompany reference number. Can update the transaction CompanyRef on callback.Optional
AccRefTextInternal accounting reference number. Can update the transaction AccRef on callback.Optional

Callback response example

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Response>OK</Response>
</API3G>

Fraud alert codes

CodeExplanation
000Genuine transaction.
001Low risk. Not checked.
002Suspected fraud alert.
003Fraud alert cleared. Merchant marked as clear.
004Suspect fraud alert.
005Fraud alert cleared. Genuine transaction.
006Black. Fraudulent transaction.