#birdy247_code

1 messages ยท Page 1 of 1 (latest)

silent hearthBOT
#

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

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

dreamy reef
rigid jackal
#

backdate says it will prorate

#

We dont want this, any way to avoid?

dreamy reef
#

Yes that's why I suggested using it with billing_cycle_anchor

#

I think that should work

#

I invite you to make a test

rigid jackal
#

Would we have to set none for proration_behavior

dreamy reef
#

Yes good point, I don't think it would be necessary because the result proration will be the full amount, if you passed exactly 1 year lap between the backdata and the billing cycle

#

But it's safer to specify it too.

rigid jackal
#

If we had someone join on 1st Oct 2024 and we wanted to take payment today but next renewal is 1st Jan 2026, would this approach also work?

dreamy reef
#

You mean 1st Jan 2025 ?

rigid jackal
#

No 1st Jan 2026

#

We essentially give people who join within 3 months of the period ending, those months free

#

So they pay today, this then takes them through to end of next period (i.e. period + 2 months)

dreamy reef
#

Ah no, this is different then.

rigid jackal
#

We would ideally have one process that could cater for both scenarios

dreamy reef
#

I see. What you can do actually is to use one-time Invoice for paying the first Subscription period. You create the Subscription with a free price for the first period and then you update the Subscription with the expected price for the period 2

rigid jackal
#

What about the method I suggested

#

Where we create an invoice, finalise it and attach it to te customer, then create a subscription with a long number of trial days

#

Would that work?

dreamy reef
#

You'll need 2 trial periods, one between 1st Oct 24 => 31st Dec 24 and a second from 1st Jan 24 to 31 Dec 24

rigid jackal
#

Trial periods can't be longer than 1 year?

silent hearthBOT
buoyant pike
#

๐Ÿ‘‹ stepping in

rigid jackal
#

Thanks

buoyant pike
#

Trials can be up to 2 billing periods based on the Price being used.

#

If I remember correctly...

#

Should be able to test quite easily

rigid jackal
#

Ok, so if a period is 1 year, then we would be fine

#

Can you check my suggested flow for the 2 scenarios we are trying to solve

buoyant pike
#

Is there a reason to create a separate Invoice instead of just updating the Subscription to be on trial until the next billing period ?

rigid jackal
#

How would we charge them today without an invoice?

buoyant pike
#

You would charge them via the initial Invoice for the Subscription

#

Instead of creating a separate Invoice and then a Subscription

rigid jackal
#

Ok, we would grab the invoice and update it?

#

I wasnt sure if it was already finalsied

#

the latest_invoice ?

buoyant pike
#

What do you mean by "update it"?

#

The initial Invoice for the Subscription is finalized on Subscription creation

#

So yes you would expand latest_invoice.payment_intent and then use that PaymentIntent to confirm the initial charge

#

Then if successful you can update the Subscription to set it on trial until the next time you want to bill for the Subscription

rigid jackal
#

Ok, so just so we are on the same page

#

today = 1st Nov 2024
Member signs up today, we give them 2 months free and their next charge is 1st Jan 2026

The member would be charged today and then again on 1st Jan 2026

buoyant pike
#

Yep so you create the Subscription with the normal yearly Price without a trial

#

Then after that initial charge you update the Subscription to a trial until Jan 1, 2026 so they are charged again.

rigid jackal
#

Got it

buoyant pike
#

If you prefer to go the other route and just use a separate Invoice then that works too

#

But this just keeps everything associated to the Subscription

#

So seems cleaner to me

rigid jackal
#

And if we look at the other scenario where someone joins on 1st March and we want to collect payment today and then again on 1st Jan

buoyant pike
#

That's the same scenario as the above, no?

#

Doesn't matter when during the year they join.

#

You do the same thing, just different length of trial period.

rigid jackal
#

I think you are right

#

This is helpful

#

Thanks