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— bootstrapstatus/error/retry, for opt-in splash and error UI.useCapxulClientOrNull— advanced escape hatch: the rawCapxulClient, ornullwhile bootstrapping.- Actor scopes — concept: scoping address book, requests, inbox, and insights hooks to the personal Account or an Organization.
Auth & session
useCapxulSignIn— start email OTP sign-in: send the one-time code.useCapxulVerifyOtp— verify the code and establish the session.useCapxulSignOut— end the session and invalidate the auth boundary.useCapxulSession— the currentSession, ornullwhen signed out.useCapxulProfile— the signed-in user'sProfile, ornull.useCapxulCurrentUser— the signed-in user's aggregatedCurrentUserContext.
Account
useCapxulAccountLifecycle— post-sign-in Account setup: progress, readiness, and retry.useCapxulAccountBalance— the personal Account's balance and available balance.useCapxulAccountFund— fund the personal Account with an amount ofMoney.
Sub-accounts
useCapxulSubAccountsList— list an Account's sub-accounts.useCapxulSubAccountCreate— create a sub-account.useCapxulSubAccountRename— rename a sub-account.useCapxulSubAccountDelete— delete a sub-account.useCapxulTransfer— move money between an Account and its sub-accounts.
Payments
useCapxulPay— pay a validated recipient; returns the recordedPayment.useCapxulPayout— send a payout to a saved destination.useCapxulWithdraw— withdraw to an external wallet.useCapxulCancelPayment— cancel a payment by id.useCapxulPayments— list the Payments ledger.useCapxulPayment— a singlePaymentby id, ornull.
Destinations
useCapxulDestinations— list saved destinations.useCapxulAddDestination— save a new destination.useCapxulRemoveDestination— remove a saved destination.
Activity
useCapxulActivity— the paginated activity feed (ActivityPage).
Offramp
useCapxulOfframpQuote— quote an offramp for a given input.useCapxulOfframpStatus— the status of an offramp by id.
Address book
Actor-scoped — see Actor scopes.
useCapxulAddressBook— list the scope's address book entries.useCapxulAddressBookEntry— a single entry by id, ornull.useCapxulAddAddressBookEntry— add an entry.useCapxulHideAddressBookEntry— hide an entry.useCapxulUnhideAddressBookEntry— unhide a hidden entry.useCapxulLabelAddressBookEntry— set an entry's label.
Payment requests
Actor-scoped — see Actor scopes.
useCapxulRequests— list the scope's issued payment requests.useCapxulRequest— a single request by id, ornull.useCapxulIssueRequest— issue a new payment request.useCapxulCancelRequest— cancel a request by id.useCapxulReconcileRequests— reconcile receivables: paid / exception status per request.
Inbox
Actor-scoped — see Actor scopes.
useCapxulInbox— list incoming payment requests addressed to the scope.useCapxulApproveInboxRequest— approve an inbox request; returns the resultingPayment.useCapxulDeclineInboxRequest— decline an inbox request.
Insights
Actor-scoped — see Actor scopes.
useCapxulInsightsSummary— the scope's spending insights summary.useCapxulInsightsHistory— the scope's payment history for insights.
Payroll
useCapxulPayrollRoster— an organization's payroll roster lines.useCapxulAddPayrollRosterLine— add a roster line.useCapxulUpdatePayrollRosterLine— update a roster line.useCapxulRemovePayrollRosterLine— remove a roster line.useCapxulRunPayroll— run payroll for an organization; returns the list of resultingPaymentrecords.
Organizations
useCapxulOrgs— list the organizations you belong to.useCapxulOrg— a single organization by id, ornull.useCapxulOrgMembers— an organization's members.useCapxulOrgRoles— an organization's roles.useCapxulOrgDeployRoles— provision an organization's role set.useCapxulOrgTreasury— an organization's treasury Account: balance and available balance.useCapxulOrganizationAccount— an organization'sOrganizationAccountrecord.useCapxulOrganizationAuditLog— an organization's audit log.useCapxulCreateOrg— create an organization.useCapxulInviteMember— invite a member to an organization.useCapxulRemoveMember— remove a member from an organization.useCapxulAssignRole— assign a role to a member.useCapxulSwitchActingEntity— mutation seam for switching the acting entity (personal Account ↔ Organization); carries no SDK side effect.
Onboarding
useCapxulCompletePersonalOnboarding— persist the first identity profile and start Account setup.useCapxulCompleteOrganizationOnboarding— complete organization 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.
Drop to the raw client
Call core client methods that don't have first-class hooks yet — useCapxulClientOrNull, gating on bootstrap, unwrapping CapxulResult, and keying under the capxul namespace.
CapxulProvider
The root provider that bootstraps the Capxul client and owns the TanStack Query cache for every hook beneath it.