#david2_sub-schedules
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- david2_webhooks, 1 hour ago, 9 messages
- david2_api, 3 days ago, 5 messages
๐ 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/1241050005129920513
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ no, error_if_incomplete wouldn't make sense there either, since you aren't directly making the request to create the Subscription when using Subscription Schedules, so an error being returned wouldn't be returned to you.
hm, I guess I misunderstand. It creates a subscription, and that subscription is charge_automatically ...
I think I see -- payment is attempted immediately in "createSubscription", but "at the end of the first billing cycle" for a schedule (assuming both are "charge_automatically"). So you are saying because of this, the "did payment succeed?" question cannot be answered as part of the response to create a schedule (but can for a "plain" subscription)?
I'm not grasping that.
When you're creating a Subscription and use error_if_incomplete, that tells us to respond with an error to the Subscription creation request if the first payment can't be completed.
So you make a request to create a Subscription, we try to process the first payment, and respond with an error if that can't be completed.
When using a Subscription Schedule, the Subscription creation happens behind the scenes.
You make a request to create a Subscription Schedule, that Subscription Schedule then creates the Subscription. So if the Subscription creation responded with an error in this flow, we would be responding to ourselves with that error and wouldn't have a way to make you aware that the Subscription creation didn't happen.
payment is attempted immediately in "createSubscription", but "at the end of the first billing cycle" for a schedule (assuming both are "charge_automatically")
This isn't correct. All Subscriptions charge at the beginning of their billing period, regardless of whether they're being managed by a Subscription Schedule. The exception to that rule is if you're using a metered Price.
You make a request to create a Subscription Schedule, that Subscription Schedule then creates the Subscription. So if the Subscription creation responded with an error in this flow, we would be responding to ourselves with that error and wouldn't have a way to make you aware that the Subscription creation didn't happen.
Is this maybe a feature request? I'd like to know about that error, and atomically "(create schedule and subscription) or (do nothing)"
๐ hopping in since toby has to head out
One additional important thing to mention is that with Subscription Schedules that are created immediately the Subscription is created with a draft Invoice that'll automatically finalize after an hour. In short, there's no payment being attempted for the Subscription when a Schedule is created
ok, that jives with my current understanding. I need to try collect that invoice, and then if it fails do stuff on my end. cool cool cool.
thanks
Just to suggest an alternative - instead of creating the schedule to start now you could create the Subscription (so that you can specify error_if_incomplete) and then add a schedule to it after it's been successfully created (https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#existing-subscription). Downside of that is that it's more requests you have to make
david2_sub-schedules
I'll check it out! you can mark this resolved