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

# Connect a website, app, bot, or CRM

> Connect Exchanger API to a website, mobile app, Telegram bot, CRM, online shop, or partner portal using a backend that signs requests and verifies webhooks.

Connect your website, mobile app, Telegram bot, or CRM to Exchanger API through your backend. The interface collects input and displays state. Your backend signs requests on behalf of the key owner and receives webhooks from the exchanger.

## Set up the integration backend

1. Get the [API address, token, and HMAC secret](https://exchanger-api.iexexchanger.com/en/start/access.md) for the customer account you want to connect. Store the credentials on your server and grant the scopes needed for the workflow. Start by [checking the connection](https://exchanger-api.iexexchanger.com/en/start/quickstart.md) on a test installation.
2. Check which users in your application can view the shop order, exchange order, and payment details. Your backend selects the credential associated with the account. Exchanger API checks the key's scopes and resource ownership on the exchanger.
3. Before the first create request, save your local operation ID, the request body, and the `Idempotency-Key`. Save the returned `tracking_id` or `public_id` as a string. Use it to update the same record after polling or receiving a webhook. [Safe retries](https://exchanger-api.iexexchanger.com/en/guides/reliability/idempotency.md)

Send the site, app, or bot only the data needed for its screen or message. Keep the token, HMAC secret, and webhook signing secret on the backend.

## Website and mobile app

1. Load the [payment systems and exchange routes](https://exchanger-api.iexexchanger.com/en/guides/exchange/catalog.md) with `public-api:exchange:routes:read`. Read the selected route's capabilities to display current limits, reserves, and required fields.
2. Calculate the amount with `public-api:exchange:quotes:read`, pass the quote snapshot to [preflight](https://exchanger-api.iexexchanger.com/en/guides/exchange/quote-and-preflight.md), and display field errors. Ask the customer to confirm once `result.preflight.can_create_order` is `true`. External checks can run when the order is created.
3. Create the order with `public-api:exchange:orders:create` and the saved idempotency key. Fetch [payment instructions](https://exchanger-api.iexexchanger.com/en/guides/exchange/payment-and-status.md). Display payment details or the checkout link once `result.payment_instructions.status` is `"ready"`.
4. After the session resumes, read the order by its saved identifier. Use the compact status to refresh the interface and load full details when the customer opens the order. [Complete exchange workflow](https://exchanger-api.iexexchanger.com/en/guides/exchange/overview.md)

## Telegram bot

Your bot sends commands to a backend that stores the draft form and associates the bot session with a customer account. Show the quoted amount and required fields before creating the order. The confirmation button submits one operation with the saved `Idempotency-Key`, even if the user presses it more than once. Before fetching status, verify that the order belongs to the linked session.

For notifications, [subscribe to order events](https://exchanger-api.iexexchanger.com/en/guides/reliability/webhooks.md). Verify the signature, record the event ID, and read the current order status. Notify the user after your system saves the update.

## CRM and support

Use [GET /private/orders](https://exchanger-api.iexexchanger.com/en/api-reference/orders/get-private-orders.md) with `public-api:orders:read` for history. Use [compact order status](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/get-private-exchange-orders-by-order-status-summary.md) to refresh a single order. These requests return records owned by the selected key. If the CRM handles multiple customer accounts, resolve the account before making the request.

When `order.status_changed` arrives, update the matching record. For reconciliation, use a cursor list with the same filters and sorting on each page. Show support the order identifier and `meta.request_id` when they need to identify a particular API request. [Order history](https://exchanger-api.iexexchanger.com/en/guides/account/history-and-reviews.md)

## Online shop and payment processing

An online shop can call Exchanger API as an exchanger customer and associate a shop order with an exchange order. After payment preparation, open `details.checkout_url` when `status` is `ready` and `mode` is `checkout`. For `mode: "requisites"`, show the payment details returned by the exchanger.

Read [payment progress](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/get-private-exchange-orders-by-order-payment-status.md) after `order.payment_received` or when the customer returns from the payment form. `result.payment.provider_confirmed` records confirmed receipt. To check whether an exchange has completed, read `result.status.key` and look for `"completed"`. The exchanger receives payment confirmation through the provider configured by its operator.

## Partner portal

Read the [partner profile](https://exchanger-api.iexexchanger.com/en/api-reference/partner/get-private-partner.md) with `public-api:partner:read` and display `referral_link.url` to its owner. Use the separate read scopes for referrals, exchange earnings, and statistics. For withdrawals, load methods and preview the payout with `public-api:partner:payouts:read` first. Grant `public-api:partner:payouts:create` only when the portal submits approved requests. [Earnings and payouts](https://exchanger-api.iexexchanger.com/en/guides/account/partner.md)

## Check a status update

Copy `request.mjs` from the [quickstart](https://exchanger-api.iexexchanger.com/en/start/quickstart.md) and substitute the `tracking_id` of an order on your test installation. Either `public-api:orders:detail:read` or `public-api:orders:read` grants access.

```bash theme={null}
node request.mjs GET '/api/v3/private/exchange/orders/order-1042/status-summary'
```

Excerpt from a `200` response for a completed test order.

```json theme={null}
{
  "state": 0,
  "result": {
    "order": { "tracking_id": "order-1042" },
    "status": { "key": "completed", "is_final": true }
  }
}
```

When you receive an event for that order, reread this resource and apply the update once. For `403`, check the operation's scope. For `404`, check the identifier and account. For `429 quota_exceeded`, wait for the quota reset. For `429 rate_limit_exceeded`, follow `Retry-After` when provided. If a create request times out with an unknown result, retry with the same body and idempotency key and a fresh signature. [API errors](https://exchanger-api.iexexchanger.com/en/guides/reliability/errors.md) · [Production checklist](https://exchanger-api.iexexchanger.com/en/guides/reliability/production.md)


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