#Jyrks
1 messages · Page 1 of 1 (latest)
Hi there, yes you can get the email address from the PaymentIntent's billing_details.email.
We are also checking some payments from our customers in Stripe and Apple Pay payments have no Customer attached to the payment
This is the ID: pm_1M8q9CCEnZhi6R0tQv8iOAvg on the Payment
Is it intended? because I don't see a customer ID in the PaymentIntent creation request https://dashboard.stripe.com/logs/req_fAVMp2VIrC8F36
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
If the intention is to associate a paymentIntent with a customer, then you can specify a customer when creating a PaymentIntent. https://stripe.com/docs/api/payment_intents/create?lang=curl#create_payment_intent-customer
Well the user does not have a registered account with us. We allowed them to just buy the product, hoping that we'll catch their billing details from Apple Pay
So all they entered was - buy the product with Apple Pay
We have a similar implementation with Google Pay, but there the customer is added, however they are missing email: ID: pm_1M8n5xCEnZhi6R0tLHRK9TP6
Just want to be clear on your requirement, so you want to associate a completed PaymentIntent with a customer (either existing or new)?
Well we want our customers to purchase a product without them entering any details except for pressing the Google/Apple Pay button. Wondering if this is possible - if we can catch their email - I guess it is.
And then wondering what endpoint we didn't call correctly if we are no capturing the data right now
Are you using Checkout or PaymentRequest Button?
Seems to be PaymentRequest Button
OK. when you create a paymentRequest, you can request customer's email by setting requestPayerEmail to true, and you can get the payerEmail in the PaymentResponse (https://stripe.com/docs/js/appendix/payment_response)
You can then use this information to create a customer, or retrieve an existing customer if this email address matches, and use the customer ID to create a PaymentIntent.
Okay and the requestPayerEmail is taken from Apple/Google Pay and does not require user input?
We could also request all the other fields too?
requestPayerPhone
requestShipping
Yes you are right.
Okay, this was very helpful. Thanks a lot!
Welcome!