> ## Documentation Index
> Fetch the complete documentation index at: https://docs.passage.coinlist.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Requirements checklist

> Render RequirementsChecklistContainer and the SDK handles identity verification, tax documents, and wallet connection for you.

Before a user can participate in an offer, they have to satisfy its **requirements**: identity verification, a signed tax document, a connected wallet, a jurisdiction check, a CoinList account. Which ones apply is decided per offer option, by CoinList. An Ondo order or a Centrifuge deposit names its option, and CoinList checks that option's requirements before it builds the order, so show the user the checklist of the option they will buy.

`RequirementsChecklistContainer` renders the whole checklist and resolves every requirement type in-app. It is the highest rung (**L3, components**) and the one to start from.

## Prerequisites

* A completed [OAuth](https://docs.passage.coinlist.co/sdk/oauth-authentication.md) session with a working `PassageProvider`
* An offer id and an offer option id from [Display offer details](https://docs.passage.coinlist.co/sdk/sale-details.md)

## Render it

```tsx theme={null}
"use client";

import { RequirementsChecklistContainer } from "@passage-cl/react";
import type { OfferDetail, OfferOption } from "@passage-cl/react/universal";
import { useRouter } from "next/navigation";

export function Requirements({
  offer,
  option,
}: {
  offer: OfferDetail;
  option: OfferOption;
}) {
  const router = useRouter();

  return (
    <RequirementsChecklistContainer
      offerId={offer.id}
      optionId={option.id}
      title="Before you invest"
      description="Complete these steps to participate in this offer."
      onContinue={() => router.push(`/offers/${offer.id}/checkout`)}
    />
  );
}
```

That is the whole integration. The container is **self-scoped**: it renders fully styled with no style provider in the tree. When the user is signed out it renders its error state and fetches nothing, so mount it only for a logged-in CoinList user and render `CoinListSignInCardContainer` yourself otherwise. A [wallet session](#wallet-sessions) renders the error state too.

## What it does for you

Clicking a requirement's action button does the right thing per type, with no wiring from you:

| Requirement type | Default behavior |
| - | - |
| Any type whose status carries a Sumsub level (`kycLevel`), in practice `kyc_approved` and `accreditation` | Opens an inline Sumsub verification flow. The backend prescribes both the level and whether the applicant must be reset first. After the user submits, the checklist checks the statuses every 5 seconds until the requirement's status changes, for up to 2 minutes, then refreshes. |
| `kyc_approved`, `accreditation` with no Sumsub level on the status | Opens the CoinList verification page in a new tab. |
| `document` | Opens the built-in tax document modal. |
| `external_wallet`, `whitelisted_wallet` | Opens the built-in connect-wallet modal if you passed a `wallet` (or `wallet={null}` with an `onRequestConnect`). Otherwise opens CoinList in a new tab. |
| `jurisdiction` | No action - there is no CoinList page to send the user to. |
| `coinlist_account` | No action - the user satisfies it by signing in with CoinList, and your app signs the user in before the checklist can load. The row's default label is **CoinList Account**. |

The fallback for everything is `passage.requirements.handle`, which opens the corresponding CoinList page in a new tab where the type has one.

> [!TIP]
>
> **Omit `onRequirementActionOverride` and rely on the defaults.** Pass your own handler only if you need custom navigation, or `null` to disable the action button entirely. The same applies to `onContactSupportOverride`, which defaults to `passage.support.contact`.

## Resolving wallet requirements in-app

Pass a `wallet` and the checklist resolves `external_wallet` and `whitelisted_wallet` requirements without leaving your app. It only needs signing capability, so a `ConnectWallet` (an [`EvmSigner`](https://docs.passage.coinlist.co/sdk/wallets#two-shapes-one-seam) plus the `chain` it signs on) is enough - no gas, no transaction.

```tsx theme={null}
<RequirementsChecklistContainer
  offerId={offer.id}
  optionId={option.id}
  title="Before you invest"
  description="Complete these steps to participate in this offer."
  wallet={connectedWallet}          // ConnectWallet, or null while none is connected
  onRequestConnect={openConnectModal}
/>
```

When `wallet` is omitted entirely - or is `null` with no `onRequestConnect` to act on - wallet requirements fall back to opening CoinList in a new tab.

### Props

| Prop | Type | Description |
| - | - | - |
| `offerId` | `OfferId` | Required. |
| `optionId` | `OfferOptionId` | Required. Requirements are per option. |
| `title`, `description` | `string` | Required. Heading copy. |
| `onContinue` | `() => void` | Renders a **Continue** button, enabled once every requirement is satisfied, and is called when the user clicks it. Without `onContinue` there is no button. |
| `continueLabel` | `string` | Default `"Continue"`. The text of the button that calls `onContinue`. The requirement rows' own buttons keep their labels. |
| `wallet` | `ConnectWallet \| null` | A connected signer, for in-app wallet requirements. Import the type from `@passage-cl/react/universal`. |
| `onRequestConnect` | `() => void` | Called when the user asks to connect and none is connected. |
| `onRequirementActionOverride` | `((r: Requirement) => void) \| null` | Override the action button for all types, or `null` to disable it. |
| `onContactSupportOverride` | `((r: Requirement) => void) \| null` | Override the contact-support button, or `null` to disable it. |
| `getLabel` | `(r: Requirement) => string` | Override the default label per requirement type. |
| `getDescription` | `(r: Requirement) => string \| null` | Override the default description per requirement type. |
| `identityVerificationOptions` | `{ levelName?, locale? }` | Override the backend-prescribed Sumsub level, or set the Sumsub UI language. |
| `data` | `RequirementsData` | Pre-fetched server-side. Skips the initial client fetch. |
| `loading`, `error` | `ReactNode` | Slots. `error` replaces the error banner under the title; the title still renders. |
| `enabled` | `boolean` | Default `true`. `false` fetches nothing, for a checklist that is mounted but not needed yet. |
| `className` | `string` | |

> [!NOTE]
>
> `data` skips the requirements fetch, but connected-wallet addresses are not part of `RequirementsData` and are always fetched client-side.

`RequirementsData` is `{ requirements, statuses }`: the results of `passage.requirements.forOffer(offerId)` and `passage.requirements.statuses(offerId)` on `PassageServer`. `statuses` is per user, so the server needs a CoinList user's session for it.

## Wallet sessions

A wallet session is a sign-in with a wallet, for a user with no CoinList account. CoinList checks every requirement against a CoinList user, so `statuses` refuses a wallet session and the checklist renders its error state.

A wallet session can still read what an option requires, because that describes the offer and not a user. `signInMethodFor`, from `@passage-cl/react/universal`, turns an option's list into the sign-in it asks for: `'coinlist'` for any requirement, not only `coinlist_account`, and `'wallet'` for none. With an app-level token, your server can decide this before any user is known:

```ts theme={null}
// lib/sign-in-method.ts
import { signInMethodFor } from "@passage-cl/react/universal";
import type { OfferId, OfferOptionId } from "@passage-cl/react/universal";
import { passageServerForRSC } from "@/lib/passage-server-readonly";

export async function signInMethodForOption(
  offerId: OfferId,
  optionId: OfferOptionId,
) {
  const passage = passageServerForRSC();
  const requirements = await passage.requirements.forOffer(
    offerId,
    await passage.auth.clientCredentials(),
  );

  return signInMethodFor(requirements[optionId] ?? []);
}
```

In the browser, `useOfferRequirements` reads the same list on a session of either kind:

```tsx theme={null}
import { useOfferRequirements } from "@passage-cl/react";
import type { OfferId } from "@passage-cl/react/universal";

export function OptionCount({ offerId }: { offerId: OfferId }) {
  const { state, refetch } = useOfferRequirements({ offerId });

  switch (state.type) {
    // DISABLED: `enabled` is false and no answer is in hand.
    case "DISABLED":
    case "LOADING":  return <Spinner />;
    // reason: "not-authenticated" when signed out, otherwise "generic-error"
    case "ERROR":    return <ErrorState reason={state.reason} onRetry={refetch} />;
    case "CONTENT":  return <p>{Object.keys(state.requirements).length} options</p>;
  }
}
```

Pass `data` with the requirements your server read to skip the first read. `refetch()` still reads after a `data` seed, and does nothing while `enabled` is `false`.

The Ondo checkouts and the Centrifuge deposit checkout run this check for you. On a wallet session, an option with any requirement shows "Sign in to continue" in place of the checkout. See [Building the Checkout flow](https://docs.passage.coinlist.co/sdk/checkout.md).

## The screens the checklist opens

The identity verification flow, the tax document modal and the connect-wallet modal are internal to `RequirementsChecklistContainer`, and the SDK does not export them. To build your own checklist, use the data hooks below: `useKycToken` for a Sumsub token, `useTaxDocument` for the tax document, and `useConnectWallet` for the wallet ownership proof and binding.

> [accordion] Build your own UI with hooks (L2)
>
> `useRequirementsChecklistViewModel` backs the container. It takes the container's props except the `loading`, `error` and `className` slots, and returns `{ state, onEvent }`. In the `content` state, `continueAction` is `{ enabled, label }` with your `continueLabel`, or `null` when you passed no `onContinue`. Below it are the requirements data hooks, each usable on its own:
>
> ```tsx theme={null}
> import { useRequirements } from "@passage-cl/react";
> import type { OfferId } from "@passage-cl/react/universal";
>
> export function Checklist({ offerId }: { offerId: OfferId }) {
>   const { requirementsState, refetch } = useRequirements(offerId);
>
>   switch (requirementsState.type) {
>     // Also the state while `enabled` is false with no `data`: there is no DISABLED state.
>     case "LOADING":  return <Spinner />;
>     // reason: "not-authenticated" | "generic-error"
>     case "ERROR":    return <ErrorState reason={requirementsState.reason} onRetry={refetch} />;
>     case "CONTENT":  return <MyChecklist requirements={requirementsState.requirements} statuses={requirementsState.statuses} />;
>   }
> }
> ```
>
> `useRequirements` reports `not-authenticated` straight away, with no request, when the user is signed out. It also reports `not-authenticated` on a wallet session, because it reads statuses. `refetch()` still fetches after a `data` seed, and does nothing while `enabled` is `false`.
>
> | Hook | What it does | Options |
> | - | - | - |
> | `useRequirements(offerId, options?)` | Fetches requirements and their statuses together. Returns `requirementsState` and `refetch`. | `data`, `enabled` |
> | `useOfferRequirements({ offerId, data?, enabled? })` | Fetches requirements without statuses, so a [wallet session](#wallet-sessions) can read them. Returns `state` and `refetch`. | `data`, `enabled` |
> | `useOptionAddresses(offerId, optionId, options?)` | Lists the wallets bound to an offer option. Returns `addressesState`, `refetch` and `disconnect`. With `enabled: false` it sends no request and reports an empty `CONTENT`, or the `data` seed if you passed one. | `data`, `enabled` |
> | `useKycToken(levelName?, reset?)` | Mints a Sumsub token for the prescribed level. Starts `IDLE`; call `fetchToken()`. | |
> | `useTaxDocument({ isOpen })` | Loads the user's PII and submits the tax document. | `isOpen` |
> | `useConnectWallet(options)` | Runs the ownership-proof and binding flow over `passage.wallets.connect`. | `isOpen`, `offerId`, `offerOptionId`, `wallet`, `challengeType`, `statement` |
>
> See [SDK structure](https://docs.passage.coinlist.co/sdk/structure.md#hooks) for the conventions they share.

> [accordion] Drive it yourself with the client (L1)
>
> `passage.requirements` is a plain namespace with no React. It is available on both the browser client and `PassageServer`, except `handle`, which needs a browser.
>
> | Method | Returns |
> | - | - |
> | `forOffer(offerId)` | `Record<OfferOptionId, Requirement[]>` - which requirements apply to each option. Accepts a wallet session as well as a CoinList user's. On `PassageServer` it also takes an optional app-level token from `passage.auth.clientCredentials()`, so it can run with no user session. |
> | `statuses(offerId)` | `RequirementStatusInfo[]` - the user's progress, with the Sumsub level that resolves each one. |
> | `createKycToken(params?)` | A Sumsub token. Takes `{ levelName, reset }`. |
> | `getPii()` | The user's personal information on file. |
> | `submitDocument(params)` | Submits a document. Takes `{ documentType, fields }`. |
> | `handle(requirement)` | Client only. Opens the corresponding CoinList page in a new tab. Does nothing for `jurisdiction`, `document` and `coinlist_account`, which have no CoinList page. |
>
> ```ts theme={null}
> const [requirements, statuses] = await Promise.all([
>   passage.requirements.forOffer(offerId),
>   passage.requirements.statuses(offerId),
> ]);
> ```
>
> A requirement `type` (`RequirementType`, from `@passage-cl/react/universal`) is one of `kyc_approved`, `external_wallet`, `whitelisted_wallet`, `jurisdiction`, `accreditation`, `document`, `coinlist_account`. `coinlist_account` is new in v0.14.0, so an exhaustive `switch` on `RequirementType` in your code, for example in a `getLabel`, needs a case for it. A status is `not_started`, `in_progress`, `action_needed`, `completed`, or `rejected`.
>
> `statuses`, `createKycToken`, `getPii`, and `submitDocument` require a CoinList user and throw `NotAuthenticatedError` otherwise, on a wallet session too. `forOffer` throws it only with no session of either kind, and on the server not at all when you pass an app-level token. `handle` needs no session, since it only opens a CoinList page.
>
> Wallet ownership proof lives on `passage.wallets` rather than here, because it is provider-agnostic. See [Wallets](https://docs.passage.coinlist.co/sdk/wallets.md#proving-wallet-ownership).

## Next step

> [card] [Building the Checkout flow](https://docs.passage.coinlist.co/sdk/checkout.md)
>
> Once requirements are satisfied, render `CheckoutContainer` and let it pick the provider. Pass it the same option as `optionId`, which every checkout requires.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.