Event Storm — Subscription Billing
Trial, invoicing and dunning for a SaaS product: four policies chain the contexts together and a failed payment routes into collections.
Make it your own.
title "Subscription billing — trial to dunning"
context "Subscriptions"
actor Subscriber
aggregate Subscription
command "Start trial" by Subscriber on Subscription
event "Trial started" from "Start trial"
readmodel "Plan and usage summary"
event "Trial expired"
hotspot "Does a paused subscription still consume seats?"
policy "When trial expired, raise invoice" then "Raise invoice"
context "Billing"
aggregate Invoice
command "Raise invoice" by "Billing scheduler" on Invoice
event "Invoice raised" from "Raise invoice"
policy "When invoice raised, charge card" then "Charge card"
command "Charge card" by "Billing scheduler" on Invoice
event "Payment taken" from "Charge card"
event "Payment failed" from "Charge card"
readmodel "MRR and churn dashboard"
external "Card processor"
policy "When payment failed, start dunning" then "Start dunning"
context "Collections"
aggregate "Dunning case"
command "Start dunning" by "Collections service" on "Dunning case"
event "Dunning started" from "Start dunning"
external "Email delivery service"
command "Suspend account" by "Collections service" on "Dunning case"
event "Account suspended" from "Suspend account"
hotspot "Three failed cards in a month — retry or suspend?"