> ## 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.

# Orders

> Unified order resource for onramp, offramp, and swap — creation, response shape, and status.

An **order** is the central transaction record. Create orders via `POST /v1/orders`; the API infers flow type from quote legs or a reserved `quote_id`.

## Order types

| Type      | `from` leg                      | `to` leg                        | Quickstart                      |
| --------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `onramp`  | Fiat (`currency`)               | Crypto (`currency` + `network`) | [Onramp](/quickstarts/onramp)   |
| `offramp` | Crypto (`currency` + `network`) | Fiat (`currency`)               | [Offramp](/quickstarts/offramp) |
| `swap`    | Crypto                          | Crypto (same network)           | [Swap](/quickstarts/swap)       |

Type is returned as `type` in API responses.

## Response shape

| Field                | Meaning                                                        |
| -------------------- | -------------------------------------------------------------- |
| `reference`          | Liquidramp order ID (e.g. `ORD-…`)                             |
| `merchant_reference` | Your reconciliation key                                        |
| `customer_reference` | End-user identifier from `customer.reference`                  |
| `from` / `to`        | Currency legs with amounts (`network` on crypto legs)          |
| `pricing`            | `base_currency`, `quote_currency`, `exchange_rate` (number)    |
| `fee`                | Fee breakdown when not already embedded in the rate            |
| `status`             | Partner-visible status                                         |
| `payin`              | Pay-in instructions (detail view)                              |
| `payout`             | Payout / release details when requested with `?include=payout` |
| `recipient`          | Destination account or wallet                                  |

List endpoints and webhooks return the summary shape. `GET /v1/orders/:reference` adds `payin`, `recipient`, and optional `refund`. Pass `include=payout` and/or `include=timeline` for those fields.

## Creation flow

1. **Quote** — `POST /v1/orders/quote` to lock pricing ([Quotes](/concepts/quotes))
2. **Create** — `POST /v1/orders` with `quote_id` or explicit `from`/`to` legs
3. **Pay in** — Present `payin` instructions to the end user
4. **Confirm** — Payment is auto-detected. Optionally call `POST /v1/orders/:reference/fulfill` if confirmation is delayed
5. **Settle** — Listen for [webhooks](/concepts/callbacks) or poll the order

<Warning>
  Use a unique `merchant_reference` and deduplicate retries on your side. See [Idempotency](/concepts/idempotency).
</Warning>

## Filtering and retrieval

`GET /v1/orders` supports pagination and filters by `status`, `type`, `network_identifier`, `crypto_currency_symbol`, `fiat_currency_code`, `customer_reference`, and date range (`date_from` / `date_to` as `DD/MM/YYYY`). See [Listing orders](/guides/listing-orders).

## Related

* [Order lifecycle](/concepts/order-lifecycle)
* [Settlement](/concepts/settlement)
* [Create order](/api-reference/create-order)
