Account and Transaction API Specification - v1.1.0
- 1 Version Control
- 2 Release Note
- 2.1 Fixes
- 2.2 Clarifications
- 2.3 Enhancements
- 3 Overview
- 3.1 Document Overview
- 3.2 Design Principles
- 3.2.1 RESTful APIs
- 3.2.2 Standards
- 3.2.3 ISO 20022
- 3.2.4 Extensibility
- 3.2.5 Idempotency
- 3.2.6 Non-Repudiation
- 3.2.7 Unique Identifiers (Id Fields)
- 3.3 Scope
- 3.4 Out of Scope
- 4 Basics
- 4.1 Overview
- 4.1.1 Steps
- 4.1.2 Sequence Diagram
- 4.1.2.1 Account Info - High Level Flow
- 4.2 Actors
- 4.3 Character Encoding
- 4.4 Date Formats
- 4.5 Resource URI Path Structure
- 4.6 Headers
- 4.6.1 Request Headers
- 4.6.2 Response Headers
- 4.7 Return & Error Codes
- 4.8 Pre-Conditions
- 4.8.1 Pre-conditions for TPPs
- 4.8.2 Pre-conditions for ASPSPs
- 4.9 Idempotency
- 4.10 Non-repudiation
- 4.10.1 Overview
- 4.10.2 Specification
- 4.10.3 Process for signing a payload
- 4.10.4 Process for verifying a signature
- 4.10.5 Sample JOSE Header
- 4.11 Filtering
- 4.12 Pagination
- 4.13 Regulatory Considerations
- 4.13.1 RTS - Article 10
- 4.13.2 RTS - Article 31(5)
- 4.1 Overview
- 5 Endpoints
- 5.1 POST /account-requests
- 5.1.1.1 POST Account Request
- 5.1.2 Account Request Status
- 5.2 GET /account-requests/{AccountRequestId}
- 5.2.1.1 GET Account Request
- 5.2.2 Account Request Status
- 5.3 DELETE /account-requests/{AccountRequestId}
- 5.3.1 DELETE Account Request
- 5.4 GET Authorised Accounts
- 5.5 GET Resources for a Specific Account
- 5.6 GET Resources in Bulk
- 5.1 POST /account-requests
- 6 Security & Access Control
- 6.1 API Scopes
- 6.1.1 Scopes
- 6.2 Grants Types
- 6.3 Consent Authorisation
- 6.3.1 Consent Elements
- 6.3.1.1 Permissions
- 6.3.1.1.1 Reversing Entries
- 6.3.1.2 Expiration Date Time
- 6.3.1.3 Transaction To/From Date Time
- 6.3.1.1 Permissions
- 6.3.2 Account Request Status
- 6.3.3 Error Condition
- 6.3.4 Consent Revocation
- 6.3.5 Changes to Selected Account(s)
- 6.3.6 Handling Expired Access Tokens
- 6.3.1 Consent Elements
- 6.4 Risk Scoring Information
- 6.1 API Scopes
- 7 Swagger Specification
- 8 Data Model
- 8.1 High Level Payload Structure
- 8.1.1 Request Structure
- 8.1.1.1 Account API Request
- 8.1.2 Response Structure
- 8.1.2.1.1 Account API Response
- 8.1.2.2 Links
- 8.1.2.2.1 Example Links
- 8.1.2.3 Meta
- 8.1.2.3.1 Example Meta
- 8.1.2.3.2 Identifying Available Transaction Period
- 8.1.1 Request Structure
- 8.2 Data Payload - Consent Object
- 8.2.1 Account Requests - Request
- 8.2.1.1 UML Diagram
- 8.2.1.2 Data Dictionary
- 8.2.2 Account Requests - Response
- 8.2.2.1 UML Diagram
- 8.2.2.2 Data Dictionary
- 8.2.1 Account Requests - Request
- 8.3 Data Payload - Resources
- 8.3.1 Accounts
- 8.3.1.1 Resource Definition
- 8.3.1.2 UML Diagram
- 8.3.1.3 Data Dictionary
- 8.3.2 Balances
- 8.3.2.1 Resource Definition
- 8.3.2.2 UML Diagram
- 8.3.2.3 Data Dictionary
- 8.3.3 Beneficiaries
- 8.3.3.1 Resource Definition
- 8.3.3.2 UML Diagram
- 8.3.3.3 Data Dictionary
- 8.3.4 Direct Debits
- 8.3.4.1 Resource Definition
- 8.3.4.2 UML Diagram
- 8.3.4.3 Data Dictionary
- 8.3.5 Product
- 8.3.5.1 Resource Definition
- 8.3.5.2 UML Diagram
- 8.3.5.3 Data Dictionary
- 8.3.6 Standing Orders
- 8.3.6.1 Resource Definition
- 8.3.6.2 UML Diagram
- 8.3.6.3 Data Dictionary
- 8.3.7 Transactions
- 8.3.7.1 Resource Definition
- 8.3.7.2 UML Diagram
- 8.3.7.3 Data Dictionary
- 8.3.1 Accounts
- 8.4 Data Payload - Enumerations
- 8.5 Mapping to Schemes & Standards
- 8.5.1 ISO 20022
- 8.1 High Level Payload Structure
- 9 Usage Examples
- 9.1 All Permissions Granted
- 9.1.1 Setup Account Request
- 9.1.1.1 Request
- 9.1.1.1.1 Post Account Requests Request
- 9.1.1.2 Response
- 9.1.1.2.1 Post Account Requests Response
- 9.1.1.1 Request
- 9.1.2 Status - AwaitingAuthorisation
- 9.1.2.1 Request
- 9.1.2.1.1 Get Account Requests Request
- 9.1.2.2 Response
- 9.1.2.2.1 Get Account Requests Response
- 9.1.2.1 Request
- 9.1.3 Status - Authorised
- 9.1.3.1 Request
- 9.1.3.1.1 Get Account Requests Request
- 9.1.3.2 Response
- 9.1.3.2.1 Get Account Requests Response
- 9.1.3.1 Request
- 9.1.4 Accounts - Bulk
- 9.1.4.1 Request
- 9.1.4.1.1 Get Accounts Request
- 9.1.4.2 Response
- 9.1.4.2.1 Get Accounts Response
- 9.1.4.1 Request
- 9.1.5 Accounts - Specific Account
- 9.1.5.1 Request
- 9.1.5.1.1 Get Accounts Request
- 9.1.5.2 Response
- 9.1.5.2.1 Get Accounts Response
- 9.1.5.1 Request
- 9.1.6 Balances - Specific Account
- 9.1.6.1 Request
- 9.1.6.1.1 Get Account Balances Request
- 9.1.6.2 Response
- 9.1.6.2.1 Get Account Balances Response
- 9.1.6.1 Request
- 9.1.7 Balances - Bulk
- 9.1.7.1 Request
- 9.1.7.1.1 Get Balances Request
- 9.1.7.2 Response
- 9.1.7.2.1 Get Balances Response
- 9.1.7.1 Request
- 9.1.8 Beneficiaries - Specific Account
- 9.1.8.1 Request
- 9.1.8.1.1 Get Account Beneficiaries Request
- 9.1.8.2 Response
- 9.1.8.2.1 Get Account Beneficiaries Response
- 9.1.8.1 Request
- 9.1.9 Beneficiaries - Bulk
- 9.1.9.1 GET /beneficiaries
- 9.1.9.1.1 Get Beneficiaries Request
- 9.1.9.2 GET /beneficiaries Response
- 9.1.9.2.1 Get Beneficiaries Response
- 9.1.9.1 GET /beneficiaries
- 9.1.10 Direct Debits - Specific Account
- 9.1.10.1 Request
- 9.1.10.1.1 Get Accounts Direct Debits Request
- 9.1.10.2 Response
- 9.1.10.2.1 Get Accounts Direct Debits Response
- 9.1.10.1 Request
- 9.1.11 Direct Debits - Bulk
- 9.1.11.1 Request
- 9.1.11.1.1 Get Direct Debits Request
- 9.1.11.2 Response
- 9.1.11.2.1 Get Direct Debits Response
- 9.1.11.1 Request
- 9.1.12 Product - Specific Account
- 9.1.12.1 Request
- 9.1.12.1.1 Get Accounts Product Request
- 9.1.12.2 Response
- 9.1.12.2.1 Get Accounts Product Response
- 9.1.12.1 Request
- 9.1.13 Products - Bulk
- 9.1.13.1 Request
- 9.1.13.1.1 Get Products Request
- 9.1.13.2 Response
- 9.1.13.2.1 Get Products Response
- 9.1.13.1 Request
- 9.1.14 Standing Orders - Specific Account
- 9.1.14.1 Request
- 9.1.14.1.1 Get Accounts Standing Orders Request
- 9.1.14.2 Response
- 9.1.14.2.1 Get Accounts Standing Orders Response
- 9.1.14.1 Request
- 9.1.15 Standing Orders - Bulk
- 9.1.15.1 Request
- 9.1.15.1.1 Get Standing Orders Request
- 9.1.15.2 Response
- 9.1.15.2.1 Get Standing Orders Response
- 9.1.15.1 Request
- 9.1.16 Transactions - Specific Account
- 9.1.16.1 Request
- 9.1.16.1.1 Get Account Transactions Request
- 9.1.16.2 Response
- 9.1.16.2.1 Get Account Transactions Response
- 9.1.16.1 Request
- 9.1.17 Transactions - Bulk
- 9.1.17.1 Request
- 9.1.17.1.1 Get Transactions Request
- 9.1.17.2 Response
- 9.1.17.2.1 Get Transactions Response
- 9.1.17.1 Request
- 9.1.18 Delete Account Request
- 9.1.18.1 Request
- 9.1.18.1.1 Delete Account Requests Request
- 9.1.18.2 Response
- 9.1.18.2.1 Delete Account Requests Response
- 9.1.18.1 Request
- 9.1.1 Setup Account Request
- 9.2 Limited Permissions Granted
- 9.2.1 Setup Account Request
- 9.2.1.1 Request
- 9.2.1.1.1 Post Account Requests Request
- 9.2.1.2 Response
- 9.2.1.2.1 Post Account Requests Response
- 9.2.1.1 Request
- 9.2.2 Accounts - Bulk
- 9.2.2.1 Request
- 9.2.2.1.1 Get Accounts Request
- 9.2.2.2 Response
- 9.2.2.2.1 Get Accounts Response
- 9.2.2.1 Request
- 9.2.3 Balances - Specific Account
- 9.2.3.1 Request
- 9.2.3.1.1 Get Account Balances Request
- 9.2.3.2 Response
- 9.2.3.2.1 Get Account Balances Response
- 9.2.3.1 Request
- 9.2.4 Transactions - Specific Account
- 9.2.4.1 Request
- 9.2.4.1.1 GET Account Transactions Request
- 9.2.4.2 Response
- 9.2.4.2.1 GET Account Transactions Response
- 9.2.4.1 Request
- 9.2.1 Setup Account Request
- 9.3 Pagination
- 9.3.1 Request
- 9.3.1.1 Paginated Transaction Request
- 9.3.2 Paginated Resource Response
- 9.3.2.1 Paginated Transaction Response
- 9.3.3 Request Next Page of Results
- 9.3.4 Paginated Resource Response
- 9.3.4.1 Paginated Transaction Response
- 9.3.1 Request
- 9.4 Alternate and Error Flows
- 9.4.1 Missing or Expired Access Token
- 9.4.1.1 Missing or Expired Access Token
- 9.4.2 Incomplete or Malformed Request Payload
- 9.4.2.1 Incomplete or Malformed Request
- 9.4.3 Missing or Invalid Access Token Scope
- 9.4.4 Sudden Burst of API Requests
- 9.4.4.1 Sudden Burst of API Requests
- 9.4.5 Failed Authorisation Consent
- 9.4.5.1 Failed Authorization Consent
- 9.4.1 Missing or Expired Access Token
- 9.1 All Permissions Granted
Version Control
Version | Date | Author | Comments |
|---|---|---|---|
1.0.0 | 23 Jun 2017 | Open Banking Read/Write API Team | This is the Baseline version. No Changes from v1.0-rc4. |
1.1.0 | 31 Aug 2017 | Open Banking Read/Write API Team | Includes 9 fixes, 5 clarifications and 14 enhancements. Please see the release note for details. Changes from v1.1-rc2: More explicit wording around Non-Repudiation not to be implemented for v1.x |
Release Note
This release note explains what's new in The Account and Transaction API Specifications v1.1.0.
Fixes
In Accounts Transactions sequence diagram, removed Step 4 Request data response to the PSU.
Corrected the case for Links.First, Links.Last, Links.Next, Links.Prev, Links.Self and Meta.TotalPages (updated Basics/Pagination, Basics / Return & Error Codes / 400 (Bad Request) v/s 404 (Not Found), and Data Model / High Level Payload Structure / Response Structure).
Removed special characters in the Frequency field for Data Model / Data Payload - Resources / Standing Orders / Data Dictionary.
Corrected the Pattern for the ActiveOrHistoricCurrencyCode class from [A-Z]{3,3} to ^[A-Z]{3,3}$ to limit the field to 3 characters.
Corrected the Pattern for the CountryCode class to be specified as ^[A-Z]{2,2}$ instead of [A-Z]{2,2} to limit the field to 2 characters.
In Usage Examples, have corrected "AwaitingAuthentication" to "AwaitingAuthorisation"
Updated Usage Example for /products endpoint to align with Data Dictionary.
Updated Pagination Response JSON payload to correctly separate one of the JSON properties by inclusion of a comma.
Corrected a mis-spelling from "UFT-8" to "UTF-8".
Clarifications
Added details and updated examples on the various date formats used outside of the JSON payload (updated Examples, Basics / Date formats, and Basics / Non-repudiation / Process for signing a payload).
Clarified that Timezone offsets of -00:00 are not permitted in ISO-8601 (updated Examples, and all default dates in Data Model / Data payload - resources).
Clarified that all dates in HTTP headers are represented as RFC 7231 Full Dates. For example: Sun 3 Sep 2017 19:43:31 UTC
Clarified that a status of 403 should not be used to indicate a time-out of the access token, and that a 403 indicates that re-authentication of the PSU will not help.
Clarified that digital signatures must NOT be implemented for v1.x specification.
Enhancements
Metadata fields in the /transactions response now include an earliest available transaction date AND a latest available transaction date (updated Examples, Data Model / High Level Payload Structure / Response Structure / Meta, and default values specified in the Data Payload sections).
Added a new section to cater for reversals (Security & Access Control / Consent Authorization / Permissions / Reversing Entries).
Added a new section to specify the default character set as UTF-8 (Basics / Character Encoding).
All datetime fields returned by the API must have the Timezone specified (updated Examples and added a new section Basics / Date Format).
Specified min and max page sizes for pagination (updated section on Basics / Pagination).
Sort Code and Account Number are now stored in the Account identification section together (in the Identification field), and a new SchemeName has been created for SortCodeAccountNumber (updated Examples, Data Model / Data Payload - Resources / Accounts / Data Dictionary, Data Model / Data Payload - Resources / Beneficiaries / Data Dictionary, Data Model / Data Payload - Resources / Standing Orders / Data Dictionary, and Data Model / Data Payload - Enumerations).
Extended the Standing Order Frequency pattern to include weekends and clarified pattern description (updated Data Model / Data Payload - Resources / Standing Orders / Data Dictionary).
Changed the BankTransactionCode to be the ISO 20022 code description, with all delimiters removed (updated Data Model / Data Payload - Resources / Transactions).
Add a Retry-After header for the HTTP 429 Too Many Requests response (updated Basics / Return & Error Codes, Basics / Headers / Response Headers, and Alternate Error Flows showing 429 as an optional implementation).
Added 405 and 406 as status codes (updated section on Basics / Response Headers).
Added clarifications to the Pagination section to state that the self link must be included in the response (Updated section Basic / Pagination).
Added a section describing resource URL path structures.
Added regex pattern for all Amount based fields under the Data Model / Data Payload. Removed pattern definition TotalDigits: 18 FractionDigits: 5.
Swagger Specification updated to include the Swagger Specification version number in the base of the URL (i.e. linked to this Specification).
Overview
This specification describes the Account Information and Transaction API flows and payloads.
The API endpoints described here allow an AISP to:
Register an intent to retrieve account information by creating an "account request". This registers the data "permissions", expiration and transaction history timeframe the customer (PSU) has consented to provide to the AISP; and
Subsequently retrieve account and transaction data
Document Overview
This document consists of the following parts:
Overview: Provides an overview of the scope of the API and the key decisions and principles that contributed to the specification.
Basics: The section identifies the resources, operations that are permitted on those resources, and various special cases.
Security & Access Control: Specifies the means for AISPs and PSUs to authenticate themselves and provide consent.
Swagger Specifications: Provides links to the swagger specifications for the APIs.
Data Model: Describes the data model for the API payloads.
Usage Examples: Examples for normal flows, and alternate flows.
Design Principles
RESTful APIs
The API adheres to RESTful API concepts where possible and sensible to do so.
However, the priority is to have an API that is simple to understand and easy to use. In instances where following RESTful principles would be convoluted and complex, the principles have not been followed.
References:
The highest level Data Description Language used is the JSON Schema : http://json-schema.org/
Best Practice has also been taken from the Data Description Language for APIs; JSON API : http://jsonapi.org/
The Interface Description Language used is the Swagger Specification version 2.0 (also known as Open API) : http://swagger.io/ and
Standards
The OBIE principles for developing the new API standards:
OBIE will adopt existing standards where relevant/appropriate to minimise re-inventing the wheel.
The initial scope of these Standards is limited to current OBIE scope - i.e., meeting CMA remedies. However, the intention is that the scope of the Standards will extend to either include or align to initiatives to cover a wider scope (i.e., PSD2).
The Standards currently being reviewed include ISO20022, and FAPI.
OBIE will favour developer/user experience over and above adoption of existing Standards, in order to create a more future proof Standard.
OBIE will work with other relevant bodies to align with, contribute to and/or adopt other Standards work, especially relating to creation of Standards around APIs and JSON payloads
ISO 20022
The CMA Order requires the CMA9 Banks to be aligned with the Regulatory and Technical Standards (RTS) under PSD2.
A previous draft of the EBA RTS required that the interface "shall use ISO 20022 elements, components or approved message definitions". In keeping with that requirement, the API payloads are designed using the ISO 20022 message elements and components where available.
The principles we have applied to re-use of ISO message elements and components are:
Where relevant - the API payloads have been flattened so that they are more developer friendly. This has been a request from the developer community, and the stakeholders involved in the design workshop
Only elements that are required for the functioning of the API endpoint will be included in the API payload. API endpoints are defined for specific use-cases (not to be generically extensible for all use-cases). Hence - only elements that are required for the account and transaction information scope are included in the Account Information API payloads for v1.0 (as this is the agreed scope for our v1.0 specification).
We will modify ISO 20022 elements where the existing standard does not cater for an API context (such as filtering, pagination etc.). An example is having latitude and longitude in decimal format - as this is how developers will work with latitude and longitude; or using simple types (e.g., a single date-time field) instead of a complex type (e.g., a choice field with a nesting of date and time).
Extensibility
Version 1.0 of the API only caters to read access to account and transaction information for BCAs and PCAs.
However - where possible the APIs have been designed to be extensible - so they can in the future cover additional account types (e.g., card accounts) and operations (e.g., write access).
Idempotency
The Account Information and Transaction APIs will not be idempotent for v1.0.
Non-Repudiation
Important
API requests and responses MUST NOT be digitally signed for implementation of the v1.x specification.
This section is for future reference only.
Digital signatures will facilitate non-repudiation for Open Banking APIs.
However, the solution for digital signatures (if required in a future release) has been agreed and the approach required to achieve this is described in Basics / Non-repudiation.
Unique Identifiers (Id Fields)
A REST resource should have a unique identifier (e.g. a primary key) that can be used to identify the resource. These unique identifiers are used to construct URLs to identify and address specific resources.
However, considering that:
Some of the resources described in this specification do not have a primary key in the system of record.
For v1.0 it is not neccessary to individually address resources,
a decision has been made that Id fields will be specified for all resources - but be optional for all resources, except for the account resource.
The account resource needs to be addressed individually and must have a mandatory, unique and non-mutable identifier.
Scope
The APIs specified in this document provide the ability for AISPs to access a PSU's account and transaction information for domestic PCA and BCA accounts.
Out of Scope
This v1.0 specification does not cater for:
Write operations (the ability to create) standing orders, direct debits and beneficiaries.
Accounts other than PCAs and BCAs.
Progressive or changing consent - if the consent between the AISP and PSU changes, then the existing account-request object is deleted and a new account-request is created with the new consent/authorisation details.
The ability for the AISP to pre-specify the list of accounts that have been agreed with the PSU for consent/authorisation. At the time of writing the specification - it is not clear from a Legal perspective how the changing of these details over time (e.g, customers adding or deleting accounts) affects the original agreed authorisation.
The ability for the AISP to specify and "hints" for the types of accounts that have been agreed with the PSU for consent/authorisation (e.g., product or customer channel types). At the time of writing the specification - it is not clear from a Legal perspective how the changing of these details over time affects the original agreed authorisation.
Multi-authentication flows have been designed - but the full implications of the multi-authentication flows have not been worked through - so these are are not in the v1.0 specification.
Non-functional requirements and specification of caching and throttling.
Basics
Overview
The figure below provides a general outline of a account information requests and flow using the Account Info APIs.
Steps
Step 1: Request Account Information
This flow begins with a PSU consenting to allow an AISP to access account information data.
Step 2: Setup Account Request
The AISP connects to the ASPSP that services the PSU's account(s) and creates an account-request resource. This informs the ASPSP that one of its PSUs is granting access to account and transaction information to an AISP. The ASPSP responds with an identifier for the resource (the AccountRequestId - which is the intent identifier).
This step is carried out by making a POST request to /account-requests endpoint
The setup payload will include these fields - which describe the data that the PSU has consented with the AISP:
Permissions - a list of data clusters that have been consented for access
Expiration Date - an optional expiration for when the AISP will no longer have access to the PSU's data
Transaction Validity Period - the From/To date range which specifies a transaction history period which can be accessed by the AISP
An AISP may be a broker for data to other 4th parties, and so it is valid for a customer to have multiple account-requests for the same accounts, with different consent/authorisation parameters agreed.
Step 3: Authorise Consent
The AISP redirects the PSU to the ASPSP. The redirect includes the AccountRequestId generated in the previous step. This allows the ASPSP to correlate the account-request that was setup. The ASPSP authenticates the PSU. The ASPSP updates the state of the account-request resource internally to indicate that the account request has been authorised.
The principle we have agreed is that consent is managed between the PSU and the AISP - so the account-request details cannot be changed (with the ASPSP) in this step. The PSU will only be able to authorise or reject the account-request details in its entirety.
During authorisation - the PSU selects accounts that are authorised for the AISP request (in the ASPSP's banking interface)
The PSU is redirected back to the AISP.
Step 4: Request Data
This is carried out by making a GET request the relevant resource.
The unique AccountId(s) that are valid for the account-request will be returned with a call to GET /accounts. This will always be the first call once an AISP has a valid access token.
Sequence Diagram
Account Info - High Level Flow
participant PSU
participant AISP
participant ASPSP Authorisation Server
participant ASPSP Resource Server
note over PSU, ASPSP Resource Server
Step 1: Request account information
end note
PSU -> AISP: Get account/transaction information
note over PSU, ASPSP Resource Server
Step 2: Setup account request
end note
AISP <-> ASPSP Authorisation Server: Establish TLS 1.2 MA
AISP -> ASPSP Authorisation Server: Initiate Client Credentials Grant
ASPSP Authorisation Server -> AISP: access-token
AISP <-> ASPSP Resource Server: Establish TLS 1.2 MA
AISP -> ASPSP Resource Server: POST /account-requests
ASPSP Resource Server -> AISP: HTTP 201 (Created), AccountRequestId
AISP -> PSU: HTTP 302 (Found), Redirect (AccountRequestId)
note over PSU, ASPSP Resource Server
Step 3: Authorise consent
end note
PSU -> ASPSP Authorisation Server: Follow redirect (AccountRequestId)
PSU <-> ASPSP Authorisation Server: authenticate
PSU <-> ASPSP Authorisation Server: SCA if required
PSU <-> ASPSP Authorisation Server: select accounts
ASPSP Authorisation Server -> PSU: HTTP 302 (Found), Redirect (authorization-code)
PSU -> AISP: Follow redirect (authorization-code)
AISP <-> ASPSP Authorisation Server: Establish TLS 1.2 MA
AISP -> ASPSP Authorisation Server: Exchange authorization-code for access token
ASPSP Authorisation Server -> AISP: access-token
note over PSU, ASPSP Resource Server
Step 4: Request data
end note
AISP <-> ASPSP Resource Server: Establish TLS 1.2 MA
AISP -> ASPSP Resource Server: GET /accounts
ASPSP Resource Server -> AISP: HTTP 200 (OK), List of accounts containing AccountId(s)
AISP -> ASPSP Resource Server: GET /accounts/{AccountId}/transactions
ASPSP Resource Server -> AISP: HTTP 200 (OK), List of transactions
Actors
Actor | Abbreviation | Type | Specializes | Description |
|---|---|---|---|---|
Payment Service User | PSU | Person | N/A | A natural or legal person making use of a payment service as a payee, payer or both (PSD2 Article 4(10)) |
Payment Service Provider | PSP | Legal Entity | N/A | A legal entity (and some natural persons) that provide payment services as defined by PSD2 Article 4(11) |
Account Servicing Payment Service Provider | ASPSP | Legal Entity | PSP | An ASPSP is a PSP that provides and maintains a payment account for a payment services user (PSD 2 Article 4(15). The CMA 9 are all ASPSPs. |
Third Party Providers / Trusted Third Parties | TPP | Legal Entity | PSP | A party other than an ASPSP that provides payment related services. The term is not actually defined in PSD2, but is generally deemed to include all payment service providers that are 3rd parties (the ASPSP and the PSU to whom the account belongs being the first two parties) |
Payment Initiation Service Provider | PISP | Legal Entity | TPP | A TPP that provides Payment Initiation Services. PSD2 does not offer a formal definition. Article 4(18) quite circularly defines a PISP as a PSP that provides Payment Initiation Services. |
Account Information Service Provider | AISP | Legal Entity | TPP | A TPP that provides Account Information Services. Again, PSD2 defines AISPs in Article 4(19) circularly as a PSP that provides account information services |
Character Encoding
The API requests and responses must use a UTF-8 character encoding. This is the default character encoding for JSON (RFC 7158 - Section 8.1).
However, an ASPSP's downstream system may not accept some UTF-8 characters, such as emoji characters (e.g. "Happy Birthday 🎂🎂!" may not be an acceptable Payment Reference). If the ASPSP rejects the message with a UTF-8 character that cannot be processed, the ASPSP should respond with an HTTP 400 (Bad Request) status code.
Date Formats
All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below:
2017-04-05T10:43:07+00:00
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below:
Sun, 10 Sep 2017 19:43:31 UTC
JWT claims are expressed as a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.
Resource URI Path Structure
The resources defined by these APIs can be addressed through a path structure consisting of the following parts:
An optional ASPSP specific path prefix
The constant string "open-banking"
The version of the APIs expressed as /v[major-version].[minor-version]/
The resource name
Examples:
/superbank/open-banking/v1.1/payments/open-banking/v1.0/payments/apis/open-banking/v1.1/payments
Headers
Request Headers
The following headers SHOULD be inserted by the TPP in each API call:
Header Value | Notes | POST | GET | DELETE |
|---|---|---|---|---|
x-fapi-financial-id | The unique id of the ASPSP to which the request is issued. The unique id will be issued by OB. | Mandatory | Mandatory | Mandatory |
x-fapi-customer-last-logged-time | The time when the PSU last logged in with the TPP. | Optional | Optional | Optional |
x-fapi-customer-ip-address | The PSU's IP address if the PSU is currently logged in with the TPP. | Optional | Optional | Optional |
x-fapi-interaction-id | An RFC4122 UID used as a correlation id. If provided, the ASPSP must "play back" this value in the x-fapi-interaction-id response header. | Optional | Optional | Optional |
Authorization | Standard HTTP Header; Allows Credentials to be provided to the Authorisation / Resource Server depending on the type of resource being requested. For OAuth 2.0 / OIDC, this comprises of either the Basic / Bearer Authentication Schemes. | Mandatory | Mandatory | Mandatory |
Content-Type | Standard HTTP Header; Represents the format of the payload being provided in the request. This must be set to application/json. | Mandatory | Do not use | Do not use |
Accept | Standard HTTP Header; Determine the Content-Type that is required from the Server. If set, it must have the value application/json. If set to any other value, ASPSP must respond with a 406 Not Acceptable. | Optional | Optional | Optional |
x-jws-signature | Header containing a detached JWS signature of the body of the payload. Mandatory for requests that contain a payload. A policy decision is under consideration on whether API requests and responses will be digitally signed to provide a simpler means of non-repudiation. This header will only be applicable if the policy decision is to implement non-repudiation through digital signatures. | Not for v1.x | Not for v1.x | Not for v1.x |
(Reference: Section 6.3 - Financial API — Part 1: Read Only API Security Profile (Implementer’s Draft).)
Whether the PSU is present or not-present is identified via the x-fapi-customer-ip-address header. If the PSU IP address is supplied, it is inferred that the PSU is present during the interaction.
The implications to this are:
ASPSPs will need to rely on AISPs assertion.
As agreed at TDA (18/05) It will be up to the ASPSPs to interpret the 4-times customer not present rule - to be within the “spirit” of the RTS requirement.
This is dependent on GDPR considerations on the AISP passing a PSU's IP address to an ASPSP.
Response Headers
Header Value | Notes | Mandatory ? |
|---|---|---|
Content-Type | Standard HTTP Header; Represents the format of the payload returned in the response. The ASPSP must return Content-type: application/json as a content header in response to requests that return a HTTP body (all post and get requests) | Conditionally Mandatory |
x-jws-signature | Header containing a detached JWS signature of the body of the payload. Mandatory for requests that contain a payload. A policy decision is under consideration on whether API requests and responses will be digitally signed to provide a simpler means of non-repudiation. This header will only be applicable if the policy decision is to implement non-repudiation through digital signatures. | Not for v1.x |
x-fapi-interaction-id | An RFC4122 UID used as a correlation id. This must be the same value provided in the x-fapi-interaction-id request header. Mandatory if provided in the request. | Conditionally Mandatory |
Retry-After
| Header indicating the time (in seconds) that the TPP should wait before retrying an operation. The ASPSP should include this header along with responses with the HTTP status code of 429 (Too many requests). | Optional |
Return & Error Codes
The following are the HTTP response codes for the different HTTP methods - across all Account Info API endpoints.
Situation | HTTP Status | Notes | Returned by POST | Returned by GET | Returned by DELETE |
|---|---|---|---|---|---|
Query completed successfully | 200 OK |
| No | Yes | No |
Normal execution. The request has succeeded. | 201 Created | The operation results in the creation of a new resource. | Yes | No | No |
Delete operation completed successfully | 204 No Content |
| No | No | Yes |
Account Request has malformed, missing or non-compliant JSON body or URL parameters | 400 Bad Request | The requested operation will not be carried out. | Yes | No | No |
Authorization header missing or invalid token | 401 Unauthorized | The operation was refused access. Re-authenticating the PSU may result in an appropriate token that can be used. | Yes | Yes | Yes |
Token has incorrect scope or a security policy was violated. | 403 Forbidden | The operation was refused access. Re-authenticating the PSU is unlikely to remediate the situation. | Yes |
© Open Banking Limited 2019 | https://www.openbanking.org.uk/open-licence | https://www.openbanking.org.uk