Skip to content
Internal docs

Partner Integration Overview

kurnl is built to be loosely coupled. You keep running your own storefront, cart, or billing system; kurnl handles subscriber creation and switch-port provisioning behind a small HTTP API that your developers call. There is nothing to install inside your stack.

Choose your path first

Everything below the next table describes CKO-03, where the shopper starts on the kurnl marketplace. If your customers buy on your site, you want CKO-04 and a different set of calls — skip ahead to Provider-initiated.

Where does the shopper start? Path Guide
On the kurnl marketplace, then lands on your checkout page CKO-03 Direct · Home-drop · Anonymous
On your own site, your own cart and payment CKO-04 Provider-initiated

What you build (CKO-03)

  1. Read the handoff

    A subscriber picks your plan on the kurnl marketplace and is redirected to your checkout URL with a session_id. Your page reads the session to learn which plan and location the subscriber chose.

  2. Tell kurnl when payment succeeds

    After the subscriber pays on your page, your backend calls one endpoint — POST /external-checkout/complete — with the session and the subscriber’s details. kurnl creates the subscriber and, depending on the building’s line type, either activates and provisions the switch port directly (first-line buildings, and second- or third-line suites whose router is already online) or creates a PENDING_INSTALL subscription with an operator install job (everything else) — see the CKO-03 guides.

  3. Suspend / restore — only if you own billing

    If you collect the recurring charge yourself, call POST /external-checkout/subscription-status from your billing lifecycle: suspend on a failed payment, restore when it recovers. kurnl mirrors the change on the port with no invoices or fees of its own.

End-to-end flow (CKO-03)

sequenceDiagram
participant S as Subscriber
participant MP as kurnl Marketplace
participant YS as Your System
participant KW as kurnl API
participant SW as Switch
S->>MP: Pick your plan
MP->>KW: Create checkout session
MP->>S: Redirect to your checkout (?session_id=…)
S->>YS: Land on your page
YS->>KW: GET session → plan + location
S->>YS: Pay (your gateway)
YS->>KW: POST /external-checkout/complete
KW->>SW: Provision port (VLAN, bandwidth, MAC)
KW-->>YS: Webhooks: subscription.activated, provisioning.completed
YS->>MP: Redirect shopper to /external-checkout/return?session_id=…
  • After payment (and after calling /complete), your store redirects the shopper back to the kurnl marketplace return URL with the session_id so they can watch provisioning progress — see Sell through WooCommerce.

Choose your integration path

Not every partner integrates the same way. Pick the path that matches how you sell and bill.

Path Use it when Guide
CKO-03 · Direct Subscriber starts on the kurnl marketplace, the unit already has a live port, you run your own checkout. Direct delivery
CKO-03 · Home-drop Same as direct, but the unit isn’t wired yet — a technician installs the drop later. Home-drop delivery
CKO-03 · Anonymous You own the customer relationship and don’t want to share subscriber PII with kurnl. Anonymous checkout
CKO-04 · Provider-initiated Your customers buy on your own site, or you provision from your back office — no marketplace redirect; you bill, or you hand the billing to kurnl per order. Provider-initiated

For session-based /complete calls, the building’s line type decides the outcome: first-line buildings provision the port immediately, and so does a second- or third-line suite whose router is already online. Every other suite, and every suite in an unclassified building, creates a PENDING_INSTALL subscription plus an operator install job (no job_id in the response) — see Direct delivery and Home-drop delivery.

Authentication

Two headers cover every partner call. Both are issued from the provider dashboard: the API key under Settings → API Key (/api-keys), the shared webhook secret under Billing → Checkout & Integrations, card Partner webhooks (/checkout-settings).

Header Used for
X-Webhook-Secret External-checkout callbacks (/complete, /anonymous-complete, /subscription-status) and the session read/update (GET/PATCH /external-checkout/sessions/{id})
X-API-Key (krnl_…) Plan queries, serviceability address checks, provider-initiated + bulk provisioning, reports

The partner API base is https://middleware.kurnl.ca/partner. See Authentication for the full guide and API Overview for base URLs and rate limits.

Before you go live

  1. Try it in the sandbox

    Exercise the full flow against safe, throwaway data before touching real subscribers or the switch. See Sandbox Setup.

  2. Stand up a webhook endpoint

    Set the Webhook URL under Billing → Checkout & Integrations › Partner webhooks to your system so you receive subscription.activated, provisioning.completed, and provisioning.failed. Verify the HMAC signature — see Webhooks.

  3. Decide who owns recurring billing

    If kurnl bills, you’re done after /complete. If you bill, wire up suspend / restore so a failed payment actually cuts service.

Next steps