#blede_best-practices

1 messages ¡ Page 1 of 1 (latest)

mellow nestBOT
#

👋 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/1473807743558357162

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

sterile holly
#

This is the timeline of events if it helps

#

We essentially want to only upgrade subscriptions that have been paid. Are we missing something?

azure stream
#

Hi there

sterile holly
#

Hi!

azure stream
#

Can I have the id of the exact Subscription in question?

sterile holly
#

sub_1T2EP30635aV53Nr7IdwbsJ2

#

The actual production sub is
sub_1SdBJI0635aV53NrNjh10mdB

azure stream
#

So which part of this catches you by surprise? Or, what did you want to happen?

sterile holly
#

So going back.
Assuming you disable proration on the subscription with a latest invoice that is unpaid.

  1. Customer pays for a subscription
  2. They later upgrade to yearly and payment fails
  3. The invoice is generated as you said, this invoice contains the proration but is set to failed.
  4. Customer adds funds to their card or solved the problem with their payment method
  5. They downgrade back to monthly

They are charged again the full amount for the monthly subscription for the current period and the proration is essentially lost.

azure stream
#

Assuming you disable proration on the subscription with a latest invoice that is unpaid.

Just to be clear, this isn't something you can do. You can only disable prorations on a particular request. And even then there are situations where prorations can't be entirely avoided

sterile holly
#

Gotcha, when performing the subscription update (upgrading or downgrading), I'm setting the proration behaviour to none if the latest invoice of the subscription is unpaid.

#

That specific requests is what I'm setting the proration behaviour to none

azure stream
#

Okay, I think I see what you're getting at now. So after the failed update, and then moving them back to a monthly price, your question is something like 'how do I reset the billing cycle date and account for the fact that they just paid an Invoice for the month on 2/11, right?

sterile holly
#

Let me reproduce this in test mode

#

one sec

azure stream
#

I think what you wanted here is in this request where they update back to monthly after the failed attempt to do yearly, then you need to give them a trial period that lasts until 3/11

sterile holly
#

Ohhh

#

that could work

#

I... think I need to test this a bit more, I will try doing the trial period

#

Thanks for the help!

azure stream
#

I think that's the parameter you need; you want it to line up with when they would've been billed again anyway

sterile holly
#

Yeah we' use them but they get a bit weird when using them with Laravel Cashier

#

Cashier doesn't like future dates haha

#

Anyways thank you I will test this a bit more