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

# Quickstart

> Preview these docs and hit the BRE-B quote endpoint (local or hosted).

Hosted docs: [https://cop-by.mintlify.app](https://cop-by.mintlify.app) (also linked from Partners → **Docs**).

The CLI needs [Node.js](https://nodejs.org) 20 LTS or newer. The web app can stay on Node 18.

<Steps>
  <Step title="Start the web API">
    From the repo root, with `BRIDGE_MOCK=true` in `apps/web/.env.local`:

    ```bash theme={null}
    pnpm --filter web dev
    ```

    The Integrations API listens on `http://localhost:3000`.
  </Step>

  <Step title="Start these docs">
    ```bash theme={null}
    pnpm --filter docs docs
    ```

    Open [http://localhost:3333](http://localhost:3333). Mint uses port 3333 so it does not collide with Next.
  </Step>

  <Step title="Try a quote">
    Open [Get a BRE-B quote](/api-reference). Use server **Local**, paste your `copby_live_pk_…` key, and send:

    ```txt theme={null}
    destinationCop=10000
    fromToken=USDC
    ```

    A successful mock response includes `display` like `1 USD = 3902 COP` and `cached: false` on the first call.
  </Step>

  <Step title="Walk the payout path">
    1. `POST /kyc/otp/send` with a real-looking email and a checksummed `userAddress`. In mock mode the response includes `debugCode` (`123456` by default, or `BREB_MOCK_OTP`). With `RESEND_API_KEY` set, the same code is also emailed via Resend.
    2. `POST /kyc/otp/verify` with that code. Mock mode auto-approves KYC after a valid OTP.
    3. `GET /quote` then `POST /payouts` with `breBKey` and `accountOwnerName`. Use a name that does **not** contain `mismatch`.
    4. `POST /payouts/{payoutId}/confirm` with a unique `0x` + 64 hex `txHash`.
  </Step>
</Steps>

<Tip>
  In mock mode, an account owner name containing `mismatch` or a Bre-B key starting with `0000` returns `409 destination_mismatch` and does not create a payout. The miniapp can skip the Bearer key and call `/api/breb/*` instead of `/api/integrations/breb/*`.
</Tip>

<Info>
  Fees: COP By 1% onchain to `COPBY_FEE_WALLET`, Bridge developer fee 0.5%. Minimum 4000 COP **and** 2 USDC to Bridge.
</Info>
