Capxul Docs
Hooks

Hooks

Catalog of every @capxul/sdk-react hook — TanStack Query under the hood, one reference page per hook.

@capxul/sdk-react exposes the Capxul platform as React hooks. Every data hook is TanStack Query under the hood: queries return UseQueryResult<Data, CapxulError>, mutations return UseMutationResult<Data, CapxulError, Input>, and each hook exports its concrete UseCapxul*Return alias. (A few hooks expose a richer shape — their pages state it exactly.) All hooks must render beneath a CapxulProvider; until its bootstrap resolves, queries simply sit in isPending.

Provider & bootstrap

  • CapxulProvider — the root provider; owns the client bootstrap and the TanStack Query cache.
  • useCapxul — bootstrap status / error / retry, for opt-in splash and error UI.
  • useCapxulClientOrNull — advanced escape hatch: the raw CapxulClient, or null while bootstrapping.
  • Actor scopes — concept: scoping address book, requests, inbox, and insights hooks to the personal Account or an Organization.

Auth & session

Account

Sub-accounts

Payments

Destinations

Activity

Offramp

Address book

Actor-scoped — see Actor scopes.

Payment requests

Actor-scoped — see Actor scopes.

Inbox

Actor-scoped — see Actor scopes.

Insights

Actor-scoped — see Actor scopes.

Payroll

Organizations

Onboarding

Legacy exports

The package still exports six headless slot components — SendMoney, AddressBook, RequestInbox, InsightsSummary, PayrollRoster, and Destinations. They are being retired and are intentionally undocumented: do not build on them. Every capability they covered is available through the hooks above.

On this page