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

# How it works

> The journey every payment takes, from price to completion.

Every payment on Bridge follows the same five steps, whether it's an onramp or an offramp.

```mermaid theme={null}
flowchart LR
  A[Add customer] --> B[Get a quote]
  B --> C[Create payment]
  C --> D[Customer pays]
  D --> E[Customer receives funds]
```

## The five steps

**1. Add your customer**

Tell us who is making the payment: a person (`retail`) or a company (`business`). You get back a customer ID that starts with `cus_`. You do this once per customer.

[Onboard a customer](https://docs.bridge.linkio.world/flows/onboard-customer.md)

**2. Get a quote**

Ask how much your customer will receive. For example: "If my customer pays ₦150,000, how much USDC do they get?" You get back a quote ID that starts with `qte_` and a price that is held for a short time.

[Get a quote](https://docs.bridge.linkio.world/flows/quotes.md)

**3. Create the payment**

Use the quote to create a payment. You also say where the money should go: a stablecoin wallet (onramp) or a bank or mobile money account (offramp). You get back a payment ID that starts with `pay_` and **deposit instructions**: where your customer must send their money.

**4. Your customer pays**

Show the deposit instructions to your customer. They send the money: a bank transfer, a mobile money approval on their phone, or a stablecoin transfer.

**5. Your customer receives their funds**

Once we receive the money, we convert it and send it to the destination. We send you a [webhook](https://docs.bridge.linkio.world/webhooks/overview.md) at every step, so you always know where the payment is.

## Status and state

Each payment has two labels that tell you where it is.

* **`status`** is the simple answer: `pending`, `success`, or `failed`. Use it to show your customer a result.
* **`state`** is the exact step, such as `fiat_pending` or `processing`. Use it to show progress or to debug.

The happy path looks like this:

> [tab] Onramp
>
> ```mermaid theme={null}
> flowchart LR
> initiated --> quote_locked --> fiat_pending --> fiat_received --> processing --> completed
> ```

> [tab] Offramp
>
> ```mermaid theme={null}
> flowchart LR
> initiated --> quote_locked --> stable_pending --> stable_received --> processing --> completed
> ```

A payment can also end up `failed`, `canceled`, or `reversed`, or be put on hold as `paused` or `flagged`. Each state is explained on the [onramp](https://docs.bridge.linkio.world/flows/onramp.md#every-state) and [offramp](https://docs.bridge.linkio.world/flows/offramp.md#every-state) pages.

## IDs you'll see

Every ID has a short prefix so you can tell what it is at a glance.

| Prefix | What it is |
| - | - |
| `cus_` | A customer |
| `qte_` | A quote |
| `pay_` | A payment |
| `ref_` | A payment's reference |
| `evt_` | An event |
| `wbd_` | A webhook delivery |
| `stm_` | A statement you created in the Bridge app |
| `req_` | A request. Include it when you contact support. |

After the prefix, every ID has 26 letters and numbers, for example `pay_8fK2mQ9xLp3VnR7tY1wZ4cB6dE`.

## Amounts

Amounts are always sent and returned as **text**, not numbers, so no precision is lost. For example `"150000"` or `"97.25"`. Amounts are in the main unit of the currency (for example naira, not kobo).


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