Files
enkly-ai/pkg/eventbus/events/billing_events.go
enkly 79ce8dc4c0
Some checks failed
Go CI Pipeline / build_and_test (push) Failing after 22m0s
Init Project
2026-10-30 18:06:55 +01:00

15 lines
647 B
Go

package events
// SubscriptionChanged is published by billing whenever applyStripeEvent
// (now billing's internal/application use case of the same name)
// commits a plan/status change from a Stripe webhook. No consumer in
// this port of the monolith needs it synchronously — it's published so
// a future consumer (e.g. a usage-analytics or dunning-email service)
// can react without billing needing to know about it.
type SubscriptionChanged struct {
UserID int64 `json:"user_id"`
Plan string `json:"plan"`
Status string `json:"status"`
EventType string `json:"stripe_event_type"` // e.g. "customer.subscription.updated"
}