#yohana2211
1 messages · Page 1 of 1 (latest)
Hi there, what's the paymentIntent ID?
pi_3NQ5wYLibZt8EYKW1yYR4CbZ
https://dashboard.stripe.com/logs/req_WRQAcUMh0QLqNO You didn't set a customer or receipt_email for this PaymentIntent (https://stripe.com/docs/api/payment_intents/object?lang=curl#payment_intent_object-receipt_email)
The email collected through Elements is the PaymentMethod's billing_details.email (https://stripe.com/docs/api/payment_methods/object?lang=curl#payment_method_object-billing_details-email)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and it says on live env. email is being sent regardless of the settings
You should set the email address in either receipt_email of the PaymentIntent, or the email of the customer associated with this PaymentIntent.
Alright I can set that on our server side while creating client secret .. but it will ask email again while the stripe elements load ... how can i control that?
Can you show me your frontend js code?
Thanks. The email UI is from the LinkAuthenticationElement that you integrated. If you know the email address, you can pre-fill it through the defaultValues.email options prop so that your customer doesn't need to fill it again. https://stripe.com/docs/js/elements_object/create_link_authentication_element#link_authentication_element_create-options-defaultValues-email
Alrihgt then .. let me do that .. in case of any challenge .. will revert
where do I call this defaultValues.email object ?
Like this?
elements.create('linkAuthentication', {defaultValues: {email: "YOUR_CUSTOMER_EMAIL"}})
super .. thanks .. let me do that
Thanks ... I managed to
now let me modify the server side and include email on the billing details
Hello, I tested but getting an error that billing_details was unknown
Received unknown parameter: billing_details
Can you show me the code?
PaymentIntent doesn't have a billing_details field.
You can specify the billing_details when call stripe.confirmPayment() in frontend. https://stripe.com/docs/js/payment_intents/confirm_payment