#amfpaulo_sub-schedules-first-invoice-draft
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/1354482799570321488
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi 👋
Can you share the request ID for the API request where you create the Subscripton Schedule?
what ID ?
Nevermind, I found it.
this is an example: sub_1R6NfADn6CAQGXZna32StIP8
right now is paid, because I paid manually
This is the request I was looking for FYI: https://dashboard.stripe.com/logs/req_25e3EflMwgaaj4
ok, sorry
Okay so the Invoice was created at the same second you created the Subscription Schedule. We can see that in this event https://admin.corp.stripe.com/notification/evt_1R6NfCDn6CAQGXZnG5cXsmPK
And you had collection_method: "charge_automatically"
AH but the Invoice did not finalize until 1 hour later
This is expected behavior for Subscription Schedules that is different from normal Stripe Subscriptons. We document this here
Unlike when you create a subscription directly, the first invoice of a subscription schedule with collection_method set to charge_automatically behaves like a recurring invoice and isn’t immediately finalized at the time the schedule’s subscription is created. The invoice begins in a draft status and is finalized by Stripe about 1 hour after creation.
If you want to charge your customers automatically, you can listen for the invoice.created webhook event, check for billing_reason: "subscription_create", and then finalize the invoice immediately by calling the finalize API endpoint https://docs.stripe.com/api/invoices/finalize