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

# Quotes

> Ramp, fiat, and checkout quotes before committing funds.

Quote endpoints return exact fees and settlement amounts before you create links, batches, or custom checkout UI.

## Merchant quotes

Base path: `/api/v1/merchant`

| Method | Path           | Description                    |
| ------ | -------------- | ------------------------------ |
| `POST` | `/quotes/ramp` | Crypto onramp or offramp quote |
| `POST` | `/quotes/fiat` | Fiat corridor quote            |

### Ramp quote

`POST /api/v1/merchant/quotes/ramp`

<RequestExample>
  ```bash cURL theme={null}
  curl -s -X POST "https://api.morapay.io/api/v1/merchant/quotes/ramp" \
    -H "Content-Type: application/json" \
    -H "Morapay-Key: $MORAPAY_PUBLIC_KEY" \
    -H "Morapay-Timestamp: $TIMESTAMP" \
    -H "Morapay-Signature: v1=$SIGNATURE" \
    -d '{
      "action": "buy",
      "sourceAsset": "USDC",
      "targetAsset": "ETH",
      "targetChain": "1",
      "amount": 100,
      "amountType": "source"
    }'
  ```
</RequestExample>

<ResponseExample>
  <CodeGroup>
    ```json 200 OK theme={null}
    {
      "success": true,
      "data": {
        "quoteId": "quote_uuid",
        "sourceAmount": "100",
        "targetAmount": "0.042",
        "expiresAt": "2026-03-01T12:05:00.000Z"
      }
    }
    ```

    ```json 401 Unauthorized theme={null}
    {
      "success": false,
      "error": "Invalid request signature.",
      "code": "auth.signature.mismatch",
      "requestId": "req_ramp401"
    }
    ```

    ```json 422 Unprocessable Entity theme={null}
    {
      "success": false,
      "error": "Token ETH is not supported on chain 1 in TEST mode.",
      "code": "crypto.unsupported_token",
      "requestId": "req_ramp422"
    }
    ```
  </CodeGroup>
</ResponseExample>

### Fiat quote

`POST /api/v1/merchant/quotes/fiat`

Returns corridor pricing for fiat legs used in custom integrations.

<RequestExample>
  ```bash cURL theme={null}
  curl -s -X POST "https://api.morapay.io/api/v1/merchant/quotes/fiat" \
    -H "Content-Type: application/json" \
    -H "Morapay-Key: $MORAPAY_PUBLIC_KEY" \
    -H "Morapay-Timestamp: $TIMESTAMP" \
    -H "Morapay-Signature: v1=$SIGNATURE" \
    -d '{
      "from": "USD",
      "to": "GHS",
      "amount": 100,
      "purpose": "spot"
    }'
  ```
</RequestExample>

<ResponseExample>
  <CodeGroup>
    ```json 200 OK theme={null}
    {
      "success": true,
      "data": {
        "from": "USD",
        "to": "GHS",
        "rate": "12.45",
        "amountOut": "1245.00"
      }
    }
    ```

    ```json 422 Unprocessable Entity theme={null}
    {
      "success": false,
      "error": "Corridor not supported.",
      "code": "request.validation_failed",
      "requestId": "req_fiat422"
    }
    ```
  </CodeGroup>
</ResponseExample>

## Commerce fiat quote

`POST /api/public/commerce/fiat`

Proxies to Core `POST /api/commerce/checkout-fiat`. Use this path from checkout BFFs and hosted flows.

<Note>
  Legacy Core alias: `POST /api/commerce/paystack-fiat-quote` (same handler, not exposed on the public API host).
</Note>

| Field             | Description                                                         |
| ----------------- | ------------------------------------------------------------------- |
| `payment_link_id` | Link uuid                                                           |
| `payer_currency`  | Payer fiat currency                                                 |
| `quote_tier`      | `mobile_money`, `bank_transfer`, `card_local`, `card_international` |
| `invoice_major`   | Optional invoice override                                           |

See [Fiat checkout API](/api-reference/fiat-checkout).

## Link quote

`POST /api/v1/merchant/links/:id/quote`

Merchant clearing estimate for fiat-denominated links.

<RequestExample>
  ```bash cURL theme={null}
  curl -s -X POST "https://api.morapay.io/api/v1/merchant/links/link_uuid/quote" \
    -H "Content-Type: application/json" \
    -H "Morapay-Key: $MORAPAY_PUBLIC_KEY" \
    -H "Morapay-Timestamp: $TIMESTAMP" \
    -H "Morapay-Signature: v1=$SIGNATURE" \
    -d '{ "invoice_major": 100 }'
  ```
</RequestExample>

## Checkout catalog quote

`POST /api/v1/quotes/checkout`

Returns token payout rows for custom checkout UIs.

| Host                 | Path                               |
| -------------------- | ---------------------------------- |
| Morapay API (public) | `POST /api/public/quotes/checkout` |
| Core (direct)        | `POST /api/v1/quotes/checkout`     |

<RequestExample>
  ```bash cURL theme={null}
  curl -s -X POST "https://api.morapay.io/api/v1/quotes/checkout" \
    -H "Content-Type: application/json" \
    -H "Morapay-Key: $MORAPAY_PUBLIC_KEY" \
    -H "Morapay-Timestamp: $TIMESTAMP" \
    -H "Morapay-Signature: v1=$SIGNATURE" \
    -d '{
      "inputAmount": "100",
      "inputCurrency": "USD",
      "environment": "LIVE"
    }'
  ```
</RequestExample>

<ResponseExample>
  <CodeGroup>
    ```json 200 OK theme={null}
    {
      "success": true,
      "data": {
        "rows": [
          {
            "tokenSymbol": "USDC",
            "chainId": "8453",
            "payoutAmount": "99.50"
          }
        ]
      }
    }
    ```

    ```json 400 Bad Request theme={null}
    {
      "success": false,
      "error": "inputAmount is required.",
      "code": "request.invalid",
      "requestId": "req_checkout400"
    }
    ```
  </CodeGroup>
</ResponseExample>

## Related

* [Payment links API](/api-reference/payment-links)
* [Disbursement API](/api-reference/disbursement)
* [Fiat checkout API](/api-reference/fiat-checkout)
