Skip to end of banner
Go to start of banner

Balances v2.0.0-rc1

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

Version Control

Version
Date
Author
Comments
1.0.001 March 2019Payments NZ API Working GroupBaseline Balances specification
v2.0-draft1
 

Updates:

  • Moved "Resource Definition" to top 42401875 section
  • In 42401875 table - have updated "Idempotent" column to "Idempotency Key" (aligned with OBIE v3.1.2)
  • Reworded 42401875 sections for clarity and consistency
  • Updated "Authorization Code" grant to "authorization flow (either redirect flow or decoupled flow)"
  • Updated 42401875 for consistency

Added:

  • 42401875 section for consistency (and to align with OBIE v3.1.2)

Errata:

  • Updated UML diagram for CreditLine/Amount object
v2.0-draft3 Gavin Wong (Unlicensed)

Errata:

  • Typos

Definition

This resource represents the net increases and decreases in an account (AccountId) at a specific point in time.

An account (AccountId) can have multiple balance types (these follow the standard ISO 20022 balance type enumerations). If an API Provider includes a credit line in an available balance - then the balance representation will have a section for the credit line amount and type.

Endpoints

ResourceEndpointMandatory?ScopeGrant TypeIdempotency KeyParametersRequest ObjectResponse Object
balances

GET /accounts/{AccountId}/balances

Mandatory

accounts

Redirect Flow; or

Decoupled Flow

No

OBReadBalance1
balancesGET /balancesOptionalaccounts

Redirect Flow; or

Decoupled Flow

NoPagination
OBReadBalance1

GET /accounts/{AccountId}/balances

The API endpoint allows a Third Party to retrieve the account balance information resource for a specific AccountId (which is retrieved in the call to GET /accounts).

  • The Third Party must have an access token issued by the API Provider using an authorization flow (either redirect flow or decoupled flow). 

GET /balances

The API endpoint allows a Third Party to retrieve the account balance resources in bulk, if an API Provider has implemented the bulk retrieval endpoints.

  • The Third Party must have an access token issued by the API Provider using an authorization flow (either redirect flow or decoupled flow). 
  • This will retrieve the resources for all accounts linked to the account-access-consent.

Data Model

The OBReadBalance1 object will be used for the call to: 

  • GET /accounts/{AccountId}/balances
  • GET /balances

UML Diagram

Notes

  • Multiple balances can be returned (each with a different value for Type) for an account. This is for API Providers that show multiple balances in their online channels.
  • The CreditLine section can be repeated - as multiple credit lines may be included in an available balance.
  • A DateTime element has been used instead of a complex choice element of Date and DateTime. Where time elements do not exist in API Provider systems - the time portion of the DateTime element will be defaulted to 00:00:00+00:00

Permission Codes

The resource requires the ReadBalances permission. The resource response payload does not differ depending on the permissions granted.

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodes
OBReadBalance1
OBReadBalance1
OBReadBalance1
Data1..1OBReadBalance1/Data
OBReadDataBalance1
Balance1..nOBReadBalance1/Data/Balance
OBCashBalance1
AccountId1..1OBReadBalance1/Data/Balance/AccountIdA unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner.Max40Text
CreditDebitIndicator1..1OBReadBalance1/Data/Balance/CreditDebitIndicatorIndicates whether the balance is a credit or a debit balance.
Usage: A zero balance is considered to be a credit balance.
OBCreditDebitCodeCredit
Debit
Type1..1OBReadBalance1/Data/Balance/TypeBalance type, in a coded form.OBBalanceType1CodeClosingAvailable
ClosingBooked
Expected
ForwardAvailable
Information
InterimAvailable
InterimBooked
OpeningAvailable
OpeningBooked
PreviouslyClosedBooked
DateTime1..1OBReadBalance1/Data/Balance/DateTimeIndicates the date (and time) of the balance.ISODateTime
Amount1..1OBReadBalance1/Data/Balance/AmountAmount of money of the cash balance.OBActiveOrHistoricCurrencyAndAmount
Amount1..1OBReadBalance1/Data/Balance/Amount/AmountA number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.ActiveCurrencyAndAmount_SimpleType^\d{1,13}\.\d{1,5}$
Currency1..1OBReadBalance1/Data/Balance/Amount/CurrencyA code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".ActiveOrHistoricCurrencyCode^[A-Z]{3,3}$
CreditLine0..nOBReadBalance1/Data/Balance/CreditLineSet of elements used to provide details on the credit line.OBCreditLine1
Included1..1OBReadBalance1/Data/Balance/CreditLine/IncludedIndicates whether or not the credit line is included in the balance of the account.

Usage: If not present, credit line is not included in the balance amount of the account.
xs:boolean
Type0..1OBReadBalance1/Data/Balance/CreditLine/TypeLimit type, in a coded form.OBExternalLimitType1CodeEmergency
Pre-Agreed
Temporary
Amount0..1OBReadBalance1/Data/Balance/CreditLine/AmountAmount of money of the credit line.OBActiveOrHistoricCurrencyAndAmount
Amount1..1OBReadBalance1/Data/Balance/CreditLine/Amount/AmountA number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.ActiveCurrencyAndAmount_SimpleType^\d{1,13}\.\d{1,5}$
Currency1..1OBReadBalance1/Data/Balance/CreditLine/Amount/CurrencyA code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".ActiveOrHistoricCurrencyCode^[A-Z]{3,3}$

