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:
Inputs. A ConnectionData envelope replaces the Credentials indirection. ConnectionData is obtained from a successful interactive flow (see Response.Result.connectionData) and persisted by the caller (see Handling sessions).
Outputs. Each call returns a NonInteractiveResponse carrying the decoded payload directly: no JWT envelope, no Response interrupt branches. Bank-side failures throw a RoutexError subclass; the two that signal "drive a fresh interactive flow" are InterruptError (the umbrella signal when the bank wants user input on a non-interactive call) and ConsentExpired (the typed signal that the consent itself has expired or been revoked).
Surface. Only the read services (accounts, balances, transactions) plus info and search are exposed; payment and transfer flows are inherently interactive and live on 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:
RoutexError subclasses, with InterruptError and ConsentExpired both signaling that the caller needs to re-run the interactive flow (see Errors).
RoutexClientError.MalformedResponse when the server returned a payload this client could not decode (incident-grade; report it).
I/O exceptions from the underlying HttpTransport (timeouts, connection failures, and similar).
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
Construct a client.
Convenience overload that parses baseUrl as a Ktor Url.
Functions
Refresh accounts (and selected fields) for the connection encoded in connectionData.
Refresh current balances for accounts under connectionData.
Fetch metadata for a single service connection.
Search for service connections (banks and other providers).
Authenticated TEE system version learned during settlement of ticket's key-settlement session.
Refresh booked-and-pending transactions for connectionData.