Vodmill docs
v1.0.0
Get help
● Set up · Getting paid

Stripe webhook
so every payment is recorded.

Stripe tells Vodmill about payments by calling a webhook. Without it a customer pays and the app never gives them the plan or the credits. Set it up before you turn selling on.

/webhooks/stripe5 events

01Add the endpoint

  1. Open Stripe Dashboard, Developers, Webhooks, Add endpoint.
  2. Endpoint URL https://your-domain/webhooks/stripe: your public URL plus /webhooks/stripe.
  3. Events to send the five below.
  4. Signing secret Save, reveal the signing secret (whsec_…) and paste it in the console under System, Integrations, Stripe webhook signing secret (or STRIPE_WEBHOOK_SECRET in .env).
  5. Secret key Paste the secret key (sk_live_… or sk_test_…) in the same section.
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 1.0.0 install). Every call's signature is verified before anything is trusted (src/server/billing.ts).

02What each event does

EventEffect
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_succeededSame as a completed checkout, for payment methods that confirm later
invoice.paidRecords the payment, adds the plan's monthly credits, marks the subscription active
customer.subscription.updatedStores the subscription status (for example past_due)
customer.subscription.deletedMarks it canceled and moves the workspace to the first active free plan

Every event is recorded once by its id, so Stripe's retries never add credits twice. If an invoice arrives before the checkout event, the server answers with an error on purpose so that Stripe sends it again a little later.

03Test first, then go live

  1. Use test keys (sk_test_…) and a test-mode webhook.
  2. Buy a credit pack in the app with Stripe's test card.
  3. Check the workspace's credits on the console's Workspaces page, and the delivery in Stripe's dashboard.
  4. 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.