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

# Simulate exchange order creation without writing tasks

> Runs the same preflight checks as order creation without creating a task. When the selected city's handover configuration is enabled, include handover.method and the selected office_id or courier address as required by that method. Legacy cities without handover configuration need no handover object. Invalid or unavailable selections return 422.

[Русская версия](https://exchanger-api.iexexchanger.com/api-reference/песочница/post-private-sandbox-exchange-orders-simulate.md)

[Sign the request with HMAC v2](https://exchanger-api.iexexchanger.com/en/start/authentication.md). Requires the `public-api:sandbox:run` scope. Accepts `Idempotency-Key`.

The HTTP example uses test values. Substitute identifiers from your test installation and sign the data you actually send.

### Related methods

* [Validate an exchange order before creation](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/post-private-exchange-orders-preflight.md)
* [Create exchange order](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/post-private-exchange-orders.md)

```http HTTP request template
POST /api/v3/private/sandbox/exchange/orders/simulate HTTP/1.1
Host: your-exchange
Accept: application/json
Authorization: Bearer <token>
X-Api-Signature-Version: v2
X-Api-Timestamp: <unix_timestamp>
X-Api-Nonce: <nonce>
X-Api-Signature: sha256=<hex_digest>
Idempotency-Key: <idempotency_key>
Content-Type: application/json

{
    "route_id": 2,
    "amount": "10",
    "from_requisite": "SANDBOX-DEMO-SOURCE",
    "to_requisite": "SANDBOX-DEMO-DESTINATION",
    "snapshot": {
        "version": "route-snapshot-v1",
        "route_id": 2,
        "hash": "626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340",
        "generated_at": "2026-11-21T18:40:40.772775Z",
        "expires_at": "2026-11-21T18:50:40.772775Z",
        "expiry_signature": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
        "fingerprint": {
            "route_updated_at": "2026-11-21T18:39:37.000000Z",
            "from_currency_updated_at": "2026-11-21T18:39:37.000000Z",
            "to_currency_updated_at": "2026-11-21T18:39:37.000000Z"
        }
    }
}
```


## OpenAPI

````yaml /openapi/openapi.yaml post /private/sandbox/exchange/orders/simulate
openapi: 3.1.0
info:
  title: iEXExchanger Public API
  version: 4.0.0
  description: >
    Use this API to read client and exchange data, create orders, receive

    webhooks, and manage partner payouts. Start with GET /ping to check

    availability and GET /private/scopes to inspect the API scope catalog.


    Private operations require both a Sanctum token in Authorization: Bearer

    <token> and HMAC v2. Send X-Api-Signature-Version with the value v2 together

    with X-Api-Timestamp, X-Api-Nonce and X-Api-Signature. Partner payout
    creation

    also requires an Idempotency-Key. When a private operation lists accepted

    token permissions in x-required-scopes, any one of these scopes is
    sufficient.


    Nonempty HMAC-signed bodies must use application/json or application/*+json.

    Multipart is supported by the upload, order field file and receipt
    operations

    listed below. Send exactly one file part named file. The default JSON body
    limit is 1 MiB. A body

    over the installation's limit returns HTTP 413.

    URL-encoded signed bodies and ambiguous content types return
    invalid_signature.


    JSON responses use one envelope: state=0 means success; state=1 means an

    error. Read error.code for a stable machine-readable reason. List endpoints

    support page pagination, and some support cursor pagination for large lists.

    Reuse an Idempotency-Key when retrying a write request with the same body.

    A replay of webhook management using a saved result from a retired protocol

    returns HTTP 409 with protocol_retired in error.details.reason. A request

    selecting an unsupported webhook payload version returns HTTP 422.


    The English contract is in openapi.yaml and the Russian translation is in

    openapi.ru.yaml. Paths, field names, enum values and error codes are

    identical in both files. The example bodies use the same sandbox data in

    both languages. The server localizes message text according to the request
    locale.

    HTTP 401 indicates missing or invalid authentication or signature. HTTP 403
    indicates an access restriction. HTTP 429 indicates rate or quota limits.
    HTTP 503 indicates the API or site is unavailable.
servers:
  - url: /api/v3
security:
  - sanctumBearer: []
    apiTimestamp: []
    apiNonce: []
    apiSignature: []
tags:
  - name: System
    description: Availability checks.
  - name: Client
    description: The authenticated client's profile and orders.
  - name: Orders
    description: Order lists, status, actions and payment confirmation.
  - name: Exchange
    description: Payment systems, routes, quotes and exchange orders.
  - name: Files
    description: One-time upload intents for verification files.
  - name: Verifications
    description: Identity and card verification requirements and submissions.
  - name: Sandbox
    description: Simulate an exchange order without creating it.
  - name: Reviews
    description: Read published reviews and submit a review for your order.
  - name: Partner
    description: Partner statistics, referrals, exchanges and payouts.
  - name: Platform
    description: Contract versions, JSON schemas and API usage.
  - name: Webhooks
    description: Register destinations and inspect events and delivery attempts.
  - name: Security
    description: Token permissions and request security details.
paths:
  /private/sandbox/exchange/orders/simulate:
    post:
      tags:
        - Sandbox
      summary: Simulate exchange order creation without writing tasks
      description: >-
        Runs the same preflight checks as order creation without creating a
        task. When the selected city's handover configuration is enabled,
        include handover.method and the selected office_id or courier address as
        required by that method. Legacy cities without handover configuration
        need no handover object. Invalid or unavailable selections return 422.
      operationId: postPrivateSandboxExchangeOrdersSimulate
      parameters:
        - $ref: '#/components/parameters/SignatureVersion'
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/CorrelationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExchangeOrderPreflightRequest'
            examples:
              testInput:
                summary: Test input
                value:
                  route_id: 2
                  amount: '10'
                  from_requisite: SANDBOX-DEMO-SOURCE
                  to_requisite: SANDBOX-DEMO-DESTINATION
                  snapshot:
                    version: route-snapshot-v1
                    route_id: 2
                    hash: >-
                      626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340
                    generated_at: '2026-11-21T18:40:40.772775Z'
                    expires_at: '2026-11-21T18:50:40.772775Z'
                    expiry_signature: >-
                      a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
                    fingerprint:
                      route_updated_at: '2026-11-21T18:39:37.000000Z'
                      from_currency_updated_at: '2026-11-21T18:39:37.000000Z'
                      to_currency_updated_at: '2026-11-21T18:39:37.000000Z'
      responses:
        '200':
          $ref: '#/components/responses/SandboxSimulation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
        - sanctumBearer: []
          apiTimestamp: []
          apiNonce: []
          apiSignature: []
components:
  parameters:
    SignatureVersion:
      name: X-Api-Signature-Version
      in: header
      required: true
      description: >-
        Required version of the request signature. Use v2 on the first line of
        the canonical string. The eighth line is the trimmed Idempotency-Key or
        an empty line when there is no key. Sign the originally parsed query
        values.
      schema:
        type: string
        const: v2
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        minLength: 8
        maxLength: 191
        pattern: ^[A-Za-z0-9._:-]{8,191}$
      description: >-
        The usual replay window defaults to 24 hours. Successful order creation,
        payment receipt uploads and partner payouts use durable receipts.
    CorrelationId:
      name: X-Correlation-Id
      in: header
      required: false
      schema:
        type: string
        maxLength: 128
      description: Client-defined id used to correlate API request and webhook events.
  schemas:
    ExchangeOrderPreflightRequest:
      $ref: '#/components/schemas/ExchangeOrderCreateRequest'
      description: Order fields for preflight and sandbox simulation.
    ExchangeOrderCreateRequest:
      type: object
      properties:
        country:
          type:
            - string
            - 'null'
          minLength: 2
          maxLength: 2
        handover:
          anyOf:
            - $ref: '#/components/schemas/CityHandoverSelection'
            - type: 'null'
        outcome_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
        receive_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          description: Alias of outcome_amount.
        email:
          type:
            - string
            - 'null'
          format: email
          deprecated: true
          description: Accepted for compatibility. The order uses the API key owner email.
        income_account:
          type:
            - string
            - 'null'
        outcome_account:
          type:
            - string
            - 'null'
        from_requisite:
          type:
            - string
            - 'null'
          description: Alias of income_account.
        to_requisite:
          type:
            - string
            - 'null'
          description: Alias of outcome_account.
        fields_in:
          type:
            - object
            - 'null'
          additionalProperties: true
        fields_out:
          type:
            - object
            - 'null'
          additionalProperties: true
        direction_fields:
          type:
            - object
            - 'null'
          additionalProperties: true
        user_fields:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            For file fields, provide an array of one-time tokens from the
            route's `user` group. Other fields accept their usual scalar values.
        extra_out:
          type:
            - object
            - 'null'
          additionalProperties: true
        device_type:
          type:
            - string
            - 'null'
          maxLength: 32
        snapshot:
          anyOf:
            - $ref: '#/components/schemas/RouteSnapshot'
            - type: 'null'
      allOf:
        - $ref: '#/components/schemas/ExchangeQuoteRequest'
    SuccessEnvelope:
      type: object
      required:
        - state
        - message
        - result
        - meta
      properties:
        state:
          type: integer
          enum:
            - 0
        message:
          type: string
        result: {}
        meta:
          $ref: '#/components/schemas/Meta'
    ExchangeOrderPreflight:
      type: object
      required:
        - allowed
        - can_create_order
        - checks
        - missing_fields
        - validation_errors
        - validation_issues
        - quote
        - operation_contract
        - requirements
        - snapshot
      properties:
        checks:
          $ref: '#/components/schemas/PreflightChecks'
        validation_issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiIssue'
        allowed:
          type: boolean
        can_create_order:
          type: boolean
        missing_fields:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              type:
                type: string
              message:
                type: string
        validation_errors:
          type: object
          description: >-
            Validation messages by field after required inputs are provided.
            This check covers local rules.
          additionalProperties:
            type: array
            items:
              type: string
        quote:
          $ref: '#/components/schemas/ExchangeQuote'
        operation_contract:
          $ref: '#/components/schemas/OperationContract'
        requirements:
          $ref: '#/components/schemas/VerificationRequirements'
        snapshot:
          $ref: '#/components/schemas/RouteSnapshot'
    ErrorEnvelope:
      type: object
      required:
        - state
        - message
        - code
        - error
        - meta
      properties:
        state:
          type: integer
          enum:
            - 1
        message:
          type: string
        code:
          type: integer
          description: HTTP status code.
        error:
          type: object
          required:
            - code
            - type
            - details
          properties:
            code:
              $ref: '#/components/schemas/ApiErrorCode'
              description: Stable machine-readable API error code.
            type:
              $ref: '#/components/schemas/ApiErrorCode'
              deprecated: true
              description: Backward-compatible alias of `error.code`.
            details:
              $ref: '#/components/schemas/ApiErrorDetails'
        meta:
          $ref: '#/components/schemas/Meta'
    CityHandoverSelection:
      type: object
      description: >-
        Required only when the selected direction-city enables handover. It
        never changes quote prices or adds a delivery fee.
      oneOf:
        - type: object
          required:
            - method
            - office_id
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - office
            office_id:
              type: integer
              minimum: 1
        - type: object
          required:
            - method
            - address
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - courier
            address:
              type: string
              minLength: 1
              maxLength: 1000
        - type: object
          required:
            - method
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - agreement
    ExchangeAmountInput:
      description: >-
        Positive decimal amount without exponent notation. Clients should send a
        decimal string to retain precision.
      anyOf:
        - type: string
          pattern: ^[0-9]+(?:[.][0-9]+)?$
        - type: number
          exclusiveMinimum: 0
    RouteSnapshot:
      type: object
      required:
        - version
        - route_id
        - hash
        - expiry_signature
        - generated_at
        - expires_at
      properties:
        version:
          type: string
          example: route-snapshot-v1
        route_id:
          type: integer
        hash:
          type: string
        expiry_signature:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: >-
            Opaque proof for the expiry window. Echo the complete snapshot
            without changes. Obtain a fresh quote, route detail or preflight if
            this field is missing.
        generated_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        fingerprint:
          type: object
          additionalProperties: true
    ExchangeQuoteRequest:
      type: object
      properties:
        route_id:
          type:
            - integer
            - 'null'
        direction_id:
          type:
            - integer
            - 'null'
        income_payment_system:
          type:
            - integer
            - 'null'
        outcome_payment_system:
          type:
            - integer
            - 'null'
        from_currency_id:
          type:
            - integer
            - 'null'
        to_currency_id:
          type:
            - integer
            - 'null'
        from:
          type:
            - string
            - 'null'
        to:
          type:
            - string
            - 'null'
        from_code:
          type:
            - string
            - 'null'
        to_code:
          type:
            - string
            - 'null'
        amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          example: '100'
        income_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          description: Alias of amount.
        city_id:
          type:
            - integer
            - 'null'
        type_rate:
          description: 0/fixed = fixed rate, 1/floating = floating rate.
          oneOf:
            - type: integer
              enum:
                - 0
                - 1
            - type: string
              enum:
                - '0'
                - '1'
                - fixed
                - floating
            - type: 'null'
        selected_fee_type:
          type:
            - string
            - 'null'
          maxLength: 50
          deprecated: true
          description: Accepted for compatibility. Use selected_fees for selection.
        selected_fees:
          description: >-
            Selected fee selectors from the route operation contract. Object
            maps are accepted for compatibility.
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/ExchangeSelectedFeeInput'
            - type: object
              additionalProperties: true
            - type: 'null'
        selector_fees:
          type:
            - object
            - array
            - 'null'
          deprecated: true
          description: Accepted for compatibility. Use selected_fees for selection.
        checkbox_agreements:
          type: object
          additionalProperties: true
          description: >-
            Selected agreement keys and their checked states, as returned by the
            route operation contract. Fees are resolved from active server
            agreements available to this route.
          example:
            discount: true
            commission: false
        checkbox_fees:
          type: object
          additionalProperties: true
          deprecated: true
          description: >-
            Accepted for compatibility and ignored. Send checkbox_agreements;
            fee values are resolved by the server.
        card_verification_required:
          type:
            - boolean
            - 'null'
        promo_code:
          type:
            - string
            - 'null'
          maxLength: 64
      allOf:
        - $ref: '#/components/schemas/ExchangeRouteSelector'
        - anyOf:
            - required:
                - amount
              properties:
                amount:
                  $ref: '#/components/schemas/ExchangeAmountInput'
            - required:
                - income_amount
              properties:
                income_amount:
                  $ref: '#/components/schemas/ExchangeAmountInput'
    Meta:
      type: object
      required:
        - request_id
        - correlation_id
        - timestamp
      properties:
        request_id:
          type: string
        correlation_id:
          type: string
        timestamp:
          type: string
          format: date-time
        pagination:
          $ref: '#/components/schemas/Pagination'
        filters:
          oneOf:
            - type: object
            - type: array
              maxItems: 0
              items: {}
        sort:
          type: array
          items:
            type: string
        summary:
          anyOf:
            - $ref: '#/components/schemas/PartnerExchangeListSummary'
            - $ref: '#/components/schemas/PartnerPayoutListSummary'
    PreflightChecks:
      type: object
      required:
        - local
        - external
      properties:
        local:
          enum:
            - passed
            - failed
            - not_run
        external:
          const: deferred
    ApiIssue:
      type: object
      required:
        - field
        - code
        - message
      properties:
        field:
          type:
            - string
            - 'null'
        code:
          type: string
        message:
          type: string
        severity:
          enum:
            - error
            - warning
            - info
        meta:
          type:
            - object
            - array
    ExchangeQuote:
      type: object
      required:
        - selector_fees
      properties:
        selector_fees:
          $ref: '#/components/schemas/ExchangeSelectorFees'
        route:
          $ref: '#/components/schemas/ExchangeRoute'
        amounts:
          type: object
          properties:
            give:
              type: string
            receive:
              type: string
        components:
          type: array
          items:
            type: object
            additionalProperties: true
        rate:
          type: object
          properties:
            display:
              type: string
            value:
              type: string
            source:
              type: string
              enum:
                - calculation
            selected:
              type:
                - string
                - 'null'
              enum:
                - fixed
                - floating
                - null
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
        base_rate:
          type: object
          description: >-
            Base direction rate without quote-level city, selector, checkbox or
            verification adjustments. When an independent city formula is usable
            but the base source is unavailable, value and display are null and
            available is false.
          properties:
            display:
              type:
                - string
                - 'null'
            value:
              type:
                - string
                - 'null'
            available:
              type: boolean
              description: >-
                Present as false when the base source is unavailable. An omitted
                property preserves the normal available-base response.
            source:
              type: string
              enum:
                - direction
            selected:
              type:
                - string
                - 'null'
              enum:
                - fixed
                - floating
                - null
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
            note:
              type: string
        adjustments:
          type: object
          description: Quote-level options that affected the calculation rate.
          properties:
            city_id:
              type:
                - integer
                - 'null'
            selected_fee_type:
              type:
                - string
                - 'null'
            selected_fees:
              type: array
              items:
                $ref: '#/components/schemas/ExchangeSelectedFee'
            selector_fees:
              type: array
              items: {}
            checkbox_fees:
              type: array
              items: {}
            card_verification_required:
              type: boolean
        promo:
          type: object
          properties:
            applied:
              type: boolean
            base_receive_amount:
              type: string
        task_payload:
          type: object
          additionalProperties: true
    OperationContract:
      type: object
      properties:
        version:
          type: string
          example: operation-contract-v1
        route:
          $ref: '#/components/schemas/ExchangeRoute'
        operation:
          type: object
          additionalProperties: true
          properties:
            attributes:
              type: object
              additionalProperties: true
              properties:
                city_detail:
                  $ref: '#/components/schemas/ExchangeCityDetails'
        snapshot:
          $ref: '#/components/schemas/RouteSnapshot'
        contract:
          type: object
          additionalProperties: true
          properties:
            dynamic_fields:
              $ref: '#/components/schemas/ExchangeDynamicFields'
            rate:
              type: object
              required:
                - selector_fees
              properties:
                selector_fees:
                  $ref: '#/components/schemas/ExchangeSelectorFees'
            files:
              type: object
              properties:
                create_upload_intent_endpoint:
                  type: string
                commit_upload_intent_endpoint:
                  type: string
                order_field_upload_endpoint:
                  type: string
                receipts_endpoint:
                  type: string
                receipts_allowed:
                  type: boolean
    VerificationRequirements:
      type: object
      properties:
        route_id:
          type:
            - integer
            - 'null'
        order:
          type:
            - object
            - 'null'
          additionalProperties: true
        identity:
          type: object
          properties:
            required:
              type: boolean
            mode:
              type:
                - string
                - 'null'
            description:
              type:
                - string
                - 'null'
            current:
              $ref: '#/components/schemas/VerificationStatus'
            create_endpoint:
              type: string
            blocks_payment:
              type: boolean
            can_submit:
              type: boolean
            flow:
              type: string
        card:
          type: object
          properties:
            required:
              type: boolean
            mode:
              type:
                - integer
                - 'null'
            description:
              type:
                - string
                - 'null'
            settings:
              type:
                - object
                - 'null'
              additionalProperties: true
            additional_photos:
              $ref: '#/components/schemas/CardVerificationAdditionalPhotos'
            current:
              $ref: '#/components/schemas/VerificationStatus'
            create_endpoint:
              type: string
            blocks_payment:
              type: boolean
            can_submit:
              type: boolean
        files:
          type:
            - object
            - 'null'
          additionalProperties: true
    ApiErrorCode:
      type: string
      enum:
        - authentication_required
        - api_token_required
        - api_disabled
        - site_maintenance
        - api_user_disabled
        - account_banned
        - verification_protection
        - api_admin_account_denied
        - ip_not_allowed
        - scope_denied
        - rate_limit_exceeded
        - signature_required
        - invalid_signature
        - signature_expired
        - signature_replay
        - not_found
        - method_not_allowed
        - validation_failed
        - invalid_filter
        - invalid_cursor
        - invalid_scope
        - token_not_found
        - token_inactive
        - quota_exceeded
        - idempotency_conflict
        - idempotency_in_progress
        - invalid_idempotency_key
        - webhook_endpoint_limit_exceeded
        - webhook_endpoint_not_found
        - http_error
        - server_error
    ApiErrorDetails:
      type:
        - object
        - array
        - 'null'
      maxItems: 0
      items: {}
      properties:
        fields:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiIssue'
        required_scopes:
          type: array
          items:
            type: string
        retry_after:
          type:
            - integer
            - 'null'
          minimum: 0
        period:
          enum:
            - day
            - month
        limit:
          type:
            - integer
            - 'null'
        used:
          type: integer
        remaining:
          type:
            - integer
            - 'null'
        resets_at:
          type:
            - string
            - 'null'
          format: date-time
        reason:
          type:
            - string
            - 'null'
        is_banned:
          type: boolean
        ends_at:
          type:
            - string
            - 'null'
          format: date-time
        idempotency_key:
          type: string
        message:
          type: string
        cost:
          type:
            - object
            - 'null'
        headers:
          type: array
          items:
            type: string
          description: >-
            Headers expected by signature verification. For v2 signing errors
            this includes X-Api-Signature-Version.
        algorithm:
          type: string
        ip:
          type:
            - string
            - 'null'
        max:
          type: integer
        locked_until:
          type:
            - string
            - 'null'
          format: date-time
        exceeded:
          type: boolean
    ExchangeSelectedFeeInput:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          minimum: 1
        scope:
          type: string
          enum:
            - common
            - individual
    ExchangeRouteSelector:
      type: object
      anyOf:
        - required:
            - route_id
          properties:
            route_id:
              type: integer
        - required:
            - direction_id
          properties:
            direction_id:
              type: integer
        - allOf:
            - anyOf:
                - required:
                    - income_payment_system
                  properties:
                    income_payment_system:
                      type: integer
                - required:
                    - from_currency_id
                  properties:
                    from_currency_id:
                      type: integer
                - required:
                    - from
                  properties:
                    from:
                      type: string
                - required:
                    - from_code
                  properties:
                    from_code:
                      type: string
            - anyOf:
                - required:
                    - outcome_payment_system
                  properties:
                    outcome_payment_system:
                      type: integer
                - required:
                    - to_currency_id
                  properties:
                    to_currency_id:
                      type: integer
                - required:
                    - to
                  properties:
                    to:
                      type: string
                - required:
                    - to_code
                  properties:
                    to_code:
                      type: string
    Pagination:
      oneOf:
        - $ref: '#/components/schemas/PagePagination'
        - $ref: '#/components/schemas/CursorPagination'
      discriminator:
        propertyName: mode
        mapping:
          page: '#/components/schemas/PagePagination'
          cursor: '#/components/schemas/CursorPagination'
    PartnerExchangeListSummary:
      type: object
      required:
        - total
        - bonus_sum
        - currency
        - confirmed_accruals
        - by_currency
      properties:
        total:
          type: integer
        bonus_sum:
          type: string
        currency:
          type:
            - string
            - 'null'
        confirmed_accruals:
          type: integer
        by_currency:
          type: array
          items:
            $ref: '#/components/schemas/PartnerBonusCurrencySummary'
    PartnerPayoutListSummary:
      type: object
      required:
        - total
        - paid
        - pending
        - rejected
      properties:
        total:
          type: integer
        paid:
          type: integer
        pending:
          type: integer
        rejected:
          type: integer
    ExchangeSelectorFees:
      type: object
      required:
        - mode
        - options
      properties:
        mode:
          type: string
          enum:
            - single
            - multi
        options:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/ExchangeSelectedFee'
              - type: object
                required:
                  - name
                  - description
                properties:
                  name:
                    type: string
                  description:
                    type: string
    ExchangeRoute:
      type: object
      properties:
        id:
          type: integer
        status:
          type: integer
        is_enabled:
          type: boolean
        name:
          type:
            - string
            - 'null'
        from:
          $ref: '#/components/schemas/CurrencySummary'
        to:
          $ref: '#/components/schemas/CurrencySummary'
        limits:
          type: object
          properties:
            min_give:
              type:
                - string
                - 'null'
            max_give:
              type:
                - string
                - 'null'
            min_receive:
              type:
                - string
                - 'null'
            max_receive:
              type:
                - string
                - 'null'
        rate:
          type: object
          properties:
            type:
              type: string
              enum:
                - fixed
                - selectable
            course:
              type:
                - string
                - 'null'
            is_type_rate:
              type: boolean
            default_type_rate:
              type: integer
              enum:
                - 0
                - 1
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
        features:
          type: object
          additionalProperties: true
        sorting:
          type: object
          additionalProperties:
            type: integer
        timestamps:
          type: object
          additionalProperties: true
    ExchangeRateModes:
      description: >-
        Available rate modes keyed by name. When no modes are available, the
        wire value is an empty array.
      anyOf:
        - type: object
          additionalProperties:
            type: object
        - type: array
          maxItems: 0
          items: {}
    ExchangeSelectedFee:
      allOf:
        - $ref: '#/components/schemas/ExchangeSelectedFeeInput'
        - type: object
          required:
            - scope
    ExchangeCityDetails:
      description: >-
        Keys use id_<direction-city-row-id>, not the geographical city ID. A
        route without available cities returns an empty array.
      anyOf:
        - type: object
          additionalProperties:
            type: object
            properties:
              information:
                type:
                  - string
                  - 'null'
              handover:
                $ref: '#/components/schemas/CityHandoverConfiguration'
        - type: array
          maxItems: 0
          items: {}
    ExchangeDynamicFields:
      type: object
      properties:
        direction_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        fields_in:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        fields_out:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        user_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        checkbox_agreements:
          type: array
          items:
            type: object
    VerificationStatus:
      type: object
      required:
        - key
        - label
        - is_final_approved
      properties:
        id:
          type:
            - integer
            - 'null'
        key:
          type: string
          enum:
            - not_submitted
            - pending
            - approved
            - rejected
        label:
          type: string
        is_final_approved:
          type: boolean
        verification_id:
          type:
            - integer
            - 'null'
        verification_uuid:
          type: string
          description: Opaque public identifier of the verification.
    CardVerificationAdditionalPhotos:
      type: object
      required:
        - enabled
        - max_count
        - max_file_size_mb
        - accepted_mime_types
      properties:
        enabled:
          type: boolean
        max_count:
          type: integer
          minimum: 1
          maximum: 5
        max_file_size_mb:
          type: integer
          minimum: 1
          maximum: 10
        accepted_mime_types:
          type: array
          items:
            type: string
            enum:
              - image/jpeg
              - image/png
    PagePagination:
      type: object
      required:
        - mode
        - current_page
        - per_page
        - total
        - last_page
        - from
        - to
        - has_more
      properties:
        mode:
          const: page
        current_page:
          type: integer
          minimum: 1
        per_page:
          type: integer
          minimum: 1
        total:
          type: integer
          minimum: 0
        last_page:
          type: integer
          minimum: 1
        from:
          type:
            - integer
            - 'null'
        to:
          type:
            - integer
            - 'null'
        has_more:
          type: boolean
    CursorPagination:
      type: object
      required:
        - mode
        - per_page
        - cursor
        - next_cursor
        - has_more
        - sort
      properties:
        mode:
          const: cursor
        per_page:
          type: integer
          minimum: 1
        cursor:
          type:
            - string
            - 'null'
        next_cursor:
          type:
            - string
            - 'null'
        has_more:
          type: boolean
        sort:
          type: array
          items:
            enum:
              - id
              - '-id'
    PartnerBonusCurrencySummary:
      type: object
      required:
        - currency
        - bonus_sum
        - confirmed_accruals
      properties:
        currency:
          type:
            - string
            - 'null'
        bonus_sum:
          type: string
        confirmed_accruals:
          type: integer
    CurrencySummary:
      type: object
      properties:
        id:
          type: integer
        payment:
          type:
            - string
            - 'null'
        code:
          type:
            - string
            - 'null'
        designation:
          type:
            - string
            - 'null'
        small_code:
          type:
            - string
            - 'null'
        network:
          type:
            - string
            - 'null'
        network_out:
          type:
            - string
            - 'null'
        decimal:
          type: integer
    CityHandoverConfiguration:
      type: object
      required:
        - enabled
        - methods
        - offices
      properties:
        enabled:
          type: boolean
          description: >-
            Empty legacy configuration is disabled; enabled with no available
            methods must not be treated as legacy.
        methods:
          type: array
          items:
            type: string
            enum:
              - office
              - courier
              - agreement
        courier_description:
          type: string
          minLength: 1
          description: >-
            Optional resolved description in the request locale with configured
            language fallback. Omitted when courier is unavailable or every
            translation is blank; translation maps are never returned.
        offices:
          type: array
          description: >-
            Active linked company offices in the selected geographical city,
            never customer courier addresses.
          items:
            $ref: '#/components/schemas/CityHandoverOffice'
    ExchangeDynamicField:
      type: object
      required:
        - key
        - type
        - required
      properties:
        key:
          type: string
        type:
          type: string
        required:
          type: boolean
        show_label:
          type: boolean
        label:
          type: string
        placeholder:
          type: string
        description:
          type: string
        example:
          type: string
          description: Localized example of a field value.
        content_type:
          type: string
          description: Input content format for displaying the field.
        validation:
          type: object
          description: >-
            Client validation hints. The server applies the configured rules
            when creating an order.
          properties:
            min_length:
              type: integer
              minimum: 1
            max_length:
              type: integer
              minimum: 1
            error_message:
              type: string
            remove_spaces:
              type: boolean
            has_validator_combination:
              type: boolean
            show_card_brand:
              type: boolean
            qr_wallet_schemes:
              type: array
              items:
                type: string
        display_scan_qr:
          type: boolean
          description: >-
            Enables the QR scanner on a currency input, select, or radio field
            in clients that support scanning.
        mask:
          type: string
          description: Input mask for a text currency field.
        mask_placeholder:
          type: string
          minLength: 1
          maxLength: 1
          description: Placeholder character for slots in the currency input mask.
        wallet_validator_type:
          type: string
          description: Server-side wallet validation type for a text currency field.
        options:
          type: array
          items:
            type: object
        file:
          type: object
          properties:
            allowed_types:
              type: array
              items:
                type: string
            allowed_extensions:
              type: array
              items:
                type: string
            accept:
              type: string
            max_file_size_mb:
              type:
                - integer
                - 'null'
            max_files:
              type:
                - integer
                - 'null'
        upload:
          type: object
          properties:
            endpoint:
              type: string
            direction_id:
              type: integer
            field_id:
              type: integer
            scope:
              type: string
              enum:
                - currency
                - direction
                - user
            group:
              type: string
              enum:
                - in
                - out
                - direction
                - user
    CityHandoverOffice:
      type: object
      required:
        - id
        - name
        - address
      properties:
        id:
          type: integer
          minimum: 1
        name:
          type: string
          description: >-
            Resolved office name in the request locale; missing or blank
            translations use the configured language fallback. Never a
            translation map.
        address:
          type: string
          description: >-
            Resolved company address with the same language fallback. Never a
            customer courier address or a translation map.
  responses:
    SandboxSimulation:
      description: Simulation data and associated webhook event ID.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/SuccessEnvelope'
              - type: object
                properties:
                  result:
                    type: object
                    required:
                      - simulation
                    properties:
                      simulation:
                        type: object
                        required:
                          - id
                          - will_create_order
                          - created_task_id
                          - preflight
                          - event_id
                        properties:
                          id:
                            type: string
                            format: uuid
                          will_create_order:
                            const: false
                          created_task_id:
                            type: 'null'
                          preflight:
                            $ref: '#/components/schemas/ExchangeOrderPreflight'
                          event_id:
                            type: string
                            format: uuid
    Unauthorized:
      description: >-
        Valid API authentication is required. With a valid bearer token, a
        missing signature version returns signature_required and an unsupported
        version returns invalid_signature.
      headers:
        WWW-Authenticate:
          required: true
          schema:
            type: string
            example: Bearer realm="exchanger-api"
      content:
        application/json:
          examples:
            signatureRequired:
              $ref: '#/components/examples/QuickstartSignatureRequired'
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Error:
      description: Standard error envelope.
      headers:
        Retry-After:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  examples:
    QuickstartSignatureRequired:
      summary: Valid Bearer token with missing HMAC headers
      value:
        state: 1
        message: HMAC signature is required for this API token.
        code: 401
        meta:
          request_id: 1b2e3571-013b-4305-bdcf-1d53bb1cdaee
          correlation_id: 1b2e3571-013b-4305-bdcf-1d53bb1cdaee
          timestamp: '2026-11-21T18:40:40.675585Z'
        error:
          code: signature_required
          type: signature_required
          details:
            headers:
              - X-Api-Timestamp
              - X-Api-Nonce
              - X-Api-Signature
              - X-Api-Signature-Version
            algorithm: hmac-sha256-v2
  securitySchemes:
    sanctumBearer:
      type: http
      scheme: bearer
      bearerFormat: Sanctum
      description: 'Sanctum token in `Authorization: Bearer <token>` format.'
    apiTimestamp:
      type: apiKey
      in: header
      name: X-Api-Timestamp
      description: >-
        Positive Unix seconds or an absolute ISO 8601 timestamp with seconds and
        a numeric offset or Z. A fractional second may contain up to six digits.
    apiNonce:
      type: apiKey
      in: header
      name: X-Api-Nonce
      description: >-
        Unique nonce per token within the signing window. Use 8 to 128
        characters from A–Z, a–z, 0–9, period, underscore, colon and hyphen.
    apiSignature:
      type: apiKey
      in: header
      name: X-Api-Signature
      description: Hex HMAC-SHA256 signature, optionally prefixed with `sha256=`.

````

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