#jot-singh_best-practices

1 messages ¡ Page 1 of 1 (latest)

pearl thunderBOT
#

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

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

rich pilotBOT
fallow stag
#

Hi, let me help you with this.

#

What do you mean by "backdate" exactly here?

dusk falcon
#

I would like my subscription to start in a past date

fallow stag
#

However, depending on your use case we could maybe find a workaround that would still allow you to use Checkout.

dusk falcon
#

Ok, is there a way to change the current start date and the current end date of a subscription after it's created? Could I listen to the customer.subscription.created event and do just that?

fallow stag
#

I don't think you can update it on an existing Subscription. But maybe you could set the custom creation date in metadata, and just set a custom billing_cycle_anchor.

dusk falcon
#

The subscription is annual and one of the ideas I had involved the billing_cycle_anchor, like you mentioned. I thought of putting the end date that I would like the subscription to have in the anchor, so that it would "mimic" a backdate. For example, if my subscription started on the 15th May 2024, but I wanted it to start on the 5th May 2024, I could put the billing_cycle_anchor value to 5th May 2025. This way technically the dates would be correct, but now my issue is the payment. I would like my payment to be complete so that it considers the entire year. If I prorate the payment, I lose those 10 days, so the client pays less. Is there a way to achieve a full payment in this situation?

fallow stag
#

It's quite a complex use case so I would suggest using the Subscriptions API directly. Instead, you can use Stripe Checkout in mode: "setup" to collect a Payment Method, and then use it when creating the Subscription with any custom logic you're looking for.

pearl thunderBOT
dusk falcon
#

Ok. Do I have to create the Stripe Client manually in this case, if I don't have it already? In the subscription mode it was created automatically

zealous swift
#

I don't know what you mean by 'Stripe Client'

dusk falcon
#

Sorry, I meant customer

zealous swift