Skip to content

Support more flexible subscription intervals #7010

@frankie567

Description

@frankie567

Now that our billing engine is enabled on every organizations, we can consider implementing more flexible features around billing cycles. In particular, we want to add more flexibility to recurring intervals. Currently, we only support monthly and yearly.

Proposal

Similar to what we did for trials, we propose to configure the recurring interval using two properties:

  • An interval: day, week, month, year
  • An interval count: the number determining the length of the cycle. For example 2 month would mean the subscription would be billed every two months, 14 days, every 14 days, etc.

Note

During our billing engine rollout, for testing purposes, we added rough support for daily and weekly intervals. Don't be surprised if you see them and if they don't show up properly in the UI. They are currently limited to Polar admins, but this limitation should of course be removed with the current effort.

Backend tasks

  • Add the necessary properties to the Product and Subscription models
  • Create the database migration to add those fields and migrate existing Products and Subscriptions
  • Expose and handle those properties correctly in the Product, Subscription and Checkout API
  • Handle the configuration correctly when handling a cycle. Tip: SubscriptionRecurringInterval.get_next_periodalready has most of the logic necessary.

Frontend tasks

  • Adapt the Product creation/update form to configure the recurring interval
    • Nice to have: show quick and common configurations by default like 1 month or 1 year
  • Display the interval nicely across the dashboard (Product details, Subscription details…)
  • Display the interval nicely in the Customer Portal
  • Display the interval nicely in the Checkout form

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNet new feature developmentpolar-teamIssues that will be handled by the core Polar teamtriageIssues pending to be reviewed by the Polar team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions