Accounts

The accounts flow can be used to acquire a list of the consumer’s bank accounts.

Once the flow is finished a list of accounts can be obtained from the XS2A-API. The information about the accounts can differ depending on the selected bank, as some banks provide more information than others.

Request Body Structure of an Accounts Flow

{
    "allowed_accounts": ?AllowedAccounts,
    "accounts_selection": ?Enum<'NO_SELECTION', 'SINGLE_ACCOUNT', 'MULTIPLE_ACCOUNTS'>
}

allowed_accounts AllowedAccounts, optional

A configuration to filter the fetched account list.

accounts_selection Enum, optional

This configuration defines if the consumer should have the possibility to limit the result of the accounts flow to specific accounts.

The possible values are:

  • NO_SELECTION - The account selection is disabled. The flow result will contain all possible accounts. Default value.
  • SINGLE_ACCOUNT - The consumer has to choose one single account. The flow result will contain only this account.
  • MULTIPLE_ACCOUNTS - The consumer can choose multiple accounts but has to choose at least 1 account. The flow result will contain only the selected accounts.

⚠️ This feature is only available for Klarna Branded Integrations!

Result of an Accounts Flow

{
    "data": {
        "result": ?{
            "accounts": Array<Account>,
            "type": String
        },
        "state": Enum<'PROCESSING', 'CONSUMER_INPUT_NEEDED', 'ABORTED', 'EXCEPTION', 'FINISHED'>
    }
}

data.result.type String, always present

For successful flows the type property always holds the value accounts.

data.result.accounts Account[], always present

The accounts property holds the available details of the accounts.

Response Example for a successful Flow

{
    "data": {
        "result": {
            "accounts": [
                {
                    "id": "0",
                    "alias": "Girokonto(MaxMustermann)",
                    "iban": "DE06000000000023456789",
                    "bic": "SFRTDE20XXX",
                    "account_number": "23456789",
                    "holder_name": "MaxMustermann",
                    "bank_code": "",
                    "transfer_type": "FULL",
                    "account_type": "DEFAULT",
                    "balance": {
                        "amount": 12345,
                        "currency": "EUR"
                    }
                },
                {
                    "id": "1",
                    "alias": "Girokonto (Musterman, Petra)",
                    "iban": "DE86000000002345678902",
                    "bic": "SFRTDE20XXX",
                    "account_number": "2345678902",
                    "holder_name": "Musterman, Petra",
                    "bank_code": "",
                    "transfer_type": "FULL",
                    "account_type": "DEFAULT"
                }
            ],
            "type": "accounts"
        },
        "state": "FINISHED"
    }
}

results matching ""

    No results matching ""