Skip to main content
GET
/
v2
/
checkout
/
{checkout_id}
Get Checkout Status
curl --request GET \
  --url https://api.example.com/v2/checkout/{checkout_id}

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 Checkout Status

Universal status polling endpoint for both checkout sessions and payment link flows. Use this when you need to check whether a payment has completed — for example, if a webhook was missed or you want to confirm status on page load.

Endpoint

GET /v2/checkout/{checkout_id}
The checkout_id is the cs_xxx value returned when the cart was created.

Authentication

Authorization: Bearer glm_test_YOUR_API_KEY

Path Parameters

ParameterTypeDescription
checkout_idstringThe checkout ID (cs_xxx)

Response

Before payment (awaiting customer):
{
  "checkout_id": "cs_abc123",
  "status": "pending",
  "order": null
}
After successful payment:
{
  "checkout_id": "cs_abc123",
  "status": "completed",
  "order": {
    "id": "ord_01ABC...",
    "status": "completed",
    "is_recurring": false,
    "payment_status": "captured",
    "amount": 4995,
    "currency": "usd",
    "payment_link_id": "pl_abc123",
    "client_reference_id": "your-order-123",
    "reference_id": null,
    "customer": {
      "email": "jane@example.com",
      "name": "Jane Doe"
    },
    "line_items": [
      {
        "product_id": "PROD-001",
        "name": "Digital Thermometer",
        "quantity": 1,
        "unit_amount": 4995,
        "amount": 4995,
        "currency": "usd",
        "is_recurring": false
      }
    ],
    "created_at": "2026-03-31T12:00:00Z"
  }
}
After failed payment:
{
  "checkout_id": "cs_abc123",
  "status": "failed",
  "order": {
    "id": "ord_01DEF...",
    "status": "failed",
    "is_recurring": false,
    "payment_status": "failed",
    "amount": 4995,
    "currency": "usd",
    "customer": {
      "email": "jane@example.com",
      "name": "Jane Doe"
    },
    "created_at": "2026-03-31T12:01:00Z"
  }
}

Status Values

StatusDescription
pendingCart exists, no payment attempted yet
completedPayment captured successfully
failedPayment failed or declined

Example

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

Errors

Status CodeError CodeDescription
401unauthorizedInvalid API key
404not_foundCheckout ID not found