#DuckHunter-invoices
1 messages · Page 1 of 1 (latest)
Hi! Yes with auto_advance Stripe will wait one hour to finalize the invoice, this is to give you some time to edit the invoice while it is in draft status if needed.
If you want to finalize the invoice right away, you need to call finalize: https://stripe.com/docs/api/invoices/finalize
Will finalizeInvoice automatically send the invoice via email or do I need to call sendInvoice as well?
^ for additional info, in create invoice I am setting 'collection_method' => 'send_invoice'
If you set auto_advance, then finalizing the invoice should automatically send the email.
You can learn more about the flow of invoices here: https://stripe.com/docs/invoicing/integration/automatic-advancement-collection#toggle-auto-advance
I have auto_advance set to true, collection_method set to send_invoice and I just called finalize. I am in test mode and I know emails don't always send from test mode, but I don't see that the invoice sent on the dashboard:
Let me double check on my end.
Here's the invoice id I just sent finalized (test mode): in_1KmCuxEcj2gslTCgGZXKNEbq
I just tested and you are right, if you manually call finalize, then it looks like you need to manually send the invoice. Sorry about the confusion!
No worries!
Am I able to call sendInvoice without calling finalizeInvoice?
I think send will finalize it if I recall correctly
Awesome. Thanks for the help!
Actually, one more question for you:
I understand that emails don't necessarily send in test mode, but if I see this in the dashboard then I can assume it will send in live mode?
Yes exactly, and you should also get a invoice.sent webhook event when that happens.
Also note that from the dashboard, you can preview the email that would have been sent by clicking on the "send invoice" button in the top left.
Okay. I did notice that it is possible to actually send the email (even in test mode) when clicking the "send invoice" button from the dashboard. Is it only via the API when it does not send the emails?
In test mode you can only send the invoice to your own email for testing purposes from the dashboard.
Ah, that makes sense.
I appreciate your time! I think I am out of question for now lol
Happy to help 🙂