Sandbox
What the sandbox covers
- The in-dashboard sandbox — an operator-facing safe mode you enter from the dashboard. It shows mirrored sample data and simulated network/billing, and never touches real subscribers or switch ports. It is driven by a dashboard login, not by a partner API key. See the operator guide: Use the dashboard sandbox.
- The webhook-secret surface CAN target the sandbox — sessions,
/complete, and/subscription-statuswork against your sandbox provider.GET /api/v1/sandbox/provider-info(dashboard JWT of your admin account; staff with a sub-role get403) returns thesandbox_provider_idandsandbox_webhook_secretto use. Creating a checkout session for a sandbox provider redirects to a kurnl-internal fake-payment page instead of your store — so the store-redirect leg itself cannot be sandbox-tested, but the callbacks can. - The API-key surface is live-only — a sandbox provider has no API key, so provider-initiated, bulk, and report calls always hit production data.
Testing your live integration safely
For the API-key surface (no sandbox), the pragmatic approach:
- Point the Webhook URL (dashboard: Billing → Checkout & Integrations › Partner webhooks) at a throwaway receiver (e.g. webhook.site) while wiring up your webhook handler — this exercises the full event flow without needing a finished endpoint.
- Use a test location/unit you control for end-to-end runs, and clean up the
resulting test subscriber afterward from Customers in the dashboard. A second
run with another subscriber or plan on the same port answers
409port_in_useuntil the first line is cancelled. - Rely on idempotency: retries are genuinely safe — the same subscriber
email + plan version + location returns the existing subscription with
"Provisioning already in progress"(while a job is running) or"Subscription already exists (idempotent replay)", never a duplicate.
Sandbox webhooks
Sandbox webhooks are a separate pipeline from production webhooks, with different event names and no retry machinery:
- Events:
checkout.session.completed(a raw Stripe-shaped payload) andkurnl.sandbox.ping. - Delivery: one attempt, 10 second timeout, no retries and no
dead-letter queue. The signature header is identical to production
(
X-Webhook-Signature: sha256=<hmac>, signed with the sandbox webhook secret). - Configure the receiver with
POST /api/v1/sandbox/webhook-config— the URL must behttps://on a public address, like the live Webhook URL (see Requirements for the URL); anything else answers422. Saving a URL fires a synchronouskurnl.sandbox.pingtest event and returns its delivery status. - Inspect events with
GET /api/v1/sandbox/webhook-events(newest first, default 20;limitaccepts 1–200 but values above 100 are clamped to 100, and >200 is rejected with 422) and replay one withPOST /api/v1/sandbox/webhook-events/{id}/replay.
Test and production hosts
Every example in these docs uses the production host middleware.kurnl.ca.
Kurnl also runs a separate test environment on middleware.bso-projects.com
(dashboard dashboard.bso-projects.com, marketplace marketplace.bso-projects.com)
for integration work before go-live. The two are separate systems: each has its
own API key, webhook secret and service_provider_document_id, and data never
crosses between them. Moving from test to production means swapping the host
and those three values — the paths and payloads are identical.