#bmarsden10-invoice-email

1 messages ยท Page 1 of 1 (latest)

dire horizonBOT
narrow umbra
#

Hi there ๐Ÿ‘‹ I'm reading through this.

#

I checked the last handful of Customers that I created in my test account, and they all seem to have the Same as account email box checked by default in the Billing email section.

gaunt shuttle
#

Thanks! In which case do you see an issue with the proposed workaround? If at the time that we issue the request to send the invoice (via https://stripe.com/docs/api/invoices/send) the customer's account and billing email addresses are both A, then we get a 200 response with "invoice.customer_email=A", and then we update the customer's account email address to B, the invoice should still be sent to A, right?

I ask because when testing, we are not seeing the above expected behaviour. When Stripe's backend sends the invoice, even when "invoice.customer_email=A" the invoice is still sent to B.

narrow umbra
#

I'm not sure off-hand whether those Invoices will be sent to the email address on the Customer object, or if they will be sent to the email address specified in the customer_email field on the Invoice object itself.

gaunt shuttle
#

Yeah, my suspicion is that the customer object's billing email address is always used, not the invoice object's customer_email. Do you know whether the email sending on Stripe's end is asynchronous? Or does it happen prior to us receiving the 200 response when making calls to https://stripe.com/docs/api/invoices/send ? If so, when Stripe checks which email address to send there'd be a chance that it has already been "reset" back to B, explaining the strange behaviour our end.

narrow umbra
#

I'm not sure, I'm working on creating a test invoice in between thread responses to see what that field gets set to when I provide a billing address via the dashboard.

#

bmarsden10-invoice-email

#

What I'm seeing is that the customer_email field on the Invoice gets set to match the email field on the Customer object, when the Invoice is finalized. I tried updating that field directly while the Invoice was in a draft state, but was unable to do so.

So I believe the email address that is used is dependent on the email address that is set for the Customer at the time the Invoice is finalized.

gaunt shuttle
#

What I am seeing is that the customer_email field is set at finalization time, but that the customer_email attached to the invoice object is not necessarily the email that Stripe sends the invoice to. So it would be most useful to understand whether Stripe actually uses the Customer billing email address, regardless of what is set on the Invoice's customer_email. Is there any way for you to test that?

narrow umbra
#

I can try

#

I'm not seeing emails being generated since I'm working in testmode. I would suggest reaching out to our Support team regarding this matter. I believe they're going to be more familiar with our email behavior that we are in this forum.
https://support.stripe.com/?contact=true