Browse docs

Enable billing

End-user billing is off by default. You'll see an empty state with an Enable Billing button the first time you open the Billing tab for any app. Nothing Stripe-related is provisioned until you opt in.

Copy this quickstart guide as a prompt for LLMs to implement KolayLogin in your application.

Steps

  1. Open the dashboard and pick any app.
  2. Click Billingin the sidebar. You'll see the empty-state landing: “Start earning revenue with Billing. Create plans and turn your users into paid subscribers. Add features to your plans to easily gate functionality in your app.”
  3. Click Enable Billing. We flip billingEnabled = true on your workspace and record the chosen gateway.
  4. The full Billing UI (plans, features, invoices) is now visible.

Payment gateway

You pick one gateway for the workspace (switchable later):

  • managed (default) — uses the KolayLogin shared test Stripe. Zero config. Use this for local development and demos.
  • stripe_connect — link your own Stripe via OAuth. Payouts go to your bank account.
  • stripe_platform — single-tenant deploys that bring their own KL_STRIPE_SECRET_KEY.

Disabling billing

You can turn billing back off from workspace settings, but only if no live end-user subscriptions or workspace SaaS subscriptions exist. The API returns 400 billing_has_active_end_user_subscriptions if you try to disable while Stripe is still charging your users.

API

Dashboard endpoints (authenticated with a dashboard JWT):

  • GET /v1/dashboard/billing/status — returns { billingEnabled, billingEnabledAt, billingGateway }.
  • POST /v1/dashboard/billing/enable — body { gateway: 'managed' | 'stripe_connect' | 'stripe_platform' }.
  • POST /v1/dashboard/billing/disable — refuses if live subs exist.
Why gated?
Keeping billing off until explicitly enabled means the default experience is billing-free — safer for early-stage projects and compliance-sensitive deploys. Once enabled, the full surface (plans, features, checkout, invoices) lights up.