Transactions v3.0.1

Transactions v3.0.1

Version Control

 

Version

Date

Author

Comments

Version

Date

Author

Comments

3.0.0-draft1

May 3, 2022

Payments NZ API Working Group

Baseline

3.0.0-draft1

 

 

Jun 26, 2022

 

 

@Gavin Wong (Unlicensed)

 

Updates to Accounts:

 

3.0.0-draft2

Jan 17, 2023

@Nigel Somerfield

Baseline for v3.0.0-draft2

3.0.0-draft2

Apr 6, 2023

@Nigel Somerfield

Updated length of resource Id fields from 40 to 128 characters as agreed in https://paymentsnz.atlassian.net/wiki/spaces/PaymentsDirectionAPIStandardsDevelopment/pages/1610940428

3.0.0-rc1

May 5, 2023

@Nigel Somerfield

Baselined for release candidate 1

Updated PhoneNumber (used in Phone and Mobile date fields) regular expression as per https://paymentsnz.atlassian.net/wiki/spaces/PaymentsDirectionAPIStandardsDevelopment/pages/1616445441

3.0.0-rc1

Jun 16, 2023

@Nigel Somerfield

Corrected Account examples to match the enumerated values for AccountSubType

3.0.0-rc2

Sep 12, 2023

@Nigel Somerfield

Baseline for v3.0.0-rc2

3.0.0-rc2

Sep 25, 2023

@Nigel Somerfield

Updated:

  • Transactions link to ISO External Code Sets (used in BankTransactionCode)

  • Filtering guidance when filter dates partially overlap consent transaction date range

3.0.0-rc2

Oct 9, 2023

@Nigel Somerfield

Updated:

3.0.0

Nov 13, 2023

@Nigel Somerfield

Version 3.0.0 baseline release

3.0.0

Jan 31, 2024

@Nigel Somerfield

Updated to reflect OpenAPI release in Github (pull request merge)

3.0.1

Jun 6, 2024

@Nigel Somerfield

Patch update to clarify the explanation of BookingDateTime:

  • The BookingDateTime is the date the transaction is booked (or posted)
    and becomes immutable - which is not the date the transaction took place

was replaced with:

  • The BookingDateTime is the date the transaction is booked (or posted)
    and becomes immutable - which is not necessarily the date the transaction
    took place

Definition

A resource that describes a posting to an account that results in an increase or decrease to a balance.

For a specific date range - an account (AccountId) may have no transactions booked, or may have multiple transactions booked.

Endpoints

Resource



Endpoint

Mandatory?

Scope

Grant Type

Idempotency Key

Parameters

Request Object

Response Object

Resource



Endpoint

Mandatory?

Scope

Grant Type

Idempotency Key

Parameters

Request Object

Response Object

transactions

GET

GET /accounts/{AccountId}/transactions

Mandatory

accounts

Redirect Flow; or

Decoupled Flow

No

Pagination

Filtering



OBReadTransaction2

transactions

GET

GET /transactions

Optional

accounts

Redirect Flow; or

Decoupled Flow

No

Pagination

Filtering



OBReadTransaction2

GET /accounts/{AccountId}/transactions

The API endpoint allows a Third Party to retrieve the transactions 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 /transactions

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

  • 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 transactions for all accounts linked to the account-access-consent.

Data Model

The OBReadTransaction2 object will be used for the call to:

  • GET /accounts/{AccountId}/transactions

  • GET /transactions

UML Diagram

Notes

  • The use of the term "Transaction" has been made consistently in the Transaction endpoint payload (instead of "Entry" which is the ISO20022 element name)

  • 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

  • The BookingDateTime has been set to mandatory - as all API Providers must provide this field for pagination and filtering. The BookingDateTime is the date the transaction is booked (or posted) and becomes immutable - which is not necessarily the date the transaction took place.

  • Either the BankTransactionCode (which is the ISO transaction code list), or ProprietaryBankTransactionCode, or both may be populated. While the expectation is that at least one of BankTransactionCode or ProprietaryBankTransactionCode are populated - we have decided not to enforce this behaviour in the payload structure - as this would require nesting elements, and introducing complex choice elements.

  • The BankTransactionCode (ISO) code-list is documented on the ISO20022 website: https://www.iso20022.org/external_code_list.page; and External Code Sets spreadsheet.

    • The ISO 20022 BankTransactionCode Code and SubCode are specified as a 4 letter codes. However - the principle we have applied for the code lists is to have longer more descriptive codes.

    • The BankTransactionCode Code and SubCode will be populated with the long form description of the ISO 20022 code, with delimiters removed. E.g., the Family Code "CNTR" has a description of "Counter Transactions" which is populated as "CounterTransactions"

  • API Providers must have the ability to provide transactions through APIs for a period that at least equals the period provided through their online channels.

