Balances - v3.1.2

  1. Overview
  2. Endpoints
    1. GET /accounts/{AccountId}/balances
    2. GET /balances
  3. Data Model
    1. Resource Definition
    2. UML Diagram
    3. Notes
    4. Permission Codes
    5. Data Dictionary
  4. Usage Examples
    1. Specific Account
      1. Get Account Balances Request
      2. Get Account Balances Response
    2. Bulk
      1. Get Balances Request
      2. Get Balances Response

Overview

The balances resource is used by an AISP to retrieve in bulk or single account balance information for a specific AccountId for that the PSU has authorised to access.

This resource description should be read in conjunction with a compatible Account Information Services API Profile.

Endpoints

 ResourceHTTP OperationEndpointMandatory?ScopeGrant TypeIdempotency KeyParametersRequest ObjectResponse Object
1balancesGETGET /accounts/{AccountId}/balancesMandatoryaccountsAuthorization CodeNo  OBReadBalance1
2balancesGETGET /balancesOptionalaccountsAuthorization CodeNoPagination OBReadBalance1

GET /accounts/{AccountId}/balances

An AISP may retrieve the account balance information resource for a specific AccountId (which is retrieved in the call to GET /accounts).

GET /balances

If an ASPSP has implemented the bulk retrieval endpoints, an AISP may optionally retrieve the account information resources in bulk. This will retrieve the resources for all authorised accounts linked to the account-request.

Data Model

The OBReadBalance1 object will be used for the call to:

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

Resource Definition

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

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

UML Diagram

 OBReadBalance1.gif

Notes

  • Multiple balances may be returned (each with a different value for Type) for an account. This is for ASPSPs that show multiple balances in their online channels.
  • The CreditLine section may 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 ASPSP 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

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBReadBalance1 OBReadBalance1 OBReadBalance1  
Data1..1OBReadBalance1/Data OBReadDataBalance1  
Balance1..nOBReadBalance1/Data/BalanceSet of elements used to define the balance details.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 ClosingCleared Expected ForwardAvailable Information InterimAvailable InterimBooked InterimCleared OpeningAvailable OpeningBooked OpeningCleared 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.OBActiveCurrencyAndAmount_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.OBExternalLimitType1CodeAvailable Credit Emergency 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.OBActiveCurrencyAndAmount_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}$

Usage Examples

Specific Account

Get Account Balances Request

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

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": "GBP"
        },
        "CreditDebitIndicator": "Credit",
        "Type": "InterimAvailable",
        "DateTime": "2017-04-05T10:43:07+00:00",
        "CreditLine": [
          {
            "Included": true,
            "Amount": {
              "Amount": "1000.00",
              "Currency": "GBP"
            },
            "Type": "Pre-Agreed"
          }
        ]
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v3.1/aisp/accounts/22289/balances/"
  },
  "Meta": {
    "TotalPages": 1
  }
}

Bulk

Get Balances Request

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

Get 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": "GBP"
        },
        "CreditDebitIndicator": "Credit",
        "Type": "InterimAvailable",
        "DateTime": "2017-04-05T10:43:07+00:00",
        "CreditLine": [
          {
            "Included": true,
            "Amount": {
              "Amount": "1000.00",
              "Currency": "GBP"
            },
            "Type": "Pre-Agreed"
          }
        ]
      },
      {
        "AccountId": "31820",
        "Amount": {
          "Amount": "57.36",
          "Currency": "GBP"
        },
        "CreditDebitIndicator": "Debit",
        "Type": "InterimBooked",
        "DateTime": "2017-05-02T14:22:09+00:00"
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v3.1/aisp/balances/"
  },
  "Meta": {
    "TotalPages": 1
  }
}