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

# Run an exchange through the API

> Run an iEXExchanger exchange from selecting a route and calculating the amount to creating the order, getting payment instructions, and confirming receipt.

To run an exchange, build the form from the route settings, calculate the amount, and create the order. The exchange determines how the customer pays and when payment instructions are available.

The examples use `https://your-exchange`. Substitute your test installation and [sign private requests](https://exchanger-api.iexexchanger.com/en/start/authentication.md). Run the `node request.mjs` commands with the setup from the [quickstart](https://exchanger-api.iexexchanger.com/en/start/quickstart.md).

For a new connection, obtain an [API key and the required scopes](https://exchanger-api.iexexchanger.com/en/start/access.md). Check the public `GET /api/v3/ping` and signed `GET /api/v3/private/ping`. The first call checks availability. The second checks access and signing. To identify the contracts on your installation, read `GET /api/v3/public/contracts`.

`/api/v3` identifies the route generation. `info.version` in the OpenAPI file identifies the API description for tooling and leaves the request URL unchanged. The exchange form (`operation-contract-v1`), capability matrix (`route-capabilities-v1`), and snapshot (`route-snapshot-v1`) have separate versions. Verify them and repeat the [production readiness checks](https://exchanger-api.iexexchanger.com/en/guides/reliability/production.md) after upgrading the exchange.

**1. Find an exchange route**

Choose a supported pair from the catalog. Save `route_id` and read the required fields and verification rules. [Find exchange routes](https://exchanger-api.iexexchanger.com/en/guides/exchange/catalog.md)

**2. Calculate the exchange**

Send the amount the customer gives. Show the expected amount to receive, then submit the form and route snapshot for preflight. Wait for `can_create_order: true`. [Quote and check the order](https://exchanger-api.iexexchanger.com/en/guides/exchange/quote-and-preflight.md)

**3. Create the order**

Save the request body and `Idempotency-Key` before sending. Save `tracking_id` and the order number `public_id` from the HTTP 201 response. [Create an order](https://exchanger-api.iexexchanger.com/en/guides/exchange/create-order.md)

**4. Get payment instructions**

Check the available order actions. Prepare instructions if the route requires it. Display account details or the checkout link from the GET response when the instructions are `ready`. [Get instructions and check payment](https://exchanger-api.iexexchanger.com/en/guides/exchange/payment-and-status.md)

**5. Track the result**

Read the compact order status and payment state. Display the customer's payment report separately from confirmed receipt of funds. [Read statuses](https://exchanger-api.iexexchanger.com/en/guides/exchange/statuses.md) · [Set up webhooks](https://exchanger-api.iexexchanger.com/en/guides/reliability/webhooks.md)

## When the route requires a check

| API response | Action |
| - | - |
| A form field requires a file | Upload the file and pass the returned token in the appropriate field. |
| Verification blocks payment instructions | Read the order requirements and complete the available verification flow. |
| You lost the creation response | Retry the same request with the original key and a fresh signature. |

> [card] [Files and verification](https://exchanger-api.iexexchanger.com/en/guides/exchange/files-and-verifications.md)
>
> Dynamic fields, identity verification, and card verification.


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