Skip to content
Internal docs

CKO-03: External Checkout — Home-Drop Delivery

When to use this

You land on the home-drop path whenever the suite needs a technician visit or a shipped router: a second- or third-line building where the suite’s router is not online yet, or a shared suite. An unclassified building (line type NULL) always takes this path. kurnl then creates the subscription in PENDING_INSTALL with an operator install job instead of provisioning a switch. A first-line suite is provisioned at once, also when the subscriber reached it through address search or a QR landing (see CKO-03 Direct).

The home-drop path requires a unit_id on the session — a session without one is rejected with 422 rather than provisioned.

How it works

sequenceDiagram
participant S as Subscriber
participant MP as kurnl Marketplace
participant YS as Your Checkout
participant KW as kurnl API
participant OP as kurnl Operator
S->>MP: Browse plans (suite needs a visit)
MP->>KW: POST /partner/external-checkout/sessions
KW-->>MP: { id, external_checkout_url, expires_at }
MP->>S: Redirect to your checkout URL?session_id=<id>
S->>YS: Land on your checkout page
YS->>KW: GET /partner/external-checkout/sessions/{session_id}
KW-->>YS: { plan_version_id, unit_id, building_id, ... }
S->>YS: Complete signup
YS->>KW: POST /partner/external-checkout/complete (session_id + subscriber)
KW-->>YS: 200 { subscription_id, subscriber_id, message }
KW-->>YS: Webhook: subscription.pending_install
Note over OP: Operator maps port, ships hardware,<br/>confirms install via kurnl dashboard
KW->>KW: Provision port, then charge saved card<br/>or send a payment link
YS->>KW: Poll GET /sessions/{id}/status until ACTIVE

The key difference from direct delivery: there is no job_id in the response — provisioning hasn’t started. The subscription stays in PENDING_INSTALL state until a kurnl operator or technician completes the physical installation.

Step-by-step

1. Configure your checkout URL

Same as direct delivery — the kurnl Marketplace creates a checkout session and redirects to your external_checkout_url with ?session_id=<uuid> appended. Read the session to get the details; outside first line it carries a unit_id:

Terminal window
curl https://middleware.kurnl.ca/partner/external-checkout/sessions/SESSION_ID \
-H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET"
{
"id": "c3d4e5f6-...",
"service_provider_document_id": "a1b2c3d4-...",
"plan_version_id": "f7e8d9c0-...",
"unit_id": "c3d4e5f6-...",
"building_id": "d4e5f6a7-...",
"status": "pending",
"expires_at": "2026-07-01T12:30:00Z",
"units": { "unit_number": "304", "buildings": { "name": "Oak Towers", "address": "7 Oak Ave" } }
}

See Checkout Sessions for the full session API.

2. Collect subscriber details

The CKO-03 home-drop path does not collect a card in kurnl — kurnl creates the subscriber without a Stripe payment method. After the install is confirmed, kurnl attempts to charge a saved payment method if one exists; when none exists (the usual case on this path), it sends the subscriber a payment link for the first invoice instead (a kurnl link that opens Stripe) through the provider’s Payment link e-mail and text rules — if the provider has switched those off or the subscriber cannot be reached, nothing is sent and the provider is told. If you manage billing yourself, handle payment on your own timeline.

3. Call kurnl after signup

Pass the session_id — kurnl reads the plan, unit, and provider from the session:

Terminal window
curl -X POST https://middleware.kurnl.ca/partner/external-checkout/complete \
-H "Content-Type: application/json" \
-H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET" \
-d '{
"session_id": "c3d4e5f6-...",
"subscriber": {
"email": "bob@example.com",
"username": "bob",
"invoice_contact_detail": {
"firstname": "Bob",
"lastname": "Jones",
"email": "bob@example.com"
},
"contract_contact_detail": {
"firstname": "Bob",
"lastname": "Jones",
"email": "bob@example.com"
},
"invoice_address": {
"street": "Oak Ave",
"housenumber": "7",
"unitnumber": "304",
"postalcode": "B2C 3D4",
"city": "Victoria",
"province": "BC"
}
}
}'

Successful response — 200 OK:

{
"subscription_id": "8c4a1b9e-...",
"subscriber_id": "2f5d7a0c-...",
"message": "Subscription pending installation. Call /provisioning/confirm-install when the port is ready."
}

Note there is no job_id — provisioning has not started.

If the unit is part of a shared suite (several connections), the response also carries "unit_confirmation_pending": true: kurnl placed the order on the suite’s first free connection and the operator still has to confirm which connection is the customer’s before the install proceeds. It is false for any other unit.

4. Wait for installation

kurnl fires subscription.pending_install to your webhook URL. The install is now in the operator’s queue — kurnl creates an internal install job and support ticket automatically, and marks that ticket resolved when the line goes live. Store the subscription_id for your records.

The subscription shows as PENDING_INSTALL until the install is completed. (A line that was cancelled and later reactivated through a technician visit passes through PENDING_INSTALL again with a second, reinstall install job — a subscription holds at most one open install job, not one for ever.)

5. Installation is completed by kurnl (not by you)

The install is finished through the kurnl dashboard / field-service flow: an operator maps the switch and port to the unit, marks the hardware shipped, and a technician confirms the install. The confirming call (POST /provisioning/confirm-install) requires kurnl dashboard staff credentials, takes only a subscription_id, and needs the operator-mapped install job to be in the SHIPPED state — there is nothing for your integration to call here.

On a second-line building nobody visits: the operator ships the router, the port is provisioned the moment it ships, and the line activates — and the charge or payment link below happens — about an hour after the subscriber plugs the router in and it connects. confirm-install is not used for these orders.

After the install is confirmed, kurnl provisions the port and then:

  • charges the subscriber’s saved payment method, if one exists → subscription ACTIVE, or
  • sends the subscriber a payment link (a kurnl link that opens Stripe) through the provider’s Payment link e-mail and text rules (the usual case for CKO-03 home-drop, since no card was collected) → subscription becomes ACTIVE when they pay. If the provider has switched those rules off or the subscriber cannot be reached, nothing is sent and the provider is told.

6. Track activation

subscription.activated (kind: "first") fires when the line goes live after the install. No provisioning.completed or provisioning.failed is sent on this path. Without a webhook URL, or as a fallback, poll:

  • GET /partner/external-checkout/sessions/{session_id}/status — public, no auth, safe from the browser; subscription_status flips to ACTIVE (reference), or
  • GET /partner/external-checkout/sessions/{session_id} — the authenticated session read.

Webhook events

Event When
subscription.pending_install Immediately after your callback — the install is queued
install.booked A technician visit is booked or moved
subscription.activated The line goes live after the install (kind: "first")
subscription.cancelled, subscription.deprovisioned The line is cancelled, and later closed

No provisioning.* events fire on the install path. Payloads and the full list: Webhooks.


Handling unit availability

A unit can only have one pending or active subscription at a time. If you call the endpoint for a unit that already has a PENDING_INSTALL or ACTIVE subscription, you get 409 Unit already has a pending or active subscription. Check the unit’s status before presenting it as available in your checkout.

For a shared suite the same applies per suite: when every connection is taken you get 409 no_free_connection, and a retry of an order you already placed returns it instead of taking another connection.

You can query unit status via the kurnl dashboard or by checking the building’s unit list in your dashboard.