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

# Offramp Quickstart

> Crypto to fiat — quote, create order, crypto deposit, and bank payout.

Customer sends crypto; Liquidramp settles fiat to a bank account. Order type is inferred from quote legs (crypto `from` → fiat `to`).

<Note>
  Use `POST /orders`. All write requests require `sk_*` auth and [HMAC signing](/getting-started/authentication).
</Note>

## Prerequisites

* KYB-approved partner account
* KYC completed on the end user, preferably via a KYC provider (required for offramp)
* Verified bank account details for the recipient (use account lookup below)
* Signing implemented per [Authentication](/getting-started/authentication)

## End-to-end flow

<Steps>
  <Step title="Create a quote">
    Lock a rate for crypto amount → fiat currency.
  </Step>

  <Step title="Create the order">
    Submit quote ID with `recipient` bank details (`institution_code`, `account_number`, `account_name`).
  </Step>

  <Step title="Collect crypto deposit">
    Show `payin` instructions (deposit address, asset, network, amount) from the order response.
  </Step>

  <Step title="Wait for payment confirmation">
    Liquidramp auto-detects the deposit. Optionally submit the on-chain `tx_hash` via `POST /orders/:reference/fulfill` if confirmation is delayed.
  </Step>

  <Step title="Track fiat payout">
    Request `?include=payout` on the order, or listen for `order.fiat_sent` / `order.settled` webhooks.
  </Step>
</Steps>

```mermaid theme={null}
sequenceDiagram
    participant App as Your App
    participant API as Liquidramp API
    participant User as Customer

    App->>API: POST /v1/orders/quote
    API-->>App: quote_id, pricing
    App->>API: POST /v1/orders
    API-->>App: order + payin (crypto deposit)
    App->>User: Show deposit address + amount
    User->>API: On-chain crypto transfer
    opt Delayed confirmation
        App->>API: POST /v1/orders/:ref/fulfill (tx_hash)
    end
    API-->>App: webhook order.asset_locked
    API-->>App: webhook order.fiat_sent
    API-->>App: webhook order.settled
```

## 1. Create a quote

```bash theme={null}
curl -X POST "$BASE_URL/orders/quote" \
  -H "Content-Type: application/json" \
  -H "liquidramp-client-id: $CLIENT_ID" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "liquidramp-timestamp: $TIMESTAMP" \
  -H "liquidramp-signature: $SIGNATURE" \
  -d '{
  "from": { "currency": "USDT", "network": "BSC", "amount": 50 },
  "to": { "currency": "NGN" },
  "partner_fee": 0
}'
```

## 2. Create the order

```bash theme={null}
curl -X POST "$BASE_URL/orders" \
  -H "Content-Type: application/json" \
  -H "liquidramp-client-id: $CLIENT_ID" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "liquidramp-timestamp: $TIMESTAMP" \
  -H "liquidramp-signature: $SIGNATURE" \
  -d '{
  "quote_id": "QUOTE_ID_FROM_STEP_1",
  "merchant_reference": "merchant-ref-002",
  "recipient": {
    "institution_code": "000004",
    "account_number": "0123456789",
    "account_name": "Jane Doe"
  },
  "customer": {
    "reference": "cust-001",
    "name": "Jane Doe",
    "email": "jane@example.com"
  }
}'
```

`recipient` must include `institution_code`, `account_number`, and `account_name`. Validate the account **before** creating the order:

```bash theme={null}
curl -X GET "$BASE_URL/account-lookup?account_number=0123456789&bank_code=000004" \
  -H "liquidramp-client-id: $CLIENT_ID" \
  -H "Authorization: Bearer $PUBLIC_KEY"
```

Account lookup can use a public key (`pk_*`, no HMAC) or a secret key (`sk_*`, HMAC required) from your backend. `bank_code` is the same as `institution_code` on the order. List institutions via [`GET /institutions`](/api-reference/list-institutions).

The response `payin` object is the crypto deposit the customer must send:

```json theme={null}
"payin": {
  "asset": "USDT",
  "address": "0xDepositAddress...",
  "network": "BSC",
  "amount": 50,
  "expires_at": "2026-06-27T13:00:00.000Z",
  "paid_at": null
}
```

The customer sends exactly `amount` of `asset` on `network` to `address` before `expires_at`.

## 3. Confirm pay-in (optional)

Liquidramp auto-detects the on-chain deposit. Call fulfill only if confirmation is delayed:

```bash theme={null}
curl -X POST "$BASE_URL/orders/ORD-REFERENCE/fulfill" \
  -H "Content-Type: application/json" \
  -H "liquidramp-client-id: $CLIENT_ID" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "liquidramp-timestamp: $TIMESTAMP" \
  -H "liquidramp-signature: $SIGNATURE" \
  -d '{
  "tx_hash": "0xabc123def456789"
}'
```

## 4. Poll payout

```bash theme={null}
curl -X GET "$BASE_URL/orders/ORD-REFERENCE?include=payout" \
  -H "liquidramp-client-id: $CLIENT_ID" \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "liquidramp-timestamp: $TIMESTAMP" \
  -H "liquidramp-signature: $SIGNATURE"
```

When complete, `payout` includes fiat transfer details (`account_number`, `institution_code`, `tx_reference`, `paid_at`).

## Related

| Endpoint                                                      | Method | Purpose                                          |
| ------------------------------------------------------------- | ------ | ------------------------------------------------ |
| [`/orders/quote`](/api-reference/create-quote)                | POST   | Reserve rate                                     |
| [`/orders`](/api-reference/create-order)                      | POST   | Create offramp order                             |
| [`/orders/{reference}/fulfill`](/api-reference/fulfill-order) | POST   | Optional pay-in proof if confirmation is delayed |
| [`/account-lookup`](/api-reference/account-lookup)            | GET    | Validate bank account                            |
| [`/orders/{reference}`](/api-reference/get-order)             | GET    | Order + payout                                   |

* [Escrow](/concepts/escrow)
* [Webhooks](/quickstarts/webhooks)
