#benk-paymentmethods
1 messages · Page 1 of 1 (latest)
Hey
cool
So my question is this. Users may not have an email for a while and then at some point may add one
The call above is executed every time they purchase credit
Is the email attached to the customer on stripe, or the payment record?
And I mean in terms of sending an email receipt
depends on where you attach email
either receipt_email on PaymentIntent or Charge
or email on Customer obj
I see I am attaching email to the record with stripe.paymentIntents.create
and later with createPaymentMethod
I suppose I attach to both
what is createPaymentMethod() attaching (that is your function, didn't see what API that calls)
and the former on PaymentIntents is receipt_email
I'm an idiot. Sorry. createPaymentMethod is my own method
OK, so I run stripe.paymentIntents.create for every wallet charge
aka payment
all good! in createPaymentMethod()
is where you are passing
to paymentIntents.create()
The question is - if I previously created a customer without an email, and then later run stripe.paymentIntents.create with a receipt_email - will it update the customer record with the email?
(or if they change their email)
no it would not, you would have to separately update customers.update() with email
which updates the Customer obj
Gotcha
I wonder... I only really use the email on stripe for email receipts
So stripe.paymentIntents.create will get the latest email every time, and will send a receipt to that email, regardless of the customer email
what's the email in the customer record used for?
what's the email in the customer record used for?
used for when you want to send Invoices or Subscription Invoices to a Customer. I believe if you don't pass receipt_email but have email on the Customer, then you can configure a Dashboard setting to send emails to the email at customer.email
receipt_email always sends an email regardless of that Dashboard setting basically