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

# Bridge — Build with banks, ship like a startup

> Launch wallets, lending, and payment collections via one API while a bank/FSP keeps custody and compliance.

Bridge is **Banking-as-a-Service**. You ship financial features; a partner bank/FSP holds custody and owns compliance. You get one set of developer-first APIs for customers, wallets, lending, and payment collections.

<Note>
  Everything below is built around the flows already running in production. Pick a recipe, copy the code, get a real result.
</Note>

## Start in your AI editor

The fastest way in: let Claude Code or Cursor build the integration for you. Connect the docs once:

```bash theme={null}
claude mcp add --transport http x-bridge https://docs.xbridge.co.tz/mcp
```

Then paste this into your agent (swap the use case for KYC, wallets, lending, BNPL, or payment collections):

```text theme={null}
I'm integrating x-bridge (Banking-as-a-Service) into my app. Use the x-bridge MCP
(docs.xbridge.co.tz/mcp), or read https://docs.xbridge.co.tz if it isn't connected.

Help me add wallets to my app:
1. Read the matching recipe and the conventions.
2. Scaffold an x-bridge token client (POST /generate-token -> Bearer, cache ~1h, retry once on 401).
3. Implement the flow in my codebase, matching my conventions and wiring in my own data.
4. Show me where to set XBRIDGE_KEY_ID / XBRIDGE_SECRET from env, and how to test with a sandbox key.
```

No keys needed to start — the agent writes the code; you add your key when you're ready to call the API ([Getting started](/getting-started)). More on the agent setup: [Connect your AI agent](/mcp).

## Start with a recipe

<Columns cols={2}>
  <Card title="Customer onboarding (KYC)" icon="id-card" href="/recipes/kyc-onboarding">
    Create a customer, submit KYC, activate. Every other flow starts here.
  </Card>

  <Card title="Wallets" icon="wallet" href="/recipes/wallets">
    Open a wallet, fund it, place and capture escrow holds.
  </Card>

  <Card title="Lending" icon="hand-holding-dollar" href="/recipes/lending">
    Create a loan, preview the schedule, disburse, and record repayments.
  </Card>

  <Card title="BNPL" icon="cart-shopping" href="/recipes/bnpl">
    Down-payment hold + loan + auto-sweep repayments, end to end.
  </Card>

  <Card title="Payment collections" icon="money-bill-transfer" href="/recipes/collections">
    Trigger a USSD push, poll status, record the verified payment.
  </Card>

  <Card title="First call in 5 minutes" icon="bolt" href="/getting-started">
    Token to first real API response, no detours.
  </Card>
</Columns>

## How it fits together

* **KYC** is the authoritative customer store. A customer must be **active** before holding wallets or loans.
* **Wallets** hold stored value; deposits are gateway-verified; escrow supports hold-and-capture.
* **Lending** originates loans, optionally linked to a wallet with an auto-sweep standing instruction for repayments.
* **Collections** trigger mobile (USSD) payments; verified payments post to loans or wallets.

<Card title="Onboarding" icon="user-plus" href="/onboarding" horizontal>
  How businesses join Bridge, what credentials you get, and sandbox vs production.
</Card>

## Before you send money

<Card title="Tokens expire hourly" icon="key" href="/authentication" horizontal>
  Tokens last about an hour. On a 401, re-generate the token and retry once — built into every recipe.
</Card>
