RoutexRefreshClient

Kotlin client for the YAXI Open Banking non-interactive (refresh) services: accounts, balances, transactions, plus the discovery endpoints info and search.

Use this client to refresh data for an already-consented connection without prompting the user. The driving difference vs. RoutexClient:

The module is JVM-only because the typical caller is a backend that schedules recurring refreshes; Android consumers should use RoutexClient (which carries the consent flow).

Shared parameters

Service methods share this optional input (omitted from each method's KDoc; see Handling sessions for the broader picture):

  • session: opaque Session returned by a previous call in the same flow.

Errors

Service methods are suspend and throw on failure. Expected exceptions:

Lifecycle

Instances are safe to share across coroutines; create one per backing HttpTransport and reuse it. Java callers should use RoutexRefreshAsyncClient.

Samples

val response =
    client.balances(
        ticket = ticket,
        connectionData = connectionData,
        accounts = accounts,
    )

Constructors

Link copied to clipboard
constructor(baseUrl: Url = DEFAULT_BASE_URL, httpTransport: HttpTransport = defaultHttpTransport())

Construct a client.

constructor(baseUrl: String, httpTransport: HttpTransport = defaultHttpTransport())

Convenience overload that parses baseUrl as a Ktor Url.

Functions

Link copied to clipboard
suspend fun accounts(ticket: Ticket.Accounts, connectionData: ConnectionData, fields: List<AccountField<*>>, filter: AccountFilter? = null, session: Session? = null): NonInteractiveResponse<List<Account>>

Refresh accounts (and selected fields) for the connection encoded in connectionData.

Link copied to clipboard
suspend fun balances(ticket: Ticket.Balances, connectionData: ConnectionData, accounts: List<AccountReference>, session: Session? = null): NonInteractiveResponse<Balances>

Refresh current balances for accounts under connectionData.

Link copied to clipboard
suspend fun info(ticket: Ticket, connectionId: ConnectionId): ConnectionInfo

Fetch metadata for a single service connection.

Link copied to clipboard
suspend fun search(ticket: Ticket, filters: List<SearchFilter>, ibanDetection: Boolean = false, limit: UInt? = null, details: List<ConnectionDetails> = emptyList()): List<ConnectionInfo>

Search for service connections (banks and other providers).

Link copied to clipboard

Authenticated TEE system version learned during settlement of ticket's key-settlement session.

Link copied to clipboard
suspend fun transactions(ticket: Ticket.Transactions, connectionData: ConnectionData, session: Session? = null): NonInteractiveResponse<List<Transaction>?>

Refresh booked-and-pending transactions for connectionData.