mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-20 17:24:16 +00:00
billing improvements
This commit is contained in:
+7
-4
@@ -158,17 +158,20 @@ stripe trigger customer.subscription.deleted
|
||||
|
||||
## Webhook Events
|
||||
|
||||
The appview billing manager handles these Stripe events:
|
||||
The canonical list of subscribed events lives in `pkg/billing/events.go` as the
|
||||
`SubscribedEvents` slice. Use it when configuring a Stripe Dashboard webhook
|
||||
endpoint or auditing an existing one.
|
||||
|
||||
| Event | Action |
|
||||
|-------|--------|
|
||||
| `checkout.session.completed` | Create/update subscription, set tier |
|
||||
| `checkout.session.completed` | No-op (subscription.created does the tier work) |
|
||||
| `customer.subscription.created` | Set crew tier from price ID |
|
||||
| `customer.subscription.updated` | Update crew tier if price changed |
|
||||
| `customer.subscription.updated` | Update tier; handles `past_due` (keep), `unpaid` / `incomplete_expired` (downgrade), `incomplete` (await) |
|
||||
| `customer.subscription.paused` | Downgrade to free tier |
|
||||
| `customer.subscription.resumed` | Restore tier from subscription price |
|
||||
| `customer.subscription.deleted` | Downgrade to free tier |
|
||||
| `invoice.payment_failed` | Log warning (tier unchanged until canceled) |
|
||||
| `invoice.payment_failed` | Log only (Stripe Smart Retries handle retry + customer email) |
|
||||
| `charge.dispute.created` | Log only (Stripe emails the account owner by default) |
|
||||
|
||||
## Plankowners (Grandfathering)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user