#nukesforbreakfast_best-practices

1 messages ยท Page 1 of 1 (latest)

lunar forgeBOT
#

๐Ÿ‘‹ 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/1336412534072152136

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

void river
#

I also have some weird requirements in certain cases from our clients. For example, a recent one was that a permit issued during the year is only good until the end of that calendar year, so it would need to be renewed on the first of the following year with that lower renewal fee.

hollow elk
#

hi! just want to ack your question, things are a little busy but i will get back to you asap ๐Ÿ™‚

#

at a glance subscription schedules sound like the perfect solution for you. have you tried them out yet?

#

you'd essentially set up two phases, one referencing the higher price and then a second referening a lower price

void river
#

that's what I figured. What happens at the end of the second phase? I would basically want it to remain renewing at the lower price until cancelled.

hollow elk
void river
# void river I also have some weird requirements in certain cases from our clients. For examp...

ok, what about this weird requirement? How would I model that in a subscription? I haven't confirmed it should be a prorated amount, but I assume it would be since having to pay full price for a permit you get on December 15th that expires on January 1st would be extremely irritating. But, I wouldn't put it past a municipality to have that kind of rule either, so I might need to support the case without proration as well.

hollow elk
#

good question! let me circle back to that in juuuust a bit, still juggling multiple threads. appreciate your patience ๐Ÿ™‚

void river
#

no worries

lunar forgeBOT
storm palm
#

Hello
Taking over here

#

I'm not sure I fully grasp what you mean by

A permit issued during the year is only good until the end of that calendar year, so it would need to be renewed on the first of the following year with that lower renewal fee.
What's a permit here in Stripe context?
Is that a subscription or something else?

void river
#

that would be the subscription price I'm trying to model

#

for example:

Initial fee $50 for the first year
renewal fee every year after $15

However, if they do it by calendar year, the permit would be billed that initial $50 for the period of Jan 1 to Dec 31.

If somone signs up for a permit and it gets issued on December 15th, how do I prorate that initial $50 fee for the remaining days in the current calendar year while renewing it on January 1st of the new year for the lower $15 amount?

storm palm
#

So basically charging $35 for renewal on Jan 1st for the next period?

#

Sorry I think i'm confused about when you're issuing the permit. Is it for the year before the first year or before the second year?

void river
#

Sorry

#

The permit is issued for the current calendar year. So if it's issued on a date in 2025 it's for the year of 2025 renewing on Jan 1, 2026 at the lower $15 renewal fee.

storm palm
#

Just to make sure I'm on the same page,

I'm a customer and I sign up for your subscription on January 1st, 2025.

  • 1st year cost is $50 which I pay upfront
  • 2nd year and so on will cost $15 (starting Jan 1st, 2026)

However, instead of renewing on Jan 1st, 2026 - I renew it on December 15th, 2025 instead.

What happens next depends on how you handle updates:

  • Renewing on December 15th, 2025 means you're changing your billing cycle anchor meaning your billing cycle anchor will change from Jan 1 - Jan 1 to Dec 15 - Dec 15
  • You can configure proration when you update the product/price by setting proration_behavior parameter
    https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
void river
#

not quite

storm palm
#

You can't do proration but also keep the billing cycle the same iirc.

void river
#

I'm a customer and I sign up for your subscription on December 15th, 2025.

  • 1st year cost is $50 which I pay upfront, but needs to be prorated for the remaining days in 2025 as the billing cycle runs from Jan 1st, 2025 to December 31, 2025.
  • 2nd year and so on will cost $15 (starting Jan 1st, 2026)
storm palm
#

If you don't backdate, you'd need to calculate the prorated amount yourself since Stripe won't know when exactly the subscription started

void river
#

but how do I make that happen when using a billing schedule?

storm palm
#

Hmm actually, I don't know if Subscription Schedules can handle this usecase ๐Ÿค”

void river
#

oh, so proration when backdating charges for the amounts from the backdated date to now?

#

I actually want it to do something like this:

  • The billing cycle is a fixed calendar year, Jan 1 to Dec 31
  • If a permit is issued any day other than Jan 1, prorate the $50 fee amount based on the remaining days in the year. I.E. if it's halfway through the year (July 1), then only charge them $25.
storm palm
#

One option would be to backdate and create a subscription first as per - #1336412534072152136 message

Then you create a subscription schedule for that existing subscription and Update the schedule to configure the next phase to $15 price

#

I don't know if Subscription Schedule can handle this usecase on its own

void river
#

so I'm confused, sorry: Does backdating a subscription mean stripe tries to charge and collect on the entire subscription amount? Or is the proration in the other direction where it only charges for the remaining amount due in the billing period? I think this only applies in the fixed calendar year period case.

Normally, an annual subscription would just charge the full amount on the day you subscribe, and renew a year from that date.

#

so I'm just trying to understand if stripe can model this weird, fixed calendar year case.

lunar forgeBOT
subtle crown
#

Hi, I'm taking over as my teammate needs to step away. Let me catch up

#

yeah, what you're asking is not possible I'm afraid

void river
#

a normal annual subscription is, though, right?

#

but not this weird fixed calendar period case.

subtle crown
#

Yeap!

void river
#

Ok, and I can achieve the first year price 1, 2nd year and everything after price 2 with schedules?

#

I think discord just went down

subtle crown
#

Yeap so my message was not sent.

void river
#

so, just confirming:

I can set up a schedule with the first phase as price 1 for the first year, and then the second phase as price 2 for the second year and set the end behavior to "release" to continue on price 2 forever until cancellation.

subtle crown
void river
#

perfect

#

finally, do subscriptions support mid cycle cancellations with and without prorated refunds?

#

I.E they cancel halfway through the year, so we refund half of the subscription price.

subtle crown
#

Yes, you can set that on the update call.

lunar forgeBOT
void river
#

ok, I think that answers my question. I'll have to do a lot of testing.

#

should I be using the new sandboxes or test mode to do that?

subtle crown
#

that is up to you

void river
#

ok

#

thanks!