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

# Get by creation tx hash

> Returns only if the order belongs to the API key's user.

Pagination notes:
  - Not applicable here (single item).
  - See /orders/wallet for limit/offset usage.

Fetch an order by its **creation transaction hash** (on-chain `createOrder` tx).

**Auth & Scope**

* Developer keys are scoped to their own orders only.

**Notes**

* Single-item lookup (no pagination).
* Use `/orders/me` for listing.


## OpenAPI

````yaml api-reference/openapi.json get /orders/tx/{tx_hash}
openapi: 3.1.0
info:
  title: Element Aggregator API for B2B
  description: >-
    The Element Aggregator acts as a bridge between fiat and blockchain smart
    contracts. It handles payment processing, event listening, and order
    management, ensuring seamless coordination between Web2 and Web3 ecosystems.
  version: 1.0.0
servers:
  - url: https://sandbox.elementpay.net
security: []
paths:
  /orders/tx/{tx_hash}:
    get:
      tags:
        - Order Endpoints
      summary: Fetch order details using creation transaction hash
      description: |-
        Returns only if the order belongs to the API key's user.

        Pagination notes:
          - Not applicable here (single item).
          - See /orders/wallet for limit/offset usage.
      operationId: get_order_by_creation_tx_hash_orders_tx__tx_hash__get
      parameters:
        - name: tx_hash
          in: path
          required: true
          schema:
            type: string
            title: Tx Hash
          description: >-
            Creation transaction hash returned by POST /orders/create. Use this
            hash to fetch the order via GET /orders/tx/{tx_hash}.
      responses:
        '200':
          description: Order found
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Order fetched successfully
                data:
                  order_id: >-
                    95531bef5c8a3997d61f672193b73c458455b3d1649f37ec356e9db45676bc3c
                  status: PENDING
                  amount_fiat: 10
                  currency: KES
                  amount_crypto: 0.07536
                  exchange_rate: 132.6965
                  token: BASE_USDC(Testnet)
                  wallet_address: '0x4f07419e6bfccf8d256e8ef803cc2653dfbb9558'
                  order_type: OnRamp
                  phone_number: '254712531490'
                  creation_transaction_hash: >-
                    c69b5efb9852adcad851b8a7d778f922151a655d3cf04ebbc239202423bac6e6
                  created_at: '2025-08-13T04:38:34.976000'
        '401':
          description: Unauthorized / Missing or invalid API key
          content:
            application/json:
              examples:
                Missing Api Key:
                  summary: No API key provided
                  value:
                    status: error
                    message: Missing API key
                    data: null
                Invalid Or RevokedApiKey:
                  summary: Invalid or revoked key
                  value:
                    status: error
                    message: Invalid or revoked API key
                    data: null
        '404':
          description: Order not found
          content:
            application/json:
              example:
                status: error
                message: Order not found
        '422':
          description: Validation error (e.g., malformed tx hash path param)
          content:
            application/json:
              example:
                status: error
                message: Validation error
                data:
                  errors:
                    - type: value_error
                      loc:
                        - path
                        - tx_hash
                      msg: Invalid transaction hash format
                      input: not-a-hash
        '500':
          description: Internal error
          content:
            application/json:
              example:
                status: error
                message: Internal error occurred
      security:
        - APIKeyHeader: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````