Filtering

Limited support for filtering is provided on the transactions resource.

Name

Occurrence

Enhanced Definition

Class

Name

Occurrence

Enhanced Definition

Class

fromBookingDateTime

0..1

Specifies start date and time for filtering of the Transaction records on the Transaction/BookingDateTime field

ISODateTime

toBookingDateTime

0..1

Specifies end date and time for filtering of the Transaction records on the Transaction/BookingDateTime field.

ISODateTime

The API Provider must treat the following as valid input:

  • Non-working days (e.g. a Sunday or a Public holiday) or any other days on which no transactions are recorded

  • Dates that fall outside the range for which transaction information is provided through APIs

  • Dates that fall outside the range for which a consent authorisation is available

  • Timezone may be included in the filter request - but must be ignored by the API Provider

In the above situations, the API Provider must return data for the remaining valid period specified by the filter.

When the requested date range filter only partially overlaps with the TransactionFromDateTime and TransactionToDateTime agreed in the corresponding consent, then only the transactions from the overlapping date range are returned.

Filtering Examples

Example transaction requests:

// All transactions from 1st Jan, 2015 GET /transactions?fromBookingDateTime=2015-01-01T00:00:00 // All transactions in 2016 GET /transactions?fromBookingDateTime=2016-01-01T00:00:00&toBookingDateTime=2016-12-31T23:59:59 // All transactions in a specific account up to 31-Mar-2017 GET /accounts/1/transactions?toBookingDateTime=2017-03-31T23:59:59

Example handling of requests with filters that partially overlap consent date range:

  • Given an account access consent with date range for transactions from 1/01/2023 to 31/03/2023

  • And the requested filter date range is from 1/03/2023 to 30/06/2023

  • The result includes transactions from 1/03/2023 to 31/03/2023 only.

Permission Codes

The resource response differs depending on the permissions (ReadTransactionsBasic and ReadTransactionsDetail) used to access the resource. In the event the resource is accessed with both ReadTransactionsBasic and ReadTransactionsDetail, the most detailed level (ReadTransactionsDetail) must be used.

  • These objects must not be returned without the ReadTransactionsDetail permission:

    • OBReadTransaction2/Data/Transaction/TransactionInformation

    • OBReadTransaction2/Data/Transaction/Balance

    • OBReadTransaction2/Data/Transaction/MerchantDetails

    • OBReadTransaction2/Data/Transaction/CreditorAccount

    • OBReadTransaction2/Data/Transaction/DebtorAccount

    • OBReadTransaction2/Data/Transaction/CreditorAgent

    • OBReadTransaction2/Data/Transaction/DebtorAgent

  • If the ReadTransactionsDetail is granted by the Customer:

    • OBReadTransaction2/Data/Transaction/TransactionInformation may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/Balance may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/MerchantDetails may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/CreditorAccount may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/DebtorAccount may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/CreditorAgent may be returned if applicable to the transaction and API Provider (0..1)

    • OBReadTransaction2/Data/Transaction/DebtorAgent may be returned if applicable to the transaction and API Provider (0..1)

Data Dictionary

Name

Occurrence

XPath

EnhancedDefinition

Class

Codes

Pattern

Name

Occurrence

XPath

EnhancedDefinition

Class

Codes

Pattern

OBReadTransaction2



OBReadTransaction2



OBReadTransaction2





Data

1..1

OBReadTransaction2/Data



OBReadDataTransaction2





Transaction

0..n

OBReadTransaction2/Data/Transaction



OBTransaction2





AccountId

1..1

OBReadTransaction2/Data/Transaction/AccountId

A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner.

Max128Text





TransactionId

0..1

