> ## 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.

# Display offer details

> Load full offer details with the React SDK or the API.

Fetch full offer details - pricing options, legal terms, milestones, the tokens the offer settles in, and more - for a single offer the user can access.

> [!NOTE]
>
> `OfferDetail.type` tells you which checkout the offer needs: `'coinlist::token_sale'`, `'superstate::swap'`, `'ondo::swap'`, or `'centrifuge::vault'`. Switch on it exhaustively, or hand the offer to [`CheckoutContainer`](https://docs.passage.coinlist.co/sdk/checkout) and let the SDK dispatch. v0.13.0 added `'centrifuge::vault'`, so an exhaustive `switch` written for an earlier version needs a new case - see the [changelog](https://docs.passage.coinlist.co/changelogs/react.md).

## Prerequisites

* Completed [OAuth](https://docs.passage.coinlist.co/sdk/oauth-authentication.md) and a working `PassageProvider`
* An **offer id** from [Fetch offers](https://docs.passage.coinlist.co/sdk/fetch-offers.md) (for example `offer.id` from `OffersGridContainer` `onOfferClick`)

## Recommended: useOfferDetails

The hook mirrors the SDK client method `passage.offers.get`: it waits until the provider is ready, then loads details and exposes `offerDetailsState`:

* **`LOADING`** - provider not ready or request in flight. With `enabled: false` and no `data`, the hook also stays `LOADING`: it has no `DISABLED` state. A seeded or already-fetched `CONTENT` survives `enabled: false`.
* **`ERROR`** - `reason` is `not-authenticated` when no CoinList user is signed in (`NotAuthenticatedError`), which includes a wallet session, and `generic-error` for any other failure
* **`CONTENT`** - `offerDetail` is the `OfferDetail`

Pass `data` with an `OfferDetail` your server fetched with `passage.offers.get(id)` on `PassageServer`, and the hook uses it as-is and sends no request. With no user session, the server can fetch it with an app-level token instead: `passage.offers.get(id, await passage.auth.clientCredentials())`. Load it this way on a wallet session, a sign-in with a wallet for a user with no CoinList account, because `useOfferDetails` and `passage.offers.get` in the browser need a CoinList user. The hook has no `refetch()`.

When the user picks an offer from the grid, keep that `offer` in React state and pass `offer.id` - TypeScript then matches the branded id type the hook expects.

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

import { useState } from "react";
import { OffersGridContainer, useOfferDetails } from "@passage-cl/react";
import type { Offer } from "@passage-cl/react/universal";

function OfferDetailPanel({ offer }: { offer: Offer }) {
  const { offerDetailsState } = useOfferDetails(offer.id);

  if (offerDetailsState.type === "LOADING") return <p>Loading details…</p>;
  if (offerDetailsState.type === "ERROR") return <p>Unable to load this offer.</p>;

  const detail = offerDetailsState.offerDetail;
  return (
    <section>
      <h1>{detail.name}</h1>
      {/* Render options, terms, milestones from detail - see API reference for fields */}
    </section>
  );
}

export function OfferBrowseAndDetail() {
  const [selected, setSelected] = useState<Offer | null>(null);

  return (
    <>
      <OffersGridContainer onOfferClick={(offer) => setSelected(offer)} />
      {selected ? <OfferDetailPanel offer={selected} /> : null}
    </>
  );
}
```

## Offer options

`offerDetail.options` lists the options of the offer. Each option has its own requirements and its own minimum purchase (`minimumPurchaseUsd`), so show the user the option they will buy.

When the user picks an option, pass its `id` to [`CheckoutContainer`](https://docs.passage.coinlist.co/sdk/checkout) as `optionId`. `optionId` is required for every offer type, even an offer with one option: the SDK never picks one for you. If your page selects an option automatically, pick it yourself and pass its `id`. The Ondo checkouts and the Centrifuge deposit checkout send that id with the order, so the API runs that option's requirements. An Ondo buy and a Centrifuge deposit also check the amount against that option's minimum; an Ondo sell has no minimum. For an id the offer does not show, they show "Option not available" (`unknown-option`) and send no request. The token sale buys that option, at its price and minimum, and shows "Sale option not found" (`unknown-option`) for an id the offer does not show. The Superstate swap and a Centrifuge redemption ignore `optionId`, but you still pass it. The checkout reads `optionId` once, at mount: to switch options, remount it with a `key` that covers the option.

## REST: GET /v1/offers/{id}

Use the API directly when you are not in React or you need a one-off server fetch with a token you already hold.

> [accordion] Example: fetch with Bearer token
>
> ```ts theme={null}
> // lib/coinlist-api.ts
> export async function getOfferDetails(offerId: string, accessToken: string) {
>   const res = await fetch(
>     `https://api.coinlist.co/v1/offers/${encodeURIComponent(offerId)}`,
>     {
>       headers: { Authorization: `Bearer ${accessToken}` },
>     },
>   );
>
>   if (!res.ok) {
>     const error = await res.json();
>     throw new Error(error.message ?? "Failed to fetch offer");
>   }
>
>   return res.json();
> }
> ```
>
> See the [API reference](https://docs.passage.coinlist.co/api-reference) for the exact response schema.

Example response shape (values are illustrative - always rely on the live API and legal URLs from Passage):

```json theme={null}
{
  "object": "offer_details",
  "id": "{offer_id}",
  "type": "coinlist::token_sale",
  "slug": "example-offer",
  "name": "Example Token Sale",
  "tagline": "An example token sale",
  "about": "What the project builds and why.",
  "logo_url": "https://example.com/logo.png",
  "banner_url": "https://example.com/banner.png",
  "starts_at": "2026-01-01T00:00:00.000000Z",
  "ends_at": "2026-01-31T00:00:00.000000Z",
  "asset": { "id": "{asset_id}", "code": "EXT", "name": "Example Token", "fractional_digits": 18 },
  "funding_assets": [
    { "id": "{asset_id}", "code": "USDC", "name": "USD Coin", "fractional_digits": 6 }
  ],
  "tokens": [
    { "role": "funding", "chain": "ethereum_mainnet", "address": "0x0000000000000000000000000000000000000000" }
  ],
  "issuer": null,
  "isin": null,
  "ticker": null,
  "instrument_type": null,
  "listing_venue": null,
  "options": [
    {
      "id": "{option_id}",
      "slug": "standard",
      "price_usd": "0.10",
      "floor_price_usd": 0.08,
      "bid_increment": null,
      "minimum_purchase_usd": 100,
      "total_token_supply": 1000000,
      "sale_agreement_url": "https://coinlist.co/agreements/example"
    }
  ],
  "funding_contracts": [
    { "chain": "ethereum_mainnet", "address": "0x0000000000000000000000000000000000000000" }
  ],
  "terms": [
    { "key": "Vesting", "value": "12 months linear" },
    { "key": "Lockup", "value": "6 months cliff" }
  ],
  "milestones": [
    { "name": "Registration", "schedule": "Jan 1", "status": "completed" },
    { "name": "Sale Open", "schedule": "Jan 15", "status": "active" },
    { "name": "Distribution", "schedule": "Feb 1", "status": "upcoming" }
  ],
  "faqs": [],
  "links": []
}
```

> [!NOTE]
>
> Display the full terms and link to the sale agreement URL as provided - do not summarize or paraphrase legal terms.

## Lower-level client

> [accordion] passage.offers.get in React
>
> Equivalent to the hook, without the built-in state machine. Pass the same `offer.id` you get from `OffersGridContainer`:
>
> ```tsx theme={null}
> "use client";
>
> import { usePassage } from "@passage-cl/react";
> import type { Offer, OfferDetail } from "@passage-cl/react/universal";
> import { useEffect, useState } from "react";
>
> export function OfferDetailManual({ offer }: { offer: Offer }) {
>   const { passage, isReady } = usePassage();
>   const [detail, setDetail] = useState<OfferDetail | null>(null);
>
>   useEffect(() => {
>     if (!isReady) return;
>     void passage.offers
>       .get(offer.id)
>       .then(setDetail)
>       .catch(() => setDetail(null));
>   }, [passage, isReady, offer.id]);
>
>   if (!isReady) return <p>Loading…</p>;
>   return <pre>{JSON.stringify(detail, null, 2)}</pre>;
> }
> ```
>
> Prefer `useOfferDetails` unless you need custom control flow.

## Next step

> [card] [Requirements](https://docs.passage.coinlist.co/sdk/requirements.md)
>
> Show the user what they must satisfy before they can participate.


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