#arindamroy-ccdev_api

1 messages ¡ Page 1 of 1 (latest)

willow bayBOT
#

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

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

urban sapphire
#

hi there!

#

you can't directly set this when creating the Checkout Session. instead you'll wait for the Checkout Session to complete, then directly update the Subscription.

#

onre way would be to update the subscription with a free trial that ends on 1PM PDT to change the billing cycle.

finite thistle
#

When we are create any subscriuption by Checkout Session then it 'active' state. I don't want to use trial. Just set the current_period_end with a specific time like 1PM PDT. how to update or change it via API ?

urban sapphire
#

I don't want to use trial.
why not? I think that's the best option.

finite thistle
#

But, after the successful payment from checkout page, the subscription should be active, right? then how to change it in trial ?
Is there any way to set the current_period_end with a specific time ? using Subscription::update API ?

urban sapphire
#

Is there any way to set the current_period_end with a specific time ? using Subscription::update API ?
not directly no. another option is to directly set the billing_cycle_anchor when you create the Checkout Session, as I mentioned earlier.

finite thistle
#

Okay, I am checking the documentations and will get back to you
Thanks

#

Can you please provide the update code snippets please, as per my requirements? So that i will test that in my local env

urban sapphire
#

sorry we can't write code for you. but the links I shared should contain all the information you need.

finite thistle
#

Okay, got it