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

# Cancel current client exchange order

> Cancel the client's order if its current state allows cancellation. The API updates the order state.

[Русская версия](https://exchanger-api.iexexchanger.com/api-reference/обмен/delete-private-exchange-orders-by-order.md)

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

### Related methods

* [Cancel current client exchange order](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/post-private-exchange-orders-by-order-cancel.md)

```http HTTP request template
DELETE /api/v3/private/exchange/orders/{order} 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>
```


## OpenAPI

````yaml /openapi/openapi.yaml delete /private/exchange/orders/{order}
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/exchange/orders/{order}:
    delete:
      tags:
        - Exchange
      summary: Cancel current client exchange order
      description: >-
        Cancel the client's order if its current state allows cancellation. The
        API updates the order state.
      operationId: deletePrivateExchangeOrdersByOrder
      parameters:
        - $ref: '#/components/parameters/SignatureVersion'
        - name: order
          in: path
          required: true
          schema:
            type: string
          description: Database id, public_id or tracking_id.
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/CorrelationId'
      responses:
        '200':
          $ref: '#/components/responses/OrderResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/Error'
        '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.
  responses:
    OrderResult:
      description: Current order after the operation.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/SuccessEnvelope'
              - type: object
                properties:
                  result:
                    type: object
                    required:
                      - order
                    properties:
                      order:
                        $ref: '#/components/schemas/Order'
    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'
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - state
        - message
        - result
        - meta
      properties:
        state:
          type: integer
          enum:
            - 0
        message:
          type: string
        result: {}
        meta:
          $ref: '#/components/schemas/Meta'
    Order:
      type: object
      required:
        - id
        - public_id
        - tracking_id
        - cash_handover
        - status
        - amounts
        - currencies
        - direction
        - customer
        - payment
        - flags
        - timestamps
      properties:
        id:
          type: integer
        public_id:
          type: string
        tracking_id:
          type:
            - string
            - 'null'
        cash_handover:
          $ref: '#/components/schemas/CashHandoverSnapshot'
        status:
          $ref: '#/components/schemas/OrderState'
        amounts:
          type: object
          required:
            - give
            - receive
            - rate
            - give_with_commission
            - receive_with_commission
          properties:
            give:
              type: string
            receive:
              type: string
            rate:
              type:
                - string
                - 'null'
            give_with_commission:
              type:
                - string
                - 'null'
            receive_with_commission:
              type:
                - string
                - 'null'
        currencies:
          type: object
          required:
            - from
            - to
          properties:
            from:
              anyOf:
                - $ref: '#/components/schemas/CurrencySummary'
                - type: 'null'
            to:
              anyOf:
                - $ref: '#/components/schemas/CurrencySummary'
                - type: 'null'
        direction:
          type: object
          required:
            - id
            - name
          properties:
            id:
              type:
                - integer
                - 'null'
            name:
              type:
                - string
                - 'null'
        customer:
          type: object
          required:
            - email
            - phone
            - from_requisite
            - to_requisite
          properties:
            email:
              type:
                - string
                - 'null'
            phone:
              type:
                - string
                - 'null'
            from_requisite:
              type:
                - string
                - 'null'
            to_requisite:
              type:
                - string
                - 'null'
        payment:
          type: object
          required:
            - merchant_provider
            - merchant_status
            - payment_address
            - is_wallet_issued
            - timing
            - request_timing
          properties:
            merchant_provider:
              type:
                - string
                - 'null'
            merchant_status:
              type:
                - string
                - 'null'
            payment_address:
              type:
                - string
                - 'null'
            is_wallet_issued:
              type: boolean
            timing:
              $ref: '#/components/schemas/OrderPaymentTiming'
            request_timing:
              anyOf:
                - $ref: '#/components/schemas/OrderRequestPaymentTiming'
                - type: 'null'
        flags:
          type: object
          required:
            - is_archive
            - is_frozen
            - is_new_user
            - is_auto_check_payment
          properties:
            is_archive:
              type: boolean
            is_frozen:
              type: boolean
            is_new_user:
              type: boolean
            is_auto_check_payment:
              type: boolean
        timestamps:
          type: object
          required:
            - created_at
            - updated_at
            - started_at
            - completed_at
            - archived_at
          properties:
            created_at:
              type:
                - string
                - 'null'
              format: date-time
            updated_at:
              type:
                - string
                - 'null'
              format: date-time
            started_at:
              type:
                - string
                - 'null'
              format: date-time
            completed_at:
              type:
                - string
                - 'null'
              format: date-time
            archived_at:
              type:
                - string
                - 'null'
              format: date-time
    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'
    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'
    CashHandoverSnapshot:
      type:
        - object
        - 'null'
      description: >-
        Historical order terms, returned only by private owner-authorized order
        responses. The courier address is personal data.
      required:
        - version
        - method
        - direction_city_id
        - city_id
        - office_id
        - office_name
        - address
      properties:
        version:
          type: integer
          enum:
            - 1
        method:
          type: string
          enum:
            - office
            - courier
            - agreement
        direction_city_id:
          type: integer
          minimum: 1
        city_id:
          type: integer
          minimum: 1
        office_id:
          type:
            - integer
            - 'null'
        office_name:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
    OrderState:
      type: object
      required:
        - id
        - key
        - name
        - is_final
        - is_payment_flow
        - is_problem
      properties:
        id:
          type: integer
        key:
          type: string
        name:
          type: string
        reason:
          type:
            - string
            - 'null'
        is_final:
          type: boolean
        is_payment_flow:
          type: boolean
        is_problem:
          type: boolean
    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
    OrderPaymentTiming:
      type: object
      required:
        - duration_seconds
        - started_at
        - expires_at
        - remaining_seconds
        - active
        - overdue
        - action
        - changes_status_on_expiry
        - processed_at
        - source
        - version
        - is_snapshot
        - server_time
      properties:
        duration_seconds:
          type: integer
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        remaining_seconds:
          type:
            - integer
            - 'null'
        active:
          type: boolean
        overdue:
          type: boolean
        action:
          type: string
        changes_status_on_expiry:
          type: boolean
        processed_at:
          type:
            - string
            - 'null'
          format: date-time
        source:
          type: string
        version:
          type: integer
        is_snapshot:
          type: boolean
        server_time:
          type: string
          format: date-time
    OrderRequestPaymentTiming:
      type: object
      required:
        - mode
        - is_planned
        - requires_operator_plan
        - timer_start
        - wait_minutes
        - wait_total_seconds
        - wait_started_at
        - wait_expires_at
        - wait_remaining_seconds
        - wait_overdue
        - payment_minutes
        - payment_total_seconds
        - payment_started_at
        - payment_expires_at
        - payment_remaining_seconds
        - payment_active
        - payment_overdue
        - payment_deadline_action
        - payment_status_changes_on_expiry
        - payment_deadline_processed_at
        - payment_deadline_version
        - server_time
      properties:
        mode:
          type: string
        is_planned:
          type: boolean
        requires_operator_plan:
          type: boolean
        timer_start:
          type: string
        wait_minutes:
          type: integer
        wait_total_seconds:
          type: integer
        wait_started_at:
          type:
            - string
            - 'null'
          format: date-time
        wait_expires_at:
          type:
            - string
            - 'null'
          format: date-time
        wait_remaining_seconds:
          type:
            - integer
            - 'null'
        wait_overdue:
          type: boolean
        payment_minutes:
          type: integer
        payment_total_seconds:
          type: integer
        payment_started_at:
          type:
            - string
            - 'null'
          format: date-time
        payment_expires_at:
          type:
            - string
            - 'null'
          format: date-time
        payment_remaining_seconds:
          type:
            - integer
            - 'null'
        payment_active:
          type: boolean
        payment_overdue:
          type: boolean
        payment_deadline_action:
          type: string
        payment_status_changes_on_expiry:
          type: boolean
        payment_deadline_processed_at:
          type:
            - string
            - 'null'
          format: date-time
        payment_deadline_version:
          type: integer
        server_time:
          type: string
          format: date-time
    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
    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
    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
    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
  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.