Webhook

Handle Stripe platform-subscription webhooks.

Listens to checkout.session.completed only. On every successful Checkout completion in mode: "subscription", flips the org's subscription flag in BOTH places we read it from:

  • WorkOS organization.metadata.org_subscription = "true" — source of truth for session JWTs (WorkOS stamps it into the JWT at issuance).
  • Mongo org_private_data.org_subscription = True — local mirror used by the API-key auth path, which has no JWT to read claims from.

Revocation (cancel, dunning exhaustion, etc.) is reconciled out-of-band by notebooks/billing/audit_subscriptions.ipynb (which must also write both places when it runs).

post/billing/stripe_webhook

Request

  • Base URL
    http://localhost:8000
  • URL
    http://localhost:8000/billing/stripe_webhook
  • Auth
    none declared

Response

Successful Response

boolean required

Changes

No recorded changes to this operation across all 20 revisions of this API.