OBReadTransaction2/Data/Transaction/TransactionId

Unique identifier for the transaction within an servicing institution. This identifier is both unique and immutable.

Max128Text





StatementReference

0..n

OBReadTransaction2/Data/Transaction/StatementReference

Unique reference for the statement. This reference may be optionally populated if available.

Max35Text





CreditDebitIndicator

1..1

OBReadTransaction2/Data/Transaction/CreditDebitIndicator

Indicates whether the transaction is a credit or a debit entry.

OBCreditDebitCode

Credit
Debit



Status

1..1

OBReadTransaction2/Data/Transaction/Status

Status of a transaction entry on the books of the account servicer.

OBEntryStatus1Code

Booked
Pending



BookingDateTime

1..1

OBReadTransaction2/Data/Transaction/BookingDateTime

Date and time when a transaction entry is posted to an account on the account servicer's books.

Usage: Booking date is the expected booking date, unless the status is booked, in which case it is the actual booking date.

ISODateTime





ValueDateTime

0..1

OBReadTransaction2/Data/Transaction/ValueDateTime

Date and time at which assets become available to the account owner in case of a credit entry, or cease to be available to the account owner in case of a debit transaction entry.
Usage: If transaction entry status is pending and value date is present, then the value date refers to an expected/requested value date.
For transaction entries subject to availability/float and for which availability information is provided, the value date must not be used. In this case the availability component identifies the number of availability days.

ISODateTime





TransactionInformation

0..1

OBReadTransaction2/Data/Transaction/TransactionInformation

Further details of the transaction.
This is the transaction narrative, which is unstructured text.

Max500Text





AddressLine

0..1

OBReadTransaction2/Data/Transaction/AddressLine

Information that locates and identifies a specific address for a transaction entry, that is presented in free format text.

Max70Text





Amount

1..1

OBReadTransaction2/Data/Transaction/Amount

Amount of money in the cash transaction entry.

OBActiveOrHistoricCurrencyAndAmount





Amount

1..1

OBReadTransaction2/Data/Transaction/Amount/Amount

A 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}$

Currency

1..1

OBReadTransaction2/Data/Transaction/Amount/Currency

A 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}$

TransactionReference

0..1

OBReadTransaction2/Data/Transaction/TransactionReference

Remittance information for use with BECSElectronicCredit payment scheme.

NZBECSRemittance1





CreditorName

1..1

OBReadTransaction2/Data/Transaction/TransactionReference/CreditorName

The Creditor's Name.

Max20Text





DebtorName

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/DebtorName

The Debtor's Name.

Max20Text





CreditorReference

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/CreditorReference

Information supplied to enable the reconciling of the payment with the items that the transfer is intended to settle, such as commercial invoices in an accounts' receivable system.

NZBECSReference1





Particulars

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/CreditorReference/Particulars

Reference information, as assigned by the debtor, which when combined with Code and Reference, unambiguously refer to the payment transaction.

Max12Text





Code

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/CreditorReference/Code

Reference information, as assigned by the debtor, which when combined with Particulars and Reference, unambiguously refer to the payment transaction.

Max12Text





Reference

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/CreditorReference/Reference

Reference information, as assigned by the debtor, which when combined with Particulars and Code, unambiguously refer to the payment transaction.

Max12Text





DebtorReference

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/DebtorReference

Information supplied to enable the reconciling of the payment with the items that the transfer is intended to settle, such as commercial invoices in an accounts' receivable system.

NZBECSReference1





Particulars

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/DebtorReference/Particulars

Reference information, as assigned by the debtor, which when combined with Code and Reference, unambiguously refer to the payment transaction.

Max12Text





Code

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/DebtorReference/Code

Reference information, as assigned by the debtor, which when combined with Particulars and Reference, unambiguously refer to the payment transaction.

Max12Text





Reference

0..1

OBReadTransaction2/Data/Transaction/TransactionReference/DebtorReference/Reference

Reference information, as assigned by the debtor, which when combined with Particulars and Code, unambiguously refer to the payment transaction.

Max12Text





BankTransactionCode

0..1

OBReadTransaction2/Data/Transaction/BankTransactionCode

Set of elements used to fully identify the type of underlying transaction resulting in an entry.

OBBankTransactionCodeStructure1