Enumerations

This section gives the definitions for enumerations used.

Code ClassName Definition 
OBBalanceType1CodeClosingAvailable Closing balance of amount of money that is at the disposal of the account owner on the date specified. 
OBBalanceType1CodeClosingBooked Balance of the account at the end of the pre-agreed account reporting period. It is the sum of the opening booked balance at the beginning of the period and all entries booked to the account during the pre-agreed account reporting period. 
OBBalanceType1CodeExpected Balance, composed of booked entries and pending items known at the time of calculation , which projects the end of day balance if everything is booked on the account and no other entry is posted. 
OBBalanceType1CodeForwardAvailable Forward available balance of money that is at the disposal of the account owner on the date specified. 
OBBalanceType1CodeInformation Balance for informational purposes. 
OBBalanceType1CodeInterimAvailable 

Opening booked balance, plus today's credits, plus overdraft facility (if held) minus today debits, minus uncleared funds (note: uncleared funds equal the total of uncleared banked minus any  uncleared funds amount held). This is the total available funds the customer is able to access.

E.g. Interim Available Balance = Opening Booked Balance + Today's Credits + Overdraft Limit - Today's Debits - Uncleared Funds

OBBalanceType1CodeInterimBooked 

This balance will be calculated at individual bank level as per existing internal definitions to ensure consistency for customers. What is included in the displayed balance may differ between banks.

E.g. The balance of the account at a point in time / intraday / real time when requested, which may or may not include uncleared funds.

OBBalanceType1CodeOpeningAvailable Opening balance of amount of money that is at the disposal of the account owner on the date specified. 
OBBalanceType1CodeOpeningBooked 

Opening Balance of an account at the end of batch processing that interest and fees are calculated on. This is the same balance as Previously Closed Booked Balance.

Includes any uncleared funds, regardless of uncleared funds limits. E.g. balance after end of day process.

OBBalanceType1CodePreviouslyClosedBooked Balance of the account at the previously closed account reporting period. The opening booked balance for the new period has to be equal to this balance.
Usage: the previously booked closing balance should equal (inclusive date) the booked closing balance of the date it references and equal the actual booked opening balance of the current date. 
OBCreditDebitCodeCreditOperation is a credit
OBCreditDebitCodeDebitOperation is a debit
OBExternalLimitType1CodePre-AgreedThe amount of an arranged lending limit that has been agreed with the account holder
OBExternalLimitType1CodeTemporaryThe amount of a temporary lending limit that has been agreed with the account holder
OBExternalLimitType1CodeEmergencyThe amount of an arranged lending limit that can be borrowed on top of pre-agreed lending, that has been agreed with the account holder.

Usage Examples

Balances - Specific Account

Retrieving resources for a specific account.

Request

GET Account Balances Request
GET /accounts/22289/balances HTTP/1.1
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
x-fapi-auth-date: Sun, 10 Sep 2017 19:43:31 UTC
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json

Response

GET Account Balances Response
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json
 
{
  "Data": {
    "Balance": [
      {
        "AccountId": "22289",
        "Amount": {
          "Amount": "1230.00",
          "Currency": "NZD"
        },
        "CreditDebitIndicator": "Credit",
        "Type": "InterimAvailable",
        "DateTime": "2017-04-05T10:43:07+00:00",
        "CreditLine": [
          {
            "Included": true,
            "Amount": {
              "Amount": "1000.00",
              "Currency": "NZD"
            },
            "Type": "Pre-Agreed"
          }
        ]
      }
    ]
  },
  "Links": {
    "Self": "https://examplebank.api.co.nz/open-banking-nz/v2.0/accounts/22289/balances"
  },
  "Meta": {
    "TotalPages": 1
  }
}

Balances - Bulk

Retrieving resources for all accounts linked to the account-access-consent.

Request

GET Account Balances Request
GET /balances HTTP/1.1
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
x-fapi-auth-date: Sun, 10 Sep 2017 19:43:31 UTC
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json

Response

GET Account Balances Response
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json
 
{
  "Data": {
    "Balance": [
      {
        "AccountId": "22289",
        "Amount": {
          "Amount": "1230.00",
          "Currency": "NZD"
        },
        "CreditDebitIndicator": "Credit",
        "Type": "InterimAvailable",
        "DateTime": "2017-04-05T10:43:07+00:00",
        "CreditLine": [
          {
            "Included": true,
            "Amount": {
              "Amount": "1000.00",
              "Currency": "NZD"
            },
            "Type": "Pre-Agreed"
          }
        ]
      },
      {
        "AccountId": "31820",
        "Amount": {
          "Amount": "57.36",
          "Currency": "NZD"
        },
        "CreditDebitIndicator": "Debit",
        "Type": "InterimBooked",
        "DateTime": "2017-05-02T14:22:09+00:00"
      }
    ]
  },
  "Links": {
    "Self": "https://examplebank.api.co.nz/open-banking-nz/v2.0/balances"
  },
  "Meta": {
    "TotalPages": 1
  }
}
  • No labels