Accounts

Given a user’s online banking credentials, the Accounts Service retrieves information about the associated accounts.

sequenceDiagram actor User participant YAXI participant Your Backend participant Bank User->>+Your Backend: Ticket request Your Backend-->>User: Ticket with ID rect rgb(243, 243, 243) note right of User: Encrypted and verified channel User->>+YAXI: Ticket YAXI->>+YAXI: Verify authenticity YAXI-->>-User: Bank login form User->>+YAXI: Send login credentials end YAXI->>+Bank: Get accounts opt Strong Customer Authentication Bank-->>-User: Request authorization User->>+Bank: Authorize end Bank-->>-YAXI: Accounts YAXI-->>-User: Accounts opt Transfer authenticated accounts to backend User->>+Your Backend: Accounts Your Backend->>+Your Backend: Verify authenticity Your Backend-->>-User: OK end

Issue a service ticket backend

Use Accounts as a service identifier when issuing tickets. The service does not accept any ticket data.

Issue a service ticket:

  • Python

  • Java

  • Node.js

  • Rust

  • PHP

ticket_id = str(uuid.uuid4())
ticket = issue_ticket(ticket_id, "Accounts", None)
String ticketId = UUID.randomUUID().toString();
String ticket = issueTicket(ticketId, "Accounts", null);
let ticketId = uuidv4()
let ticket = issueTicket(ticketId, 'Accounts', null)
let ticket_id = Uuid::new_v4().to_string();
let ticket = issue_ticket(&ticket_id, "Accounts", ())?;
$ticketId = uniqid();
$ticket = issueTicket($ticketId, 'Accounts', null);

Call the service frontend

The client accepts the following arguments:

  • The fields to return for each account. In strongly typed clients, all other fields will be empty.

  • An optional filter to receive only selected account.

Refer to your client library for details and documentation.

Call the service:

  • JavaScript

  • Kotlin

  • Rust

  • Swift

await client.accounts({
  credentials,
  ticket: accountsTicket,
  fields: [
    AccountField.Iban,
    AccountField.Bic,
    AccountField.Name,
    AccountField.DisplayName,
    AccountField.OwnerName,
    AccountField.Currency
  ], (1)
  filter: {
    all: [
      { notEq: [AccountField.Iban, null] },
      {
        any: [
          { eq: [AccountField.Type, AccountType.Current] },
          { eq: [AccountField.Type, null] }
        ]
      }, (2)
      { supports: SupportedService.CollectPayment } (3)
    ]
  }
})
1 Request some account properties, e.g. to present them for account selection.
2 Consider accounts associated with an IBAN if they are current accounts or accounts of unknown type.
3 The Collect Payment Service needs to support the accounts.
client.accounts(
    credentials,
    ticket = accountsTicket,
    fields = listOf(
        AccountField.IBAN,
        AccountField.BIC,
        AccountField.NAME,
        AccountField.DISPLAY_NAME,
        AccountField.OWNER_NAME,
        AccountField.CURRENCY,
    ), (1)
    filter = AccountField.Iban.notEq(null)
        .and(AccountField.Type.eq(AccountType.CURRENT)
            .or(AccountField.Type.eq(null))) (2)
        .and(Account.supports(SupportedService.COLLECT_PAYMENT)), (3)
)
1 Request some account properties, e.g. to present them for account selection.
2 Consider accounts associated with an IBAN if they are current accounts or accounts of unknown type.
3 The Collect Payment Service needs to support the accounts.
client.accounts(
    credentials,
    None,
    accounts_ticket,
    [
        AccountField::Iban,
        AccountField::Bic,
        AccountField::Name,
        AccountField::DisplayName,
        AccountField::OwnerName,
        AccountField::Currency,
    ], (1)
    Some(
        AccountField::IBAN.not_eq(None)
            .and(
                AccountField::TYPE.eq(Some(AccountType::Current))
                    .or(AccountField::TYPE.eq(None))
            ) (2)
            .and(
                Account::supports(SupportedService::CollectPayment)
            ), (3)
    ),
).await?;
1 Request some account properties, e.g. to present them for account selection.
2 Consider accounts associated with an IBAN if they are current accounts or accounts of unknown type.
3 The Collect Payment Service needs to support the accounts.
try await client.accounts(
    credentials: credentials,
    session: nil,
    ticket: ticket,
    fields: [
    	.iban,
	.bic,
	.name,
	.displayName,
	.ownerName,
	.currency
    ], (1)
    filter: .all(filters: [
        .ibanNotEq(value: nil),
	.any(filters: [.typeEq(value: .current), .typeEq(value: nil)]), (2)
	.supports(service: .collectPayment) (3)
    ])
)
1 Request some account properties, e.g. to present them for account selection.
2 Consider accounts associated with an IBAN if they are current accounts or accounts of unknown type.
3 The Collect Payment Service needs to support the accounts.

Result frontend backend

Process the resulting account properties in the frontend or forward them to your backend system that can verify their authenticity.

Designing account selection dialogs
  • If the result contains multiple account owners, group accounts by legal entity (e.g., personal or company accounts).

  • Allow users to choose an entity before displaying the accounts.

The resulting JWT contains the following data:

Example result:

  • Result JWT

  • Decoded JWT header

  • Decoded JWT payload

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImFwaS1rZXktMjE0YWQ
2MDEtZmFlNS00NWY4LTllNDItYTFiNTdkNTA0MTRjIn0.eyJkYXRhIjp7ImRhdG
EiOlt7ImliYW4iOiJOTDU4WUFYSTEyMzQ1Njc4OTAiLCJiaWMiOiJZQVhJREU3M
VhYWCIsImN1cnJlbmN5IjoiRVVSIiwib3duZXJOYW1lIjoiWUFYSSBHbWJIIn1d
LCJ0aWNrZXRJZCI6IjgxNDJkYTM4LTNjM2EtNGUzYi1hZDlhLTI5OWQ1NjFmNjMy
OSIsInRpbWVzdGFtcCI6IjIwMjUtMDYtMDFUMTE6MDE6MjYuNzcyNTk2MjMxWiJ
9LCJleHAiOjI1NDA4MDgwMDB9.eF5tX3NOJkNwJIPy5j59TX8pb8enATlphWS-F
sBYQ4U
{
  "typ": "JWT",
  "alg": "HS256",
  "kid": "api-key-214ad601-fae5-45f8-9e42-a1b57d50414c"
}
{
  "data": {
    "data": [
      {
        "bic": "YAXIDE71XXX",
        "currency": "EUR",
        "iban": "NL58YAXI1234567890",
        "ownerName": "YAXI GmbH"
      }
    ],
    "ticketId": "8142da38-3c3a-4e3b-ad9a-299d561f6329",
    "timestamp": "2025-06-01T11:01:26.772596231Z"
  },
  "exp": 2540808000
}