#DuckHunter-invoice
1 messages · Page 1 of 1 (latest)
hi there! Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event. This is expected behaviour - https://stripe.com/docs/api/invoices/send
So not in test mode should send an email from this code?
$invoice = $stripe->invoices->create([
'customer' => $customer->id,
'collection_method' => 'send_invoice',
'days_until_due' => 30, // UPDATE DUE DATE
]);
$stripe->invoices->sendInvoice($invoice->id);
Also do I need to trigger $stripe->invoices->finalizeInvoice($invoice->id); as well as sendInvoice?
why not create the invoice with auto_advance=true ? That way it'll automatically finalize and send : https://stripe.com/docs/invoicing/integration/automatic-advancement-collection
Oh that makes sense. I'll try that out!
I need to step away so I’m going to archive this thread. If you need help with anything else please feel free to ask again in #dev-help or contact Stripe Support: https://support.stripe.com/contact 😄
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.