Early Access: Concepts and architecture are stable; some API names and module boundaries may evolve.
Credit SDK by Aarthik Labs

State to UI

Learn about state to UI in your app.

State-to-UI mapping (what you build vs what the SDK handles)

Journey stateUser seesYour app doesSDK handles
idleNothing / entry CTARender CTA / entry pointReady-to-start state
discoveringLoading / progressShow loader, allow cancelRequest, timeout, retry policy, correlation ID
reviewingOffersOffer list / comparisonRender offers UINormalizes offer output into UI-friendly form
collectingDetailsForm stepsRender form UI, local validationDefines required inputs + handles persistence hooks
submittingSubmitting…Disable actionsIdempotency, retries, safe error mapping
awaitingUpdatesStatus timelineShow tracking UIPolling / event updates normalization (implementation-dependent)
actionRequired“We need one more step”Collect extra inputResubmission patterns, state continuity
approvedApproved screenConfirm/acceptMoves to completion + emits final state
rejectedOutcome screenShow next stepsStable outcome + consistent messaging hooks
recoverableErrorRetry UIShow retry + exitError code taxonomy + retry safe defaults
terminalErrorError + support CTAProvide fallbackCorrelation ID + structured error metadata

On this page