● Set up · Getting paid
Stripe webhook
so every payment is recorded.
Stripe tells Kinetica about payments by calling a webhook. Without it, a customer pays and the studio never gives them the plan or the credits. Set it up before you turn selling on.
01Add the endpoint
- Open Stripe Dashboard, Developers, Webhooks, Add endpoint.
- Endpoint URL
https://your-domain/webhooks/stripe: your public URL plus/webhooks/stripe. - Events to send the five below.
- Signing secret Save, reveal the signing secret (
whsec_…) and paste it in the console under Settings, Integrations, Stripe webhook signing secret (orSTRIPE_WEBHOOK_SECRETin.env). - Secret key Paste the secret key (
sk_live_…orsk_test_…) in the same section. Its "Test" button says whether it is a live or a test key.
checkout.session.completed
checkout.session.async_payment_succeeded
invoice.paid
customer.subscription.updated
customer.subscription.deleted
Until the secret is set
The endpoint answers 503 {"error":"Webhook secret not set"} (checked on a fresh install), and every signature is verified before anything is trusted (src/server/billing.ts).
02What each event does
| Event | Effect in the studio |
|---|---|
checkout.session.completed (credit pack, paid) | Adds the pack's credits and records the payment |
checkout.session.completed (plan) | Puts the workspace on the plan and links the subscription |
checkout.session.async_payment_succeeded | Same as a completed checkout, for payment methods that confirm later |
invoice.paid | Records the payment, adds the plan's monthly credits, marks the subscription active |
customer.subscription.updated | Stores the subscription status (for example past_due) |
customer.subscription.deleted | Marks it canceled and moves the workspace to the free plan |
Every event is recorded once, so Stripe's retries never add credits twice. Payments recorded this way are what the console's revenue figures show.
03Test first, then go live
- Use test keys (
sk_test_…) and a test-mode webhook. - Buy a credit pack in the studio with Stripe's test card.
- Check the workspace's credits on the console's Workspaces page, and the delivery in Stripe's dashboard.
- Switch to the live keys and add a live-mode webhook. It has its own signing secret: paste that one too.
If a customer paid but has no plan or credits, see Troubleshooting.