#jack11sparrow
1 messages · Page 1 of 1 (latest)
Currently that's not something we support today
for requirement like renting a server or providing a service there should be a way for this right
so that if payment fails on that day due to any reason subscription is not inactive
Yes, lots of folks have that behavior and so they'd have logic where they wouldn't immediately cancel the subscription if it's past_due
but when user actualy pays it will mess up the cycel right
we don't want thaat
Paying the Subscription wouldn't actually change the cycle of the subscription at all
what is purpose for DaysUntilDue
in subscription params
it won't work for us as we have to renew on our side before the cycle ends or we will lose the data
and our renewal can be for one year only
Days until due is more for collection_method: send_invoice - where you want to give your customers some amount of days to pay off an invoice that was emailed to them
can't we do like we try auto deduction and send this if it fails?
Just to clarify really quick - what you're asking for is doable with some work on your end but there isn't anything out of the box that we currently offer that does this.
We only automatically attempt payment when collection_method: charge_automatically and right now with that collection method type there's no way separate out the payment date from the actual cycle - payment will always happen automatically when the cycle is renewed.
okay, lets say my product cycle is 365 days and i create a stripe product cycle to be 360 days
then can i extend the stripe cycle everytime i receive payment
I would suggest just having the payment cycle the same frequency but offset from your product, say 5 days before
Your renewal payment would be five days ahead in that case
offset product you mean stripe product that we create or my service/product
I mean whenever your cutoff time is for your "product cycle" set your stripe subscription to renew an appropriate number of days before that
hwoever much time you want to leave for payment recovery
But note that this will cause the "billing period" to mismatch your "product cycle"
yes that is issue
is there any workaround
like i can change that using api?
eg, your invoices would be Dec 28 - Dec 28, say, instea dof jan 1 to jan 1
No, the invoices are created at the renewal date / billing cycle anchor
ohh, the above eg works
you can adjust the billing cycle anchor in various ways, but the payment and billing cycle necessarily coincide
but how will make the diff constant then
What do you mean?
so lets say from today my product expires after 365 days and i made stripe product for 360 days
then on next attempt with diff of 10 days
I'm not sure what you're trying to describe. Can you illustrate example billing dates you'd expect for a given subscription?
sure
user purchased first time today sep14 2023
and i made stripe product to be for 360 days
then i expect aut deduction on sept9 2024
and next time on sept4 2025 and so on
but my product can only be renewed by exactly one year everytime from date of renewal
so if renew my product on sept14 2024 -> it leads to diff of 10 days now
if i renew on sept9 2024 then cycle for my product disrupts
Sorry, you want the renewal date to be 5 days earlier every year? Or that's undesired?
That's what I'm reading from the payment dates you want
but then I don't understand what this means:
but my product can only be renewed by exactly one year everytime from date of renewal
i want billing date to be 5 days before every year
if it starts today sept24 2023
renewal should happen sep9 2024, sept9 2025 and so on
That's different than what you said above
what i said above is what i think will happen with less days in billing cycle
please clarify how can i achieve this
my bad
It sounds like you want the first renewal to be 5 days "early" then the same date every year after that
yes
essentially i want it to be 5 days before my product renewal
everytime
so if renewal fails 5 days before and delayed by 2 days
then next time also i should get a 5 days buffer
we can have a call too if you guys do that
i know the flows is not usual, so maybe we can discuss on possible workarounds
We can work on it here. So i think here you'd create your price with an annual interval, but when you create the subscription you set billing_cycle_anchor to the first renewal date you want (five days "early"), and disable proration with proration_behavior=none
That would bill for the full year, with the first renewal after ~360 days (or whatever you set) then future renewal would be after a full year
(from that initial renewal date)
i thought it was not possible
that's what i asked at the very begenning
yep that works i think
also this billing anchor this can be updated even after subscription creation right?
Yes, but possibly not directly like you might expect
See docs here:
If you want to set for renewal at a future date after creation without using a trial, you need to read about subscription schedules:
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#resetting-anchor
for early i need to use negative int right
in billingcycleanchor field?
No, its a unix timestamp of a specific datetime
eg in my test i used 1725796800 for sept 8 2024
ohh, so it will be like once set then it will renew after 1 year like we expect
correct
yep
great
thanks a lot