Version Control
Version | Date | Author | Comments |
---|---|---|---|
1.0.0 | 01 March 2019 | Payments NZ API Working Group | Transactions specifications |
Endpoints
Endpoints for the resource - and available methods.
Resource | HTTP Operation | Endpoint | Mandatory? | Scope | Grant Type | Idempotent | Parameters | Request Object | Response Object | |
---|---|---|---|---|---|---|---|---|---|---|
1 | scheduled-payments | GET | GET /accounts/{AccountId}/scheduled-payments | Optional | accounts | Authorization Code | OBReadScheduledPayment1 | |||
2 | scheduled-payments | GET | GET /scheduled-payments | Optional | accounts | Authorization Code | Pagination | OBReadScheduledPayment1 |
GET /accounts/{AccountId}/scheduled-payments
An API Provider may provide this endpoint for Third Parties to retrieve the scheduled-payments for a specific AccountId (which is retrieved in the call to GET /accounts).
GET /scheduled-payments
If an API Provider has implemented the bulk retrieval endpoints - a Third Party may optionally retrieve the scheduled-payments resources in bulk.
This will retrieve the scheduled-payments resources for all authorised accounts linked to the account-request.
Data Model
Resource Definition
A resource that contains a set of elements that describes the scheduled payments that have been set up on a specific account (AccountId). A scheduled payment is a single one-off payment scheduled for a future date.
An account (AccountId) may have no scheduled payments set up, or may have multiple scheduled payments set up.
UML Diagram
Notes:
- The Account and CreditorAccount blocks replicate what is used consistently throughout the Account Information APIs to identify an account.
- For the /accounts/{AccountId}/scheduled-payments endpoint - the Account and CreditorAccount blocks represent the account that is receiving funds (so has been named the CreditorAccount - for consistency with the PISP use case).
- A DateTime element has been used - so that there is consistency across all API endpoints using dates. 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 Amount elements all have embedded Currency elements - for consistency is ISO 20022, and across the other API endpoints
Permission Codes
The resource differs depending on the permissions (ReadScheduledPaymentsBasic and ReadScheduledPaymentsDetail) used to access resource. In the event the resource is accessed with both ReadScheduledPaymentsBasic and ReadScheduledPaymentsDetail, the most detailed level (ReadScheduledPaymentsDetail) must be used.
- These objects must not be returned without the ReadScheduledPaymentsDetail permission:
- OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAgent
- OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount
- If the ReadScheduledPaymentsDetail is granted by the PSU:
- OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAgent may be returned if applicable to the account and API Provider (0..1)
- OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount must be returned (1..1)
Data Dictionary
Name | Occurrence | XPath | EnhancedDefinition | Class | Codes | Pattern |
---|---|---|---|---|---|---|
OBReadScheduledPayment1 | OBReadScheduledPayment1 | OBReadScheduledPayment1 | ||||
Data | 1..1 | OBReadScheduledPayment1/Data | OBReadDataScheduledPayment1 | |||
ScheduledPayment | 0..n | OBReadScheduledPayment1/Data/ScheduledPayment | OBScheduledPayment1 | |||
AccountId | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/AccountId | A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner. | Max40Text | ||
ScheduledPaymentId | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/ScheduledPaymentId | A unique and immutable identifier used to identify the scheduled payment resource. This identifier has no meaning to the account owner. | Max40Text | ||
ScheduledPaymentDateTime | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/ScheduledPaymentDateTime | The date on which the scheduled payment will be made. | ISODateTime | ||
ScheduledType | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/ScheduledType | Specifies the scheduled payment date type requested | OBExternalScheduleType1Code | Arrival Execution | |
InstructedAmount | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/InstructedAmount | Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party. Usage: This amount has to be transported unchanged through the transaction chain. | OBActiveOrHistoricCurrencyAndAmount | ||
Amount | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/InstructedAmount/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 | OBReadScheduledPayment1/Data/ScheduledPayment/InstructedAmount/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}$ | |
Reference | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference | Remittance information for use with BECSElectronicCredit payment scheme. | NZBECSRemittance1 | ||
CreditorName | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/CreditorName | The Creditor's Name. | Max20Text | ||
DebtorName | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/DebtorName | The Debtor's Name. | Max20Text | ||
CreditorReference | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/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 | OBReadScheduledPayment1/Data/ScheduledPayment/Reference/DebtorReference/Reference | Reference information, as assigned by the debtor, which when combined with Particulars and Code, unambiguously refer to the payment transaction. | Max12Text | ||
CreditorAgent | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAgent | Party that manages the account on behalf of the account owner, that is manages the registration and booking of entries on the account, calculates balances on the account and provides information about the account. This is the servicer of the beneficiary account. | OBBranchAndFinancialInstitutionIdentification2 | ||
SchemeName | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAgent/SchemeName | Name of the identification scheme, in a coded form as published in an external list. | OBExternalFinancialInstitutionIdentification2Code | BICFI | |
Identification | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAgent/Identification | Unique and unambiguous identification of the servicing institution. | Max35Text | ||
CreditorAccount | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount | Provides the details to identify the beneficiary account. | OBCashAccount1 | ||
SchemeName | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount/SchemeName | Name of the identification scheme, in a coded form as published in an external list. | OBExternalAccountIdentification2Code | BECSElectronicCredit | |
Identification | 1..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount/Identification | Beneficiary account identification. | Max34Text | ||
Name | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount/Name | Name of the account, as assigned by the account servicing institution, in agreement with the account owner in order to provide an additional means of identification of the account. Usage: The account name is different from the account owner name. The account name is used in certain user communities to provide a means of identifying the account, in addition to the account owner's identity and the account number. | Max70Text | ||
SecondaryIdentification | 0..1 | OBReadScheduledPayment1/Data/ScheduledPayment/CreditorAccount/SecondaryIdentification | This is secondary identification of the account, as assigned by the account servicing institution. This can be used by building societies to additionally identify accounts with a roll number (in addition to a sort code and account number combination). | Max34Text |
Enumerations
This section gives the definitions for enumerations used.
Code Class | Name | Definition |
---|---|---|
OBExternalAccountIdentification2Code | BECSElectronicCredit | BECS Electronic Credit - identifier scheme used in NZ by financial institutions to identify the account of a customer. The identifier is bank-branch-account-suffix. The regular expression for this identifier is: ^[0-9]{2}-[0-9]{4}-[0-9]{7}-[0-9]{2}$ |
OBExternalFinancialInstitutionIdentification2Code | BICFI | Valid BICs for financial institutions are registered by the ISO 9362 Registration Authority in the BIC directory, and consist of eight (8) or eleven (11) contiguous characters. |
OBExternalScheduleType1Code | Execution | Scheduled payment date is specified as the execution date. |
OBExternalScheduleType1Code | Arrival | Scheduled payment date is specified as the arrival date for the recipient. |
Usage Examples
Specific Account
Request
GET /accounts/22289/scheduled-payments HTTP/1.1 Authorization: Bearer Az90SAOJklae x-fapi-financial-id: OB/2017/001 x-fapi-customer-last-logged-time: 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
HTTP/1.1 200 OK x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d Content-Type: application/json { "Data": { "ScheduledPayment": [ { "AccountId": "22289", "ScheduledPaymentId": "SP03", "ScheduledPaymentDateTime": "2017-05-05T00:00:00+00:00", "ScheduledType": "Execution", "InstructedAmount": { "Amount": "10.00", "Currency": "NZD" }, "CreditorAccount": { "SchemeName": "BECSElectronicCredit", "Identification": "01-0101-0123456-00", "Name": "Mr Tee" } } ] }, "Links": { "Self": "https://api.examplebank.co.nz/open-banking-nz/v1.0/accounts/22289/scheduled-payments/" }, "Meta": { "TotalPages": 1 } }
Bulk
Request
GET /scheduled-payments HTTP/1.1 Authorization: Bearer Az90SAOJklae x-fapi-financial-id: OB/2017/001 x-fapi-customer-last-logged-time: 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
HTTP/1.1 200 OK x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d Content-Type: application/json { "Data": { "ScheduledPayment": [ { "AccountId": "22289", "ScheduledPaymentId": "SP03", "ScheduledPaymentDateTime": "2017-05-05T00:00:00+00:00", "ScheduledType": "Execution", "InstructedAmount": { "Amount": "10.00", "Currency": "NZD" }, "CreditorAccount": { "SchemeName": "BECSElectronicCredit", "Identification": "01-0101-0123456-00", "Name": "Mr Tee" } }, { "AccountId": "39570", "ScheduledPaymentId": "SP77", "ScheduledPaymentDateTime": "2017-04-05T00:00:00+00:00", "ScheduledType": "Execution", "InstructedAmount": { "Amount": "12.00", "Currency": "NZD" }, "CreditorAccount": { "SchemeName": "BECSElectronicCredit", "Identification": "01-0101-0123456-00", "Name": "Mr Tee" } } ] }, "Links": { "Self": "https://api.examplebank.co.nz/open-banking-nz/v1.0/scheduled-payments/" }, "Meta": { "TotalPages": 1 } }