curl https://api.khaime.com/api/v1/payments/sessions/sess_a1b2c3d4 \
-H "X-API-Key: pk_sandbox_your_key"
Payments
Get Session
Status-polling endpoint for payment sessions — currently non-functional for intents created via Create Payment Intent.
GET
/
payments
/
sessions
/
{session_id}
curl https://api.khaime.com/api/v1/payments/sessions/sess_a1b2c3d4 \
-H "X-API-Key: pk_sandbox_your_key"
Intro
A legacy status-polling endpoint that no longer has anything to poll — it looks up a hosted-Checkout-Session record that nothing writes to anymore.This endpoint does not currently return real data for anything created via Create Payment Intent. It looks up a session record that only Khaime’s legacy hosted-Checkout-Session flow used to write — that flow has since been replaced by Create Payment Intent, and nothing populates that record today. Calling this with an
intent_id returned from POST /payments/sessions or POST /payments/intents will return 404 Payment session not found or expired every time.There is currently no working status-polling endpoint for Partner API payments. Use webhooks (payment.succeeded, payment.failed) to confirm payment outcomes — this is the only reliable mechanism today. If you need synchronous polling for local development or a webhook-delivery fallback, raise it with the Khaime team; it isn’t implemented yet.Context
This endpoint predates Create Charge and Create Payment Intent, from a version of the Partner API built around Stripe-hosted Checkout Sessions. Both current endpoints return anintent_id / charge_id, not a session_id, and neither writes to the record this endpoint reads from — so it’s kept documented only so integrations that still call it understand why it 404s, and so you know to build on webhooks instead.
Hows
Path parameters
string
required
Historically a
session_id from the old hosted-checkout flow. Not the same identifier space as the intent_id returned by Create Payment Intent today.Response (when the endpoint is reachable)
{
"success": true,
"data": {
"session_id": "sess_a1b2c3d4",
"status": "completed",
"amount": 5320,
"currency": "USD",
"payment_type": "one_time",
"created_at": "2026-01-16T21:00:00.000Z",
"completed_at": "2026-01-16T21:05:00.000Z"
}
}
Error codes
| Status | Error Code | Cause |
|---|---|---|
404 | CART_EXPIRED | No matching session record — currently always the case, including for valid intent_ids. |
404 | AUTH_PERMISSION_DENIED | Session exists but belongs to a different partner API key. |
curl https://api.khaime.com/api/v1/payments/sessions/sess_a1b2c3d4 \
-H "X-API-Key: pk_sandbox_your_key"
Whys
The endpoint is left in place, rather than removed outright, so that aGET to a session_id-shaped path fails with a clear, documented 404 instead of a routing error — and so integrations built against the old hosted-Checkout-Session flow have a paper trail for why polling stopped working after Khaime moved to the current payment-intent flow.
Why nots
- Do not build synchronous “poll until paid” logic against this endpoint — it will 404 for every intent created through current endpoints.
- Do not treat a
404here as proof a payment failed — it reflects a missing session record, not payment status. Rely on thepayment.succeeded/payment.failedwebhooks instead. - There is currently no supported replacement polling endpoint — if your integration cannot rely on webhooks (e.g. local development), that gap is unresolved; raise it with the Khaime team rather than working around it with this endpoint.
