---
title: "Webhook"
method: POST
path: "/billing/stripe_webhook"
---

# Webhook

`POST /billing/stripe_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).

## Response `200`

Successful Response

- boolean

---

[API](https://skmtc.dev/chrt/apis/chrt-fastapi.md) · [All operations](https://skmtc.dev/chrt/apis/chrt-fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chrt/chrt-fastapi/revisions/ea04e157edb3/schema)
