external_checkout_url
with ?session_id=<id> appended, and your page reads the session to get the plan, location,
and delivery mode. See the flow guides: CKO-03 Direct,
CKO-03 Home-Drop, CKO-03 Anonymous.
Endpoints
Sessions expire after 30 minutes. Any endpoint that touches an expired session returns
410 Gone and marks it expired on the same call.
Session lifecycle: pending → (redirected) → completed | expired | cancelled.
POST /partner/external-checkout/sessions
Creates apending session and returns your hosted checkout URL with session_id appended.
This endpoint is normally invoked by the kurnl Marketplace when a subscriber picks your plan —
you only call it yourself if you originate checkouts programmatically.
Auth: none required. If a signed-in kurnl user’s Bearer token is supplied, the session is
linked to that account (so it appears in their hub).
Request body
Response — 201 Created
external_checkout_url points to the kurnl fake-Stripe page instead of your
configured checkout URL. If your provider has no external_checkout_url configured, the
endpoint returns 503.
GET /partner/external-checkout/sessions/
Returns the current state of a session, with the referenced plan, unit/building, and provider embedded for display on your checkout page. Auth:X-Webhook-Secret header.
Response — 200 OK
expired and cancelled sessions are never returned as a body — they yield 410 Gone.
Error codes
PATCH /partner/external-checkout/sessions/
Upsell endpoint: swap the plan while the subscriber is still on your checkout page, or attach your own reference id. Onlypending/redirected sessions are patchable.
Auth: X-Webhook-Secret header.
Request body
Only these two fields are patchable — anything else (includingunit_id,
delivery_mode, service_provider_document_id) is rejected with 422.
Response — 200 OK
Returns the updated session object (same shape as GET).Error codes
Related
- Complete a session with subscriber PII:
POST /external-checkout/complete - Complete without sharing PII:
POST /external-checkout/anonymous-complete - Partner suspend/restore (in development):
POST /external-checkout/subscription-status