#arindamroy-ccdev_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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.
or you can try using this when creating the Checkout Session: https://docs.stripe.com/api/checkout/sessions/create?api-version=2025-05-28.basil#create_checkout_session-subscription_data-billing_cycle_anchor
but I recommend doing some tests in test mode to make sure it works as you expect.
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 ?
I don't want to use trial.
why not? I think that's the best option.
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 ?
But, after the successful payment from checkout page, the subscription should be active, right?
correct!
then how to change it in trial ?
you call the Update Subscription API, and settrial_end: https://docs.stripe.com/api/subscriptions/update?api-version=2025-06-30.basil#update_subscription-trial_end
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 thebilling_cycle_anchorwhen you create the Checkout Session, as I mentioned earlier.
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
sorry we can't write code for you. but the links I shared should contain all the information you need.
Okay, got it