Skip to content

stripekit check

A doctor that verifies your stripekit setup is healthy — keys, config, drift, and webhook/portal wiring — in one command.

bash
npx stripekit check
stripekit check

  ✓ Stripe key (test mode)
  ✓ stripe.config.ts — 2 product(s)
  ✓ Config vs. account — in sync
  ✓ Webhook endpoint — https://app.example.com/api/stripe/webhook
  ✓ Customer portal

✓ Looks good.

What it checks

CheckPasses when
Stripe keySTRIPE_SECRET_KEY is present, well-formed, and accepted by Stripe (reports test vs live mode).
stripe.config.tsThe config file exists and validates.
Config vs. accountYour account matches the config — no pending push. Warns with the count if it's drifted.
Webhook endpointA managed webhook endpoint exists and STRIPE_WEBHOOK_SECRET is set.
Customer portalA managed portal configuration exists and STRIPE_PORTAL_CONFIGURATION_ID is set.

Each check reports ok, ! warning, or failure. check exits non-zero if any check fails, so it's useful in CI.

Options

FlagDescription
--jsonMachine-readable output: { ok, items: [{ label, status, detail }] }.
--url <url>Base URL used when checking the webhook endpoint.

Fail-fast order

Checks run most-fundamental first and stop early on a hard failure — no key means no point checking drift. Fix failures top to bottom.

Released under the MIT License.