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

url = "https://api.example.com/api/v2/checkout/{checkout_id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v2/checkout/{checkout_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/api/v2/checkout/{checkout_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/api/v2/checkout/{checkout_id}"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/checkout/{checkout_id}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v2/checkout/{checkout_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body

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 /api/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/api/v2/checkout/cs_abc123 \
  -H "Authorization: Bearer glm_test_YOUR_API_KEY"

Errors

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