Channelsmith docs
v1.0.0
Get help
● Sell · Payments

Stripe webhook.
So payments are recorded.

Stripe tells the studio 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.

/webhooks/stripeFive events

01Add the endpoint

  1. Stripe dashboard, Developers, Webhooks, Add endpoint.
  2. Endpoint URL: https://your-address/webhooks/stripe (your public URL plus /webhooks/stripe).
  3. Events to send:

    • checkout.session.completed
    • checkout.session.async_payment_succeeded
    • invoice.paid
    • customer.subscription.updated
    • customer.subscription.deleted
  4. Save, then reveal the Signing secret (whsec_…) and paste it in the console under Settings, Integrations, Stripe webhook signing secret (or STRIPE_WEBHOOK_SECRET in .env).
  5. Paste the Secret key (sk_live_… or sk_test_…) in the same section. Its "Test" button says whether it is a live or a test key.

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
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 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 it first

Test first with test keys (sk_test_…) and a test-mode webhook, buy a credit pack in the studio with Stripe's test card, and check the workspace's credits on the Workspaces page. Then switch to the live keys and a live-mode webhook (it has its own signing secret).

Channelsmith by MIKODES · docs v1.0.0Changelog