# Transaction

> A schema in the Payments API reference. Source: https://hub.ozow.com/api-reference/payments-api/schemas/transaction/

Representation of a transaction in the Ozow system with it's outcome.

## Fields

- `transactionId` (string, required, max length 50) - Ozow's unique reference for the transaction.
- `merchantCode` (string, required, max length 50) - Unique code assigned to each merchant.
- `siteCode` (string, required, max length 50) - The site code sent to Ozow in the request post.
- `transactionReference` (string, required, max length 50) - The merchant's transaction reference sent in the request post's TransactionReference variable.
- `currencyCode` (string, required, max length 3) - The transaction currency code sent in the request post.
- `amount` (number, double, required) - The transaction amount. The amount is in the currency specified by the currency code posted.
- `status` (string, required, max length 50) - The transaction status. Possible values are: 1. Complete - The payment was successful. 2. Cancelled - The payment was cancelled. 3. Error - An error occurred while processing the payment. 4. Abandoned – The payment was abandoned. 5. PendingInvestigation – An inconclusive result was received by the bank and the payment needs to be verified manually. 6. Pending – The status cannot be determined as yet but will be reposted to the notification URL as soon as it has been determined. Merchants not using the notification URL will receive a PendingInvestigation status.
- `statusMessage` (string, max length 150) - 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.
- `createdDate` (string, required) - Transaction created date and time.
- `paymentDate` (string) - Transaction payment date and time.
- `subStatus` (string, max length 50) - The transaction sub status for failed transactions. The value provides an indication as to why the payment failed. Some examples: • Unclassified – Failure scenario has not been mapped • InsufficientFunds - User did not have sufficient funds available to complete the payment While there are several sub-statuses, they have not been included here as they are strictly for reporting.
- `bankName` (string, max length 50) - The name of the bank the payment was made from.
- `maskedAccountNumber` (string, max length 50) - The masked account number the payment was made from. If account number is 12 or more digits then the first and last four digits are unmasked e.g. 1234567898765 will be masked as 1234*****8765 If the account number is less than12 digits then the first and last 3 digits are left unmasked e.g. 123456789 will be masked as 123***789 **This is not available by default and a request by the merchant must be submitted along with a justification for requiring this information.**
- `smartIndicators` (string, max length 500, pattern HIGH_VALUE|FIRST_OZOW) - Some Ozow merchants have requested this information as they use this in their own processes. The can be ignored unless you have a purpose and application for this information. The application of these indicators are for the merchant’s discretion and in isolation do not constitute any action to be taken by the merchant. The field will contain a pipe delimited list of the following values if they are applicable e.g. HIGH_VALUE | FIRST_OZOW : * HIGH_VALUE – If a soft limit is configured on the site and the amount paid is higher or equal to the configured limit * FIRST_OZOW – First time a user has paid using Ozow * FIRST_MERCHANT – First time a user has paid the merchant using Ozow * NEW_OZOW – User has paid using Ozow for the first time in the past seven days * NEW_MERCHANT - User has paid the merchant using Ozow for the first time in the past seven days
