Skip to Content
@get-asset/sdkComponents

Account Checks

Headless compound for the checks written on one bank account.

Headless compound for the checks written on one bank account. Each check reads as not cleared, not cleared past 90 days (one the payee may never cash, worth chasing), cleared or voided, with the date it settled. The footer counts what was still open when last month closed, which is what the month's reconciliation allows for. The styled AssetStatementReconciliation shows it on the account's Checks tab; see Statement Reconciliation.

Anatomy

Import the primitive and compose the parts you need.

<AccountChecks.Root accountId={accountId}>
  <AccountChecks.Loading>…</AccountChecks.Loading>
  <AccountChecks.Error>
    <AccountChecks.ErrorMessage />
    <AccountChecks.Retry>Try again</AccountChecks.Retry>
  </AccountChecks.Error>
  <AccountChecks.Empty>…</AccountChecks.Empty>
  <AccountChecks.Success>
    <AccountChecks.Rows>
      <AccountChecks.Row>
        <AccountChecks.CheckNumber />
        <AccountChecks.IssuedAt />
        <AccountChecks.Payee />
        <AccountChecks.Status />
        <AccountChecks.DaysOpen />
        <AccountChecks.Amount />
      </AccountChecks.Row>
    </AccountChecks.Rows>
  </AccountChecks.Success>
  <AccountChecks.NotClearedCount /> not cleared on <AccountChecks.AsOf />
  <AccountChecks.NotClearedTotal />
  <AccountChecks.UploadInput />
</AccountChecks.Root>

Required scopes

The access token used by AssetProvider must include these scopes for this primitive to fetch data successfully:

  • check:read
  • document:create

API reference

Root props

PropTypeRequiredDefaultDescription
accountIdstringYesThe bank account the checks were drawn on.
state"loading" | "error" | "empty"NoForce a state for testing/storybook.
checksCheckPublic[]NoOverride the fetched checks (skips the API) — storybook/tests.
checksToMatchstring[]NoWith checks: the ids of those with a bank payment to match.
reconciledThroughstring | nullNoThe account's last reconciled month (YYYY-MM): open checks are counted to its end, the figure the books were last tied on. Without one, to the end of last month.
nownumberNo"Today", for ages and the footer — storybook/tests. Defaults to now.

Parts

States

PartPropsDescription
AccountChecks.Loading / Error / Success / EmptyState gates for the checks.
AccountChecks.ErrorMessage / RetryasChild?, format?Error copy and retry.

Checks

Oldest first, as a register is kept.

PartPropsDescription
AccountChecks.Rows / RowasChild?Iterates the checks. Row sets data-state (not_cleared | stale | cleared | voided) and data-tone (action | neutral | done | void).
AccountChecks.CheckNumber / IssuedAt / PayeeasChild?, format?The check as written.
AccountChecks.StatusasChild?, format?"Cleared Aug 7", "Not cleared, past 90 days", "Payment to match". format receives the row; checkStateLabel words it. Sets data-state and data-tone.
AccountChecks.RowIsstateRenders its children when the row is in one of the states: not_cleared, stale, to_match, cleared, voided.
AccountChecks.DaysOpenasChild?, format?Days since it was written, while it is open. Nothing once settled, or once its payment is waiting to be matched.
AccountChecks.AmountasChild?, format?Signed like the account: a check written is money out.
PartPropsDescription
AccountChecks.NotClearedCount / NotClearedTotal / AsOfasChild?, format?Checks still open at the end of the last reconciled month (else last month), their total, and that day. One cleared since still counts.
AccountChecks.UploadInput / Uploading / NotUploading / UploadErrorMessageUpload check images for the account; each is read into a check.

Hooks

PartPropsDescription
useAccountChecks() / useAccountChecksRow()The context, and the check being iterated.

On this page