pub struct Account {
pub id: AccountId,
pub migrated: Option<String>,
pub authorisation: AuthorizationId,
pub credentials: Option<AuthorizationId>,
pub name: String,
pub status: Active,
pub formatted_acount: Option<String>,
pub refreshed: RefreshDetails,
pub balance: BalanceDetails,
pub kind: BankAccountKind,
pub attributes: Vec<Attribute>,
}Expand description
An Akahu account is something that has a balance. Some connections (like banks) have lots of accounts, while others (like KiwiSaver providers) may only have one. Different types of accounts have different attributes and abilities, which can get a bit confusing! The rest of this page should help you figure everything out, from an account’s provider to whether it can make payments.
Keep in mind that we limit what information is available depending on your app permissions. This is done in order to protect user privacy, however it also means that some of the data here may not be visible to you.
Fields§
§id: AccountIdThe id key is a unique identifier for the account in the Akahu system.
It is always be prefixed by acc_ so that you can tell that it belongs to an account.
migrated: Option<String>The identifier of this account’s predecessor.
This attribute is only present if the account has been migrated to an official open banking connection from a classic Akahu connection.
Read more about official open banking, and migrating to it here.
[https://developers.akahu.nz/docs/the-account-model#_migrated]
Financial accounts are connected to Akahu via an authorisation with the user’s financial institution. Multiple accounts can be connected during a single authorisation, causing them to have the same authorisation identifier. This identifier can also be used to link a specific account to identity data for the party who completed the authorisation.
This identifier can also be used to revoke access to all the accounts connected to that authorisation.
For example, if you have 3 ANZ accounts, they will all have the same
authorisation. Your ANZ accounts and your friend’s ANZ accounts have
different logins, so they will have a different authorisation key. The
authorisation key is in no way derived or related to your login
credentials - it’s just a random ID.
[https://developers.akahu.nz/docs/the-account-model#_authorisation]
credentials: Option<AuthorizationId>authorisation instead.Deprecated: Please use authorisation instead.
[https://developers.akahu.nz/docs/the-account-model#_credentials-deprecated]
name: StringThis is the name of the account. If the connection allows customisation, the name will be the custom name (or nickname), e.g. “Spending Account”. Otherwise Akahu falls back to the product name, e.g. “Super Saver”.
status: ActiveThis attribute indicates the status of Akahu’s connection to this account.
It is possible for Akahu to lose the ability to authenticate with a financial institution if the user revokes Akahu’s access directly via their institution, or changes their login credentials, which in some cases can cause our long-lived access to be revoked.
formatted_acount: Option<String>If the account has a well defined account number (eg. a bank account number, or credit card number) this will be defined here with a standard format across connections. This field will be the value undefined for accounts with KiwiSaver providers and investment platform accounts.
For NZ banks, we use the common format 00-0000-0000000-00. For credit cards, we return a redacted card number 1234---1234 or --****-1234
[https://developers.akahu.nz/docs/the-account-model#formatted_account]
refreshed: RefreshDetailsAkahu can refresh different parts of an account’s data at different rates. The timestamps in the refreshed object tell you when that account data was last updated.
When looking at a timestamp in here, you can think “Akahu’s view of the account (balance/metadata/transactions) is up to date as of $TIME”.
[https://developers.akahu.nz/docs/the-account-model#refreshed]
balance: BalanceDetailsThe account balance.
[https://developers.akahu.nz/docs/the-account-model#balance]
kind: BankAccountKindWhat sort of account this is. Akahu provides specific bank account types, and falls back to more general types for other types of connection.
attributes: Vec<Attribute>The list of attributes indicates what abilities an account has.
See Attribute for more information.
[https://developers.akahu.nz/docs/the-account-model#attributes]