#lory_subscription-billingcycle

1 messages ยท Page 1 of 1 (latest)

ember pewterBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1225032192523108476

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

stark patrolBOT
swift scaffold
#

@covert plaza that's mostly not something we support at all today, there isn't really a way to change the Subscription's overall schedule/billing cycle other than immediately resetting it

#

lory_subscription-billingcycle

#

That's why we usually recommend that you don't block access for that period so that they still end up paying for the full period
For example on April 1st the payment fails, you keep giving access, on April 5 it fails, still access, on April 7 it works -> they pay for full April and have used full April

covert plaza
#

yes but I want the next billing date to be 7th May, not the old one again

#

isnt that possible?

swift scaffold
#

With what I described it doesn't make sense since you are having them use the product for free between April 1st and April 7 in my case right?

covert plaza
#

yes but we sell pills and their old subscription is done and there is a delay and the next order will be in a shorter time so they will have more stock

#

for e.g the previous payment was delayed by 14 days, then the next order will come after 14 days

swift scaffold
covert plaza
#

and how should the proration_behavior be in this case?

#

ah sorry, just read it should be create_prorations

swift scaffold
#

none and making sure there was no successful payment before

#

you don't want any proration at all since you say they didn't pay for April 1 - April 7 and you didn't deliver the pills

covert plaza
swift scaffold
#

yes which seems to be exactly what you are asking to do.
April 1st -> Payment failed. Void the invoice.
April 7 -> try to charge them again by using billing_cycle_anchor: 'now' and `proration_behavior: 'none'. -> If it succeeds subscription is now paid for April 7 - May 7

covert plaza
#

ah okay perfect, I was afraid of a double payment on April 7

#

and in what event is best to chnage the billing_cycle_anchor? I used invoice.updated event

#

is it fine?

swift scaffold
#

No I don't think it's fine. Sorry it seems we aren't aligned just yet. You as the developer have to completely handle the retry logic yourself because of the complex flow you want to model which we don't support

#

so you don't wait for Stripe to automatically pay the Invoice and then reset the Subscription. That won't work

covert plaza
#

ah I see

swift scaffold
#

You could technically wait for invoice.paid, realize the Invoice was paid and force a reset but also add a 100% off coupon or something for the new Invoice to not be charged at all but it'd be really messy.
Or you could put them on a trial after the payment until May 7 but it'd also mess up your analytics.

Sorry the flow you have is unfortunately not one we support today ๐Ÿ˜ฆ

covert plaza
#

hmm what if I do the proration_behavior: alsways_invoice as soon as its payed so it wont take extra money in that moment because the prorated amount will be 0?

wary jacinth
#

hi! I'm taking over this thread.

#

I'm sorry I'm not sure I follow your latest question. can you describe more clearly what you want to do?

covert plaza
#

yes sure. I meant to use invoice.updated or invoice.paid event and then updating the subscription: billing_cycle_anchor: 'now' and `proration_behavior: 'always_invoice'. In this case it will create an invoice with 0 in that moment, so the user wont be charged extra money, and I think the payment for the next month will be full payment and the date will be 7th of May.

wary jacinth
#

In this case it will create an invoice with 0 in that moment
are you sure about this? have you tested it?