pub struct Transaction {
pub id: TransactionId,
pub account: AccountId,
pub connection: ConnectionId,
pub created_at: DateTime<Utc>,
pub date: DateTime<Utc>,
pub description: String,
pub amount: Decimal,
pub balance: Option<Decimal>,
pub kind: TransactionKind,
pub enriched_data: Option<EnrichedTransactionData>,
}Expand description
A transaction is a record of money moving between two accounts. Akahu can provide transaction data from connected accounts for all bank integrations and a selection of non-bank integrations. See the Supported Integrations reference for the full list of integrations that have transaction data available.
In addition to the basic transaction data that Akahu retrieves from the connected institution (such as date, amount, description), Akahu enriches transactions with merchant and categorisation data where possible. More information on enrichment data is provided in detail in this document.
Transaction data is only available to apps with the TRANSACTIONS scope. In addition, further permissions are required to access enriched transaction data. Personal apps have full access to enriched transactions by default. If you have a full Akahu app and would like access to transaction data, get in touch via hello@akahu.nz or our Slack workspace.
See our Accessing Transactional Data guide to learn how to retrieve transactions from Akahu’s API.
Fields§
§id: TransactionIdThe id key is a unique identifier for the transaction in the Akahu
system. It is always be prefixed by trans_ so that you can tell that it
refers to a transaction.
account: AccountIdThe account key indicates which account this transaction belongs to.
See our guide to Accessing Account Data to learn how to get this
account, and our Account Model docs to learn more about accounts.
connection: ConnectionIdThis is the ID of provider that Akahu has retrieved this transaction from. You can get a list of connections from our /connections endpoint.
created_at: DateTime<Utc>The time that Akahu first saw this transaction (as an ISO 8601 timestamp). This is unrelated to the transaction date (when the transaction occurred) because Akahu may have retrieved an old transaction.
date: DateTime<Utc>The date that the transaction was posted with the account holder, as an ISO 8601 timestamp. In many cases this will only be accurate to the day, due to the level of detail provided by the bank.
description: StringThe transacton description as provided by the bank. Some minor cleanup is done by Akahu (such as whitespace normalisation), but this value is otherwise direct from the bank.
amount: DecimalThe amount of money that was moved by this transaction.
balance: Option<Decimal>If available, the account balance immediately after this transaction was made. This value is direct from the bank and not modified by Akahu.
kind: TransactionKindWhat sort of transaction this is. Akahu tries to find a specific transaction type, falling back to “CREDIT” or “DEBIT” if nothing else is available.
[https://developers.akahu.nz/docs/the-transaction-model#type]
enriched_data: Option<EnrichedTransactionData>This is data added by the Akahu enrichment engine. You must have additional permissions to view this data.
[https://developers.akahu.nz/docs/the-transaction-model#enriched-transaction-data]
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more