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

# Get order by ID

> Fetch a single payment order that belongs to the authenticated tenant.

<ParamField header="x-api-key" type="string" required placeholder="your-api-key">
  Your StarkFi API key. You can find it in your [dashboard](https://app.starkfi.io).
</ParamField>

<ParamField path="order_id" type="string" required>
  `payment_orders.id` (CUID).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.starkfi.io/order/list/clxxxxxxxxxxxxxxxxxxxxxxxx \
    --header 'x-api-key: <api_key>'
  ```

  ```javascript Node.js theme={null}
  const orderId = "clxxxxxxxxxxxxxxxxxxxxxxxx";
  const response = await fetch(
    `https://api.starkfi.io/order/list/${orderId}`,
    { headers: { "x-api-key": "<api_key>" } }
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  order_id = "clxxxxxxxxxxxxxxxxxxxxxxxx"
  response = requests.get(
      f"https://api.starkfi.io/order/list/{order_id}",
      headers={"x-api-key": "<api_key>"},
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "statusCode": 200,
    "success": true,
    "status": "order_found",
    "message": "Order found successfully.",
    "data": {
      "id": "clxxxxxxxxxxxxxxxxxxxxxxxx",
      "tenant_id": "...",
      "from_currency_symbol": "BRL",
      "amount_from": "100.00",
      "to_currency_symbol": "USDT",
      "on_ramp": false,
      "gateway_method": "direct",
      "active": true,
      "payment_session_link": "https://app.starkfi.io/sessions/payment?code=...",
      "order_created_at": "2025-01-01T12:00:00.000Z",
      "order_updated_at": "2025-01-01T12:00:00.000Z"
    }
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "statusCode": 404,
    "success": false,
    "status": "order_not_found",
    "message": "Order not found."
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "statusCode": 401,
    "success": false,
    "status": "customer_not_logged",
    "message": "Customer not logged in."
  }
  ```
</ResponseExample>

### Response

<ResponseField name="data" type="object" required>
  Full `payment_orders` record when `success` is `true` (includes JSON fields such as `order_items`, `split_payment_config`, `payment_method_allowed` when set).
</ResponseField>
