#ambi_best-practices

1 messages ¡ Page 1 of 1 (latest)

fallow schoonerBOT
#

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

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

arctic crescent
#

Example on PROD: cus_REKHGDeFqg9BuE
Example of testing this on TEST: sub_1QcYiR2L54HYtpsWlSlucPwg

boreal steeple
#

hi there!

#

if I understand correctly, you want the Subscription to renew 30 days after the customer has paid, and not 30 days after the last invoice was created?

arctic crescent
#

exactly yes.

#

since we remove the service if the subscription is not in the active state, the customer is effectively paying for 23 days, not 30.
I thought that listening to the invoice.payment_succeeded event and updating the subscription billing_cycle_anchor to now would resolve it, and while it does partly. (the anchor is moved) it results in an additional charge of the subscription for the days while the invoice was unpaid.

#

for example:here the user paid 20 + 3.84 for 1st of May till June 7th. but we did not provide the service to him 1.5 - 7.5

boreal steeple
#

got it, that makes sense. give me a few minutes to think about this.

#

And when adding the free trial days it just results in a new invoice after the free trial ends.
I think free trials would be the solution. this way, if you set it to 30 days, then at the end of the 30 days the customer would get a new invoice to pay as expected.

arctic crescent
#

I see, that would work yeah. I am only concerned about the fact if we start offering different features to free trial and normal subscriptions, it would no longer be viable. then I would need to create new subscriptions or something?

boreal steeple
#

I'm not sure I follow. can you share a specific example where a free trial would be an issue?

arctic crescent
#

Sorry Its nothing related to you guys, its how we use subscription statuses internally

#

but yeah thanks, I will try this