Retrieve a checkout session
Returns one checkout session. For the payment result read the PaymentIntent (or use webhooks) — the session only tracks the page.
GET
/v1/checkout/sessions/{id}Authorization
bearerAuth AuthorizationBearer <token>
Secret API key as a bearer token: Authorization: Bearer sk_live_….
Test keys (sk_test_…) are refused with 401 test_mode_unavailable.
Keys are issued per project in the dashboard. Never expose a secret
key in browser or mobile code.
In: header
Path Parameters
id*string
Checkout session id (cs_…).
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/checkout/sessions/cs_w6qz3k2mx5tn4vbr7cyj2hpa5k"{
"id": "cs_w6qz3k2mx5tn4vbr7cyj2hpa5k",
"object": "checkout_session",
"payment_intent": "pi_k3vq7m2xw5nbt4rj6yhc2dpa7e",
"status": "complete",
"url": "https://pay.wire.mn/c/cs_w6qz3k2mx5tn4vbr7cyj2hpa5k",
"success_url": "https://yourshop.mn/orders/1001",
"cancel_url": "https://yourshop.mn/cart",
"allowed_operators": [],
"created": 1791774005
}{
"error": {
"type": "api_error",
"code": "test_mode_unavailable",
"message": "test keys are not accepted by this API; use a live secret key",
"request_id": "req_8f3a1c9e5b7d2f4a6c0e9b1d"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "no such payment_intent",
"request_id": "req_8f3a1c9e5b7d2f4a6c0e9b1d"
}
}