meteroid-oss / meteroid

Open-source Pricing and Billing Infrastructure 🚀 Subscription management, Invoicing, Pricing, Usage-based billing, Cost limiting, Grandfathering, Experiments, Revenue analytics & Actionable insights

Home Page:https://meteroid.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BE] Cancellations

gaspb opened this issue · comments

Add an api to cancel a subscription (with an optional cancellation reason)

Termination can be :

  • at the end of the period
  • now
  • at a date in the future

Mark the subscription as cancelled with the proper cancellation date/end date.
Make sure no invoice is emitted past this point.

If now/specific date is NOT the end of the period :

  • emit an invoice at cancellation if there are in-arrear fees
  • if there are advance fees that have been paid for the full period, we will emit a credit note for the unused number of days, make it a placeholder for now
  • check that if a period is partial because of the end date, we apply prorating too (for now we only checked for a partial first period)

for the start implemented with at the end of the period