Step 6: Outcome

Once you receive a bank message that contains a transaction status the transaction has been concluded and the status of the payment can be determined. You can trigger the relevant actions on your system based on the payment status received.


Status Types

CompleteThe payment was successfully completed
CancelledThe payment was cancelled as we could not proceed any further with the payment or the user cancelled.
ErrorA technical error occurred while processing the payment.
AbandonedNo activity from the user for a set amount of time. The time varies for different steps.
PendingInvestigationAn inconclusive result was received by the bank and the payment needs to be verified manually.
PendingThe status cannot be determined as yet but will be posted to the notification URL as soon as it has been determined. Merchants not using the notification URL will receive a PendingInvestigation status.

Notification

Once the transaction has concluded a notification will be sent to the notification url specified in the Create Request method or configured in your Ozow merchant admin portal. If the status is "Pending", a notification will be sent again once the final status has been determined.

NameTypeDescription
SiteCodestring (50)The site code sent to Ozow in the request post.
TransactionIdguidThe transaction identifier.
TransactionReferencestring (50)The merchant's transaction reference sent in the Create Request's TransactionReference variable.
Amountdecimal (9,2)The payment amount. The amount is in the currency specified by the currency code.
Statusstring (50)The transaction status. See possible values.
Optional1
Optional2
Optional3
Optional4
Optional5
string (50)Optional fields sent in the Create Request.
CurrencyCodestring (3)The transaction currency code sent in the Create Request.
IsTestboolWhether or not the original request was a test request. Test requests are currently not available for this API so value will always be false.
StatusMessagestring (500)Message regarding the status of the transaction. This field will not always have a value. This is a user friendly message that can be displayed to the user e.g. User cancelled transaction.
Hashstring (250)SHA512 hash used to ensure that certain fields in the message have not been altered after the hash was generated. Check the generate hash section below for more details on how to validate the response variables using the hash.

Notification Hash Check

Follow these steps to generate the hash check:

  1. Concatenate the notification variables (excluding Hash) in the order they appear in the notification fields table above.
  2. Append your private key to the concatenated string. Your private key can be found in merchant details section of the merchant admin site.
  3. Convert the concatenated string to lowercase.
  4. Generate a SHA512 hash of the lowercase concatenated string.
  5. Compare generated hash to the Hash value received.

Get Transaction

Gets the status of a transaction. This can be used for polling to pick up abandoned transactions or can be used to verify the status of a transaction.

Url secure/transaction/status/:transactionId
Method GET
Headers See common headers. No data is posted so the Content-Type header can be excluded.
URL Params
Name Type Description
transactionId guid The transaction identifier.
Data Params N/A
Response Object
Name Type Description
transactionId guid The identifier for the transaction.
status string (50) The transaction status. See status types
statusUtcDate date The UTC date of the status.
receiptId guid The identifier for the transaction receipt.
error Error Object If an error occurred this object will have details regarding the error.
Request Example
               
GET https://api.ozow.com/secure/transaction/status/
ac53b87f-90ca-48b7-b821-55330a56379c HTTP/1.1
Accept: application/json
Authorization: Bearer jsK94mgvz17ZvZB...RZ7HF2dbJ_T-tTo
              
            
Response Example
               
{  
   "error":null,
   "transactionId":"6f0bd243-1512-4c0a-b98f-75c8e1c06f93",
   "status":"Abandoned",
   "statusUtcDate":"2017-02-25T10:25:27.403",
   "receiptId":null
}