Skip to main content
GET
/
v2
/
orders
/
{id}
Get Order
curl --request GET \
  --url https://api.example.com/v2/orders/{id}

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

Authorization: Bearer glm_test_YOUR_API_KEY

Path Parameters

ParameterTypeRequiredDescription
idstringYesOrder ID (e.g., ord_abc123xyz)

Request

GET /v2/orders/{id}

Response

All monetary amounts are integers in cents (e.g., 4995 = $49.95).
{
  "id": "ord_abc123xyz",
  "order_number": "ORD-2025-001234",
  "checkout_id": "01HXYZ...",
  "status": "completed",
  "payment_status": "captured",
  "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"
    }
  ]
}

Response Fields

See Order Object for complete field descriptions.

Examples

Basic Retrieval

curl https://api.withgale.com/v2/orders/ord_abc123xyz \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"

Order Status

StatusDescription
pendingOrder created, awaiting payment
processingPayment being processed
completedPayment successful, order complete
failedPayment failed
cancelledOrder cancelled

Payment Status

StatusDescription
pendingPayment not yet attempted
authorizedPayment authorized (not captured)
capturedPayment captured successfully
failedPayment failed
refundedPayment refunded (full or partial)
disputedPayment disputed/chargebacked

Errors

Status CodeError CodeDescription
401unauthorizedInvalid or missing API key
404not_foundOrder not found
429rate_limit_exceededToo many requests
Example error:
{
  "error": {
    "code": "not_found",
    "message": "Order not found",
    "param": "id"
  }
}