#nukesforbreakfast_docs
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/1415799404941807727
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- nukesforbreakfast_best-practices, 12 hours ago, 62 messages
- nukesforbreakfast_subscription-credits-prorations, 20 hours ago, 38 messages
- rcc_schedule-update, 1 day ago, 84 messages
- nukesforbreakfast_api, 1 day ago, 33 messages
- nukesforbreakfast_best-practices, 1 day ago, 30 messages
- nukesforbreakfast_api, 6 days ago, 11 messages
Hello
Really best thing to do is to test it out to get the best understanding on how it works here! So glad to hear you are doing that.
Overall you control proration via proration_behavior as stated in the docs you shared. If you set it to none then the user won't be charged for the backdated time.
so why is there a proration at all when a subscription is backdated? Is the subscription billing interval not set to the first of every month if I backdate to Sept 1?
Yeah that is dependent on whether you also set billing_cycle_anchor
If you don't then the billing anchor will be the backdate which is the 1st of the month in your scenario.
ok, and does the pending_invoice_item_interval align based on the billing_cycle_anchor?
Yes that's my understanding but you should test that using a Test Clock (https://docs.stripe.com/billing/testing/test-clocks) as I actually have never tested that specific scenario.
working on that now. I just need to update my test fixtures so I can set an backdated time.
I have a question about auto_advance behavior on subscription invoices
in this doc, it states I could listen for the invoice.created event and then turn auto_advance off in the API: https://docs.stripe.com/billing/invoices/subscription#holding-review
if I later turn auto_advance back on in the API, does the invoice finalization happen immediately if it's been more than an hour since the draft invoice was originally created, or does it instead restart the timer?
also, it looks like I'm not allowed to backdate in billing mode flexible?
stripe._error.InvalidRequestError: Request req_ii6jUhZlvenaOD: You cannot create a schedule with billing_mode.type=flexible with start_date in the past.
Hi ๐ changing of the guard here, i'll be taking over the thread. Getting caught up
I would probably use req_wFrUCFiX6BRdyI for this question about the error, since the first request had the wrong start_date value set.
Correct, setting a date in the past wouldn't not be possible in that context.
Regarding auto_advance, if you turn it back on the invoice won't finalize immediately but will finalize after the grace period starting from when auto_advance was turned on. If you want to finalize it immediately you can use the api finalize it without delay. https://docs.stripe.com/api/invoices/finalize
Why is a date in the past not possible in a schedule? Is it different than setting a backdated start date on a subscription?
Schedules are designed with automating future changes in mind. It's not the same thing as backdating the start of a subscription.
Oh
So if I want to backdate a subscription, I should create it first, then create the schedule from the subscription and add on the next phase?
In the case going from $50 first year to $25 every year thereafter.
That is correct!
Ok, when creating the subscription schedule from the subscription, can I include the next phase or does that need to come in a later update call?
When creating a schedule you can provide a list of phases
https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-phases
is there an implicit first phase that is always based off the subscription the schedule is being created from?
no, it looks like it errors if I try to add phases when specifying from_subscription: https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-from_subscription
Good catch, in that case a seperate call would be needed
is there something going on with stripe?
stripe._error.APIConnectionError: Unexpected error communicating with Stripe. If this problem persists,
let us know at support@stripe.com.
(Network error: ReadTimeout: HTTPSConnectionPool(host='api.stripe.com', port=443): Read timed out. (read timeout=80))
https://status.stripe.com/
Not that i'm seeing? What was the API call you are trying to make?
Checking if there are any incidents
Are you still having this issue?