#mathijs_code
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/1344982435913404426
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
you need to first create a schedule from a subscription as described here https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
that is with the from_subscription. And then I need to update the schedule?
Is there a way to retrieve the existing schedule if the modify schedule fails after the creation of the schedule with from_subscription?
correct
I'm not sure I understand
I created the schedule succesfully:
schedule = stripe.SubscriptionSchedule.create(
from_subscription=subscription.id,
)
But my code failed on the modify part:
modified_schedule = stripe.SubscriptionSchedule.modify()
I need to retrieve the schedule for the customer, since I can't run this again:
schedule = stripe.SubscriptionSchedule.create(
from_subscription=subscription.id,
)
For this api call I need the stripe schedule id, but I don't have that:
https://docs.stripe.com/api/subscription_schedules/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if you the schedule update failed the schedule would still be the same
so you have access to it via the schedule variable you created
I understand, but my code failed. So I dont have that variable anymore. And I can't create a schedule again.
you have the schedule ID on the subscription https://docs.stripe.com/api/subscriptions/object#subscription_object-schedule
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hi! I'm taking over this thread. let me know if you have other questions!