#essakrishnachaitanya-sub-scehdule
1 messages · Page 1 of 1 (latest)
Hey, you can't use both from_subscription and phases parameter together:
When using this parameter, other parameters (such as phase values) cannot be set
https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-from_subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how to set iterations to created subscription on webhook event customer.subscription.created
Well, you can't. You'd instead just create a Subscription Schedule and instead of passing from_subscription you'd let the schedule create the subscription
my requirement is we need to create a subscription in plan javascript after that using webhook we need to set iterations for that subscription..? is it make senses..?
Yep, it does. But it's not possible
can you please give any solution
Why do you need to do it that way? What's the use case?
in webflow site we need to integrate stripe with user subscription with specified duration
Does this not work for you?
from frontend side we are using redirectToCheckout bro
Yeah, Checkout doesn't work with subscription schedules
okay any solution..?
You'd probably just update the subscription after creation to set the cancel_at param: https://stripe.com/docs/api/subscriptions/update#update_subscription-cancel_at
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay thank you bro..other than above solution any alternate solutions are there..?
There's no others I'm afraid. You can't set both phases and from_subscription when creating a schedule. So fundamentally what you're trying to do just won't work
okay thank you