-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
billing: Start billing cycle on the 1st each month #3748
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3748 +/- ##
==========================================
- Coverage 79.26% 79.25% -0.01%
==========================================
Files 281 281
Lines 12723 12728 +5
Branches 2838 2838
==========================================
+ Hits 10085 10088 +3
- Misses 2638 2640 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
billing_cycle_anchor_config
isn't a valid parameter for the stripe.checkout.sessions.create(..)
function we use.
According to the docs, we have to use subscription_data.billing_cycle_anchor
which lacks the convenice of billing_cucle_anchor_config
as we'll have to calculate the timestamp of the next 1st of the month ourselves.
6fe1c56
to
ad7e8f2
Compare
For billing insights and understand early in the month about where our revenue is going to end I've updated the billing cycle to start the 1st of each month. The default behaviour is to start the month the date + time they start their subscription.
ad7e8f2
to
a9f06b1
Compare
@knolleary I'm sorry; I don't quite now how to validate my changes. The only test I could think of was to |
@ZJvandeWeg I'll take a look. I have stripe setup locally; what is harder to test is time-based events in the future where you want to check what happens at invoice time etc. That's something we have to do fairly manually. |
I like this a lot, thanks @knolleary ! |
For billing insights and understand early in the month about where our revenue is going to end I've updated the billing cycle to start the 1st of each month. The default behaviour is to start the month the date + time they start their subscription.
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
backport
labelarea:migration
label