Skip to content

List of Accounts

GET
/api/v2/accounts
Code sample: Shell / cURL
curl --request GET \
--url https://api.ztlpay.io/api/v2/accounts \
--header 'Authorization: Bearer <token>' \
--header 'PSU-IP-Address: 192.158.1.38' \
--header 'PSU-User-Agent: Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/63.0' \
--header 'consent-id: 3a797348-ef0c-4f52-b821-fdfcdb98c4d9'

Retrieve a list and general information about the account or accounts specified in the authorized account query.

consent-id
required
string format: uuid
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

A valid consentId

PSU-IP-Address
string
Example
192.158.1.38

AAA IP Address of the end-user initiating the payment. DO NOT use any other IP address than what you can collect from the current user session that uses your system (don’t use something stored in your DB). This information is used by the banks to manage traffic and handle security.

PSU-User-Agent
string

The forwarded Agent header field of the HTTP request between PSU and TPP.

Example
Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/63.0

Successfully fetched accounts

Media typeapplication/json
object
accounts
Array<object>
object
id
required

Unique Identifier for Account provided by Bank. This id should be used as reference for other endpoints under account services. Note: Two consents can have different id for same account

string
name

Name of the account

string
bic

Identifier code for the accounts bank

string
bban

Account number in BBAN format

string format: bban
iban
required

Account number in IBAN format

string format: iban
country

Required for BBAN accounts

string
type

Type of account, value is different depending on bank

string
currency
required

Account currency

string format: iso-4217
ownerName

The name of the Account Owner. This information is not available for all banks

string
Example
{
"accounts": [
{
"id": "11ab5740-f8f5-1234-abcd-b90e4253b7b8",
"name": "Main savings account",
"bic": "DNBANOKK",
"bban": "12043175449",
"iban": "NO0812043175449",
"country": "NO",
"type": "Debit",
"currency": "NOK"
}
]
}

Bad Request

Media typeapplication/json
object
failure
  • INVALID_CONSENT Consent is invalid
  • INVALID_ACCOUNT Account is either missing or invalid
  • ACCESS_DENIED PSU is not allowed to access resource
string
Allowed values: INVALID_CONSENT INVALID_ACCOUNT ACCESS_DENIED
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"failure": "INVALID_CONSENT",
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

Forbidden

Media typeapplication/json
object
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

Not found

Media typeapplication/json
object
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

Conflict

Media typeapplication/json
object
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

Internal server error

Media typeapplication/json
object
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9

Service unavailable

Media typeapplication/json
object
ztlRequestId
required

Unique RequestId, please provide this Id in case of support requests

string format: uuid
message
required

The underlying reason for the error

string
Example
{
"ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9",
"message": "Invalid account"
}
ztl-request-id
string format: uuid

Unique RequestId, please provide this Id in case of support requests

Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9