Skip to main content
Hosted docs: https://cop-by.mintlify.app (also linked from Partners → Docs). The CLI needs Node.js 20 LTS or newer. The web app can stay on Node 18.
1

Start the web API

From the repo root, with BRIDGE_MOCK=true in apps/web/.env.local:
The Integrations API listens on http://localhost:3000.
2

Start these docs

Open http://localhost:3333. Mint uses port 3333 so it does not collide with Next.
3

Try a quote

Open Get a BRE-B quote. Use server Local, paste your copby_live_pk_… key, and send:
A successful mock response includes display like 1 USD = 3902 COP and cached: false on the first call.
4

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.
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/*.
Fees: COP By 1% onchain to COPBY_FEE_WALLET, Bridge developer fee 0.5%. Minimum 4000 COP and 2 USDC to Bridge.