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

# API overview

> Base URLs, response format, rate limits, authentication, and idempotency for the Remitflex REST API.

The Remitflex API is a RESTful JSON API for cross-chain collection, Solana swaps, local fiat, cNGN, rates, customers, and a unified transaction ledger.

## Base URLs

| Environment | Base URL                      |
| ----------- | ----------------------------- |
| Production  | `https://api.remitflex.io/v1` |

<Note>
  Test keys use the `rmf_test_` prefix; live keys use `rmf_live_`. Both work against the same base URL — environment is encoded in the key, not the hostname.
</Note>

## Versioning

All routes are prefixed with `/v1`. Breaking changes will ship under a new version path with advance notice.

## HTTPS

Production requests must use HTTPS. Plain HTTP is only appropriate for local development.

## Request format

Send JSON bodies with `Content-Type: application/json` on `POST` requests.

```bash theme={null}
curl -X POST https://api.remitflex.io/v1/payment-routes \
  -H "Authorization: Bearer rmf_test_xxxx" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"Supplier collection","originChainKey":"tron","destinationChainKey":"base","destinationCurrency":"USDC","destinationAddress":"..."}'
```

## Response format

All responses use a consistent envelope.

**Success (2xx):**

```json theme={null}
{
  "status": "success",
  "message": "Payment route created",
  "data": { }
}
```

**Error (4xx / 5xx):**

```json theme={null}
{
  "status": "error",
  "message": "Payment route not found"
}
```

Validation errors (`422`) include an `errors` object with per-field messages.

Each endpoint in the [API reference](/api-reference) documents its response shape under **Response** — field names, types, and the `status` / `message` / `data` envelope. Discovery endpoints return network keys and symbols only (no internal chain IDs).

## Authentication

Business endpoints accept either:

| Method        | Header                             | Notes                                  |
| ------------- | ---------------------------------- | -------------------------------------- |
| API key       | `Authorization: Bearer rmf_live_…` | Scoped; idempotency required on writes |
| Dashboard JWT | `Authorization: Bearer eyJ…`       | Full access; no idempotency required   |

See [Authentication](/api-reference/authentication).

## Idempotency

API-key mutating requests require `Idempotency-Key`. See [Idempotency](/api-reference/idempotency).

## Rate limits

Global limit: **200 requests per 15 minutes** per IP. Auth endpoints have a stricter limit of **20 per 15 minutes**.

When exceeded, the API returns `429 Too Many Requests`.

## Health check

`GET /health` (no `/v1` prefix, no auth):

```json theme={null}
{
  "status": "ok",
  "env": "development",
  "ts": "2026-06-26T12:00:00.000Z"
}
```

## Path IDs

Path placeholders are **named** RemitFlex UUIDs — not provider ids, wallet addresses, or bank account numbers.

| Placeholder                                                                   | Means                                                       |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------- |
| `{customerId}`                                                                | Customer `id` from `POST` / `GET /customers`                |
| `{paymentRouteId}`                                                            | Payment route `id` from `POST` / `GET /payment-routes`      |
| `{collectionId}`                                                              | Payment link (collection) `id` — parent or checkout session |
| `{swapId}`                                                                    | Swap `id` from `POST` / `GET /swaps`                        |
| `{convertId}` / `{withdrawalId}` / `{payoutId}` / `{payinId}` / `{depositId}` | cNGN object `id` from the matching create/list endpoint     |
| `{orderId}`                                                                   | Local fiat offramp/onramp order id                          |
| `{webhookEndpointId}`                                                         | Webhook endpoint `id` from `POST` / `GET /webhooks`         |
| `{notificationId}`                                                            | In-app notification `id` from `GET /notifications`          |

OpenAPI path parameters use the same names and describe which resource each refers to.

## Available resources

| Resource       | Description                                                                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Payment routes | Cross-chain collection — `GET/POST /payment-routes`                                                                                                     |
| Payment links  | Shareable pay URLs and hosted pay page — `GET/POST /collections`, public `GET/POST /pay/{collectionId}` (invoice id, checkout parent id, or session id) |
| Swaps          | Solana EURC↔USDC — `GET/POST /swaps`                                                                                                                    |
| Swap rates     | Indicative Solana quotes — `GET /rates`                                                                                                                 |
| Offramps       | Stablecoin → local fiat bank payout — `GET/POST /offramps` (`?customerId=` on list)                                                                     |
| Onramps        | Local fiat → stablecoin delivery — `GET/POST /onramps` (`?customerId=` on list)                                                                         |
| Fiat reference | Currencies, banks, account verification, sell quotes — `GET/POST /fiat/...`                                                                             |
| cNGN           | Customer VA, convert, withdraw, payout — `/cngn/*` (list endpoints accept `?customerId=`)                                                               |
| Customers      | Organisation customers — `GET/POST /customers`                                                                                                          |
| Transactions   | Unified ledger — `GET /transactions`                                                                                                                    |

Browse the **API Reference** tab in the sidebar for interactive endpoint documentation and the API playground.

## JWT-only routes (not in API reference)

* `/v1/auth/*` — dashboard login and signup
* `/v1/api-keys/*` — key management
* `/v1/admin/ops/*` — RemitFlex internal ops only (not a merchant API)
