@startujn render { direction: down; arrow_spacing: 24 } journey PLAN "Upgrade or cancel a plan" description: "Upgrade now, or downgrade or cancel at the end of the billing period" unique_id_friendly: plan start from_settings { description: "From account settings" } view billing { title: "Billing"; description: "Current plan and next invoice"; route: /settings/billing } view pause { title: "Pause plan"; description: "Up to 3 months"; route: /settings/billing/pause } view plans { title: "Change plan"; description: "Compare plans"; route: /settings/billing/plans } view preview { type: modal; title: "Confirm plan change"; description: "Upgrade: prorated charge now. Downgrade: next period" } view cancel_form { title: "Cancel plan"; description: "Why are you leaving?"; route: /settings/billing/cancel } view offer { type: modal; title: "Stay at half price"; description: "50% off for 3 months, offered once" } action update { title: "Update subscription" } system provider { type: external; title: "Billing provider"; host: api.billing.example } view upgraded { title: "Plan upgraded"; description: "New limits apply now"; route: /settings/billing/upgraded } end upgraded_now { type: success; description: "Upgraded now" } end period_end { type: success; description: "Downgrade, cancel or discount from the next period" } end not_paid { type: failure; description: "Card declined, plan unchanged" } from_settings --> billing billing -right-> pause : [Pause plan] { flags: [future] } billing --> plans : [Change plan] billing --> cancel_form : [Cancel plan] plans --> preview : [Choose plan] preview ..> plans : [Back] preview --> update : [Confirm] { payload: [plan_id, prorated_amount] } cancel_form --> offer : [Continue] { payload: [reason] } offer --> update : [Accept offer] { payload: [coupon] } offer --> update : [Cancel anyway] { payload: [reason] } update -left-> provider { payload: [subscription_id, change] } provider ..> update { payload: [invoice_status] } update --> upgraded : upgrade, paid now update -x-> not_paid : upgrade, card declined update --> period_end : at period end upgraded -left-> upgraded_now : [Done] @endujn