cURL
#!/usr/bin/env bash
# Authenticated merchant view of a checkout session. Branch on data.status;
# never on gateway_response_code. Note: GET timestamps are epoch
# milliseconds, unlike the ISO string returned at create time.
set -euo pipefail
CHECKOUT_BASE="${RADIUMONE_CHECKOUT_BASE:-https://checkout-sandbox.radiumone.io}"
: "${RADIUMONE_SECRET_KEY:?set RADIUMONE_SECRET_KEY to your r1sk_* secret key}"
: "${RADIUMONE_CHECKOUT_ID:?set RADIUMONE_CHECKOUT_ID to the checkout_id to verify}"
curl -sS "$CHECKOUT_BASE/api/v1/checkout/sessions/$RADIUMONE_CHECKOUT_ID" \
-H "X-Api-Key: $RADIUMONE_SECRET_KEY"#!/usr/bin/env python3
"""Authenticated merchant view of a checkout session. Branch on ``status``;
never on ``gateway_response_code``.
"""
import json
import os
import requests
CHECKOUT_BASE = os.environ.get("RADIUMONE_CHECKOUT_BASE", "https://checkout-sandbox.radiumone.io")
def retrieve_checkout_session() -> dict:
checkout_id = os.environ["RADIUMONE_CHECKOUT_ID"]
resp = requests.get(
f"{CHECKOUT_BASE}/api/v1/checkout/sessions/{checkout_id}",
headers={"X-Api-Key": os.environ.get("RADIUMONE_SECRET_KEY", "")},
timeout=30,
)
payload = resp.json()
if not resp.ok:
code = payload.get("code") or payload.get("type")
raise RuntimeError(f"checkout session fetch failed: {code} ({resp.status_code})")
# Confirm order_reference and amount match your order before fulfilling.
return payload
if __name__ == "__main__":
print(json.dumps(retrieve_checkout_session(), indent=2))
{
"status": "ok",
"data": {
"checkout_id": "chk_3f9a1c2e5b7d4a608e1f2c3b4d5e6f70",
"merchant_id": "8f1c2e10-4b3a-4c5d-9e6f-7a8b9c0d1e2f",
"amount": 5000,
"currency": "SGD",
"order_reference": "ORD-1001",
"status": "completed",
"mode": "redirect",
"expires_at": 1789300200000,
"created_at": 1789298400000,
"updated_at": 1789298460000,
"locale": "en",
"metadata": {
"cart_id": "c-981"
},
"gateway_transaction_id": "8f1c2e10-4b3a-4c5d-9e6f-7a8b9c0d1e2f",
"gateway_response_code": "00",
"card_brand": "visa",
"last_four": "4242"
}
}Get a session - Hosted checkout
Retrieve a checkout session’s server-side status — the only reliable way to confirm whether the shopper’s payment succeeded.
GET
/
api
/
v1
/
checkout
/
sessions
/
{id}
cURL
#!/usr/bin/env bash
# Authenticated merchant view of a checkout session. Branch on data.status;
# never on gateway_response_code. Note: GET timestamps are epoch
# milliseconds, unlike the ISO string returned at create time.
set -euo pipefail
CHECKOUT_BASE="${RADIUMONE_CHECKOUT_BASE:-https://checkout-sandbox.radiumone.io}"
: "${RADIUMONE_SECRET_KEY:?set RADIUMONE_SECRET_KEY to your r1sk_* secret key}"
: "${RADIUMONE_CHECKOUT_ID:?set RADIUMONE_CHECKOUT_ID to the checkout_id to verify}"
curl -sS "$CHECKOUT_BASE/api/v1/checkout/sessions/$RADIUMONE_CHECKOUT_ID" \
-H "X-Api-Key: $RADIUMONE_SECRET_KEY"#!/usr/bin/env python3
"""Authenticated merchant view of a checkout session. Branch on ``status``;
never on ``gateway_response_code``.
"""
import json
import os
import requests
CHECKOUT_BASE = os.environ.get("RADIUMONE_CHECKOUT_BASE", "https://checkout-sandbox.radiumone.io")
def retrieve_checkout_session() -> dict:
checkout_id = os.environ["RADIUMONE_CHECKOUT_ID"]
resp = requests.get(
f"{CHECKOUT_BASE}/api/v1/checkout/sessions/{checkout_id}",
headers={"X-Api-Key": os.environ.get("RADIUMONE_SECRET_KEY", "")},
timeout=30,
)
payload = resp.json()
if not resp.ok:
code = payload.get("code") or payload.get("type")
raise RuntimeError(f"checkout session fetch failed: {code} ({resp.status_code})")
# Confirm order_reference and amount match your order before fulfilling.
return payload
if __name__ == "__main__":
print(json.dumps(retrieve_checkout_session(), indent=2))
{
"status": "ok",
"data": {
"checkout_id": "chk_3f9a1c2e5b7d4a608e1f2c3b4d5e6f70",
"merchant_id": "8f1c2e10-4b3a-4c5d-9e6f-7a8b9c0d1e2f",
"amount": 5000,
"currency": "SGD",
"order_reference": "ORD-1001",
"status": "completed",
"mode": "redirect",
"expires_at": 1789300200000,
"created_at": 1789298400000,
"updated_at": 1789298460000,
"locale": "en",
"metadata": {
"cart_id": "c-981"
},
"gateway_transaction_id": "8f1c2e10-4b3a-4c5d-9e6f-7a8b9c0d1e2f",
"gateway_response_code": "00",
"card_brand": "visa",
"last_four": "4242"
}
}Last modified on September 15, 2026