#anil8486
1 messages ยท Page 1 of 1 (latest)
Hello what is your question?
I am using stripe.checkout.sessions.create and using subscription mode
I have done subscription yesterday at 7:30 , today for the same customer its showing draft there
Can you send me the customer's ID? (cus_123)
Thank you
I see two invoices on that customer. One was created yesterday and has been finalized and paid[1] the other was created half an hour ago and will be finalized in 30 minutes[2]
[1] https://dashboard.stripe.com/test/invoices/in_1NSi30AhmbaRjrYUjogW0Ayh
[2] https://dashboard.stripe.com/test/invoices/in_1NT4YIAhmbaRjrYUBUlW85F0
It is expected for invoices to be in a draft state for an hour before finalizing automatically
Though you can finalize them earlier if you would like https://stripe.com/docs/api/invoices/finalize
Also you may find our Test Clocks useful, they let you simulate time passing rather than waiting for things to happen in test mode https://stripe.com/docs/billing/testing/test-clocks
Okay so today its an hour late and tomorrow also an hour late from today's time
I want to finalize early like on what time it was created
Then you will need to finalize them early in the dashboard or with the API call that I linked to https://stripe.com/docs/api/invoices/finalize
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 do in api call
Are you using the API already? That link shows how to make the call with each of our client libraries
๐ stepping in here as Pompey needs to step away
Yep that method is how you would manually finalize a renewal Invoice without waiting the 1 hour that it would be in draft
I am using webhook also
So i have to use the above method to finalize early inside webhook event?
Yep
You would listen for invoice.created
Then you would use that method if it isn't the first Invoice for a Subscription
Okay thanks.
Like i created subscription today at 8:30 , tomorrow it will wait for an hour and will finalize at 9:30 , so day after tomorrow it will finalize at 9:30 or wait for an hour?
Each time would be 8:30 creation and 9:30 finalization
Okay thanks for updating.