GET
/
orders
/
tx
/
{tx_hash}
Check Order Status
curl --request GET \
  --url https://api.yourdomain.com/v1/orders/tx/{tx_hash} \
  --header 'x-api-key: <api-key>'
{
  "status": "success",
  "message": "Order fetched successfully",
  "data": {
    "order_id": "ord_1234567890abcdef",
    "status": "COMPLETED",
    "order_type": "onramp",
    "amount_fiat": 1000,
    "amount_crypto": 6.93,
    "currency": "KES",
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "token_symbol": "USDC",
    "network": "base",
    "wallet_address": "0x742d35Cc6634C0532925a3b8D4C0532925a3b8D4",
    "phone_number": "254712345678",
    "exchange_rate": 144.32,
    "fees": {
      "platform_fee": 10,
      "network_fee": 2.5,
      "total_fees": 12.5
    },
    "payment_details": {
      "method": "mpesa",
      "receipt_number": "QHX8K9L2M3",
      "confirmation_code": "ws_CO_123456789"
    },
    "transaction_hashes": {
      "creation": "0xabc123def456789...",
      "settlement": "0xdef456ghi789abc...",
      "refund": null
    },
    "timestamps": {
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:45:00Z",
      "completed_at": "2024-01-15T10:45:00Z",
      "expires_at": "2024-01-15T11:30:00Z"
    }
  }
}

Check Order Status

Retrieve the complete details and current status of an order using its transaction hash.
Endpoint: GET /orders/tx/{tx_hash}Authentication: Required (x-api-key header)

Quick Examples

curl -X GET "https://staging.elementpay.net/api/v1/orders/tx/0xabc123def456789..." \
  -H "x-api-key: YOUR_API_KEY"

Path Parameters

tx_hash
string
required
The transaction hash returned when creating the order

Response Format

{
  "status": "success",
  "message": "Order fetched successfully",
  "data": {
    "order_id": "ord_1234567890abcdef",
    "status": "COMPLETED",
    "order_type": "onramp",
    "amount_fiat": 1000,
    "amount_crypto": 6.93,
    "currency": "KES",
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "token_symbol": "USDC",
    "network": "base",
    "wallet_address": "0x742d35Cc6634C0532925a3b8D4C0532925a3b8D4",
    "phone_number": "254712345678",
    "exchange_rate": 144.32,
    "fees": {
      "platform_fee": 10,
      "network_fee": 2.5,
      "total_fees": 12.5
    },
    "payment_details": {
      "method": "mpesa",
      "receipt_number": "QHX8K9L2M3",
      "confirmation_code": "ws_CO_123456789"
    },
    "transaction_hashes": {
      "creation": "0xabc123def456789...",
      "settlement": "0xdef456ghi789abc...",
      "refund": null
    },
    "timestamps": {
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:45:00Z",
      "completed_at": "2024-01-15T10:45:00Z",
      "expires_at": "2024-01-15T11:30:00Z"
    }
  }
}

📘 Possible status values

StatusMeaning
PENDINGAwaiting settlement (e.g. user has not completed payment or approval)
SETTLEDSuccessfully processed and funds released
FAILEDOrder failed (e.g. user cancelled STK push or allowance was insufficient)
SETTLED_UNVERIFIEDBlockchain confirms payment but off-chain verification failed

Use this endpoint to build order tracking, payment feedback, or trigger webhook retries if needed.

Authorizations

x-api-key
string
header
required

Path Parameters

tx_hash
string
required

The transaction hash from createOrder()

Response

200
application/json

Order status and metadata

The response is of type object.