← Changelog

Take payments on your own Stripe: event tickets and paid courses

2026.10.14-api-payments
The Forumulate team
1 min read
apipaymentsevents+1

Added

Connect your org's Stripe. Use GET, PUT and DELETE on /orgs/{orgId}/payments/stripe, and POST …/stripe/test to check the keys. Keys are stored encrypted and are write-only: the API never returns them. Each org has one connection, and both event tickets and paid courses use it. Money goes straight to your Stripe account.

The payments webhook. In your Stripe dashboard, point a webhook at POST /public/payments/stripe/{orgId}/webhook and send it checkout.session.completed, checkout.session.expired and charge.refunded. Each event is verified with the signing secret you saved on the connection. In production, an event that cannot be verified is acknowledged and ignored. This one webhook handles ticket orders, course purchases, and refunds made from the Stripe dashboard.

Event tickets.

  • Staff manage tiers at /orgs/{orgId}/spaces/{spaceId}/events/{handle}/tiers, ticketing at …/ticketing, orders and refunds at …/orders, and promo codes at …/event-promo-codes.

  • Readers buy through /public/…/events/{handle}/tickets, then quote, checkout and confirm.

  • Each tier appears in the event's JSON-LD as an offers entry.

Paid courses.

  • Set the price, currency, refund window, refund text and coupons with PUT /orgs/{orgId}/spaces/{spaceId}/course/authoring/commerce. If Stripe is not connected, this answers 422.

  • Learners use POST …/course/checkout, …/checkout/confirm, GET …/course/purchase and POST …/purchase/refund (self-refund within the window). Anyone can get a price with GET /public/…/course/commerce/quote.

  • Owners manage coupons and buyers (…/coupons, …/purchases), grant free seats, and issue refunds.

  • A lesson that needs a purchase answers 403 course.locked with the reason purchase. Free-preview lessons stay open, and authors read for free.

  • Webhooks: course.purchased, course.refunded.