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

# Get Order

> Retrieve details about a specific order

# Get Order

Retrieve information about an order, including payment status, customer details, and line items. Orders are created when a checkout session or payment link is successfully paid.

## Authentication

```bash theme={null}
Authorization: Bearer glm_test_YOUR_API_KEY
```

## Path Parameters

| Parameter | Type   | Required | Description                      |
| --------- | ------ | -------- | -------------------------------- |
| `id`      | string | Yes      | Order ID (e.g., `ord_abc123xyz`) |

## Request

```bash theme={null}
GET /api/v2/orders/{id}
```

## Response

> All monetary amounts are integers in cents (e.g., 4995 = \$49.95).

```json theme={null}
{
  "id": "ord_abc123xyz",
  "order_number": "ORD-2025-001234",
  "checkout_id": "01HXYZ...",
  "status": "completed",
  "payment_status": "captured",
  "receipt_url": "https://files.withgale.com/receipts/ord_abc123xyz.pdf?expires=...&signature=...",
  "customer": {
    "email": "jane@example.com",
    "first_name": "Jane",
    "last_name": "Doe",
    "phone": "+1-555-123-4567",
    "shipping_address": {
      "address_line_1": "123 Main St",
      "address_line_2": "Apt 4B",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US"
    },
    "billing_address": {
      "address_line_1": "123 Main St",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US"
    }
  },
  "line_items": [
    {
      "id": "li_123",
      "product_id": "PROD-001",
      "name": "Digital Thermometer",
      "quantity": 1,
      "price": 2995,
      "hsa_fsa_eligible": true
    }
  ],
  "amounts": {
    "subtotal": 2995,
    "hsa_amount": 2995,
    "regular_amount": 0,
    "shipping": 995,
    "tax": 245,
    "discount": 0,
    "total": 4235
  },
  "payment": {
    "payment_id": "pay_xyz789",
    "payment_method": "hsa_fsa_card",
    "last4": "1111",
    "brand": "visa",
    "captured_at": "2025-10-18T15:30:00Z"
  },
  "metadata": {
    "order_number": "ORDER-12345",
    "platform": "SHOPIFY"
  },
  "created_at": "2025-10-18T15:00:00Z",
  "completed_at": "2025-10-18T15:30:00Z",
  "status_history": [
    {
      "status": "pending",
      "timestamp": "2025-10-18T15:00:00Z",
      "reason": "Order created"
    },
    {
      "status": "processing",
      "timestamp": "2025-10-18T15:01:00Z",
      "reason": "Payment processing"
    },
    {
      "status": "completed",
      "timestamp": "2025-10-18T15:30:00Z",
      "reason": "Payment captured"
    }
  ]
}
```

<Note>
  `receipt_url` is a temporary link to the order's receipt PDF. It is `null` until the receipt is generated and expires after one hour. Request the order again for a new link.
</Note>

## Response Fields

See [Order Object](/api-reference/objects/order) for complete field descriptions.

## Examples

### Basic Retrieval

```bash theme={null}
curl https://api.withgale.com/api/v2/orders/ord_abc123xyz \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"
```

## Order Status

| Status       | Description                        |
| ------------ | ---------------------------------- |
| `pending`    | Order created, awaiting payment    |
| `processing` | Payment being processed            |
| `completed`  | Payment successful, order complete |
| `failed`     | Payment failed                     |
| `cancelled`  | Order cancelled                    |

## Payment Status

| Status       | Description                        |
| ------------ | ---------------------------------- |
| `pending`    | Payment not yet attempted          |
| `authorized` | Payment authorized (not captured)  |
| `captured`   | Payment captured successfully      |
| `failed`     | Payment failed                     |
| `refunded`   | Payment refunded (full or partial) |
| `disputed`   | Payment disputed/chargebacked      |

## Errors

| Status Code | Error Code            | Description                |
| ----------- | --------------------- | -------------------------- |
| 401         | `unauthorized`        | Invalid or missing API key |
| 404         | `not_found`           | Order not found            |
| 429         | `rate_limit_exceeded` | Too many requests          |

Example error:

```json theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Order not found",
    "param": "id"
  }
}
```

## Related

* [List Orders](/api-reference/endpoint/list-orders)
* [Create Refund](/api-reference/endpoint/create-refund)
* [Order Object](/api-reference/objects/order)
* [Webhooks Reference](/developer-manual/webhooks)
