#Hemant-customer-email
1 messages ยท Page 1 of 1 (latest)
Hello ๐
You can get the session ID [1] and retrieve the session object client-side where you can expand the customer property to find the email [2]
[1] https://stripe.com/docs/payments/checkout/custom-success-page
[2] https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer
let me check this documention. Thanks @bleak oxide
NP! ๐
This thread has been archived. If you need help with anything else please ask 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.
Hi
I tried expanding "customer_email" but in webhook, i got this exception :
] due to exception [This property cannot be expanded (customer_email).; request-id: req_yHU21g6l9FDHlK]
com.stripe.exception.InvalidRequestException: This property cannot be expanded (customer_email).; request-id: req_yHU21g6l9FDHlK
ah you'd need to expand customer and then access email from that object
ohh, i thought since "customer_email" is available there, i should be able to do that too ๐ฆ
Oh yeah tbh I missed that ๐คฆโโ๏ธ
You don't need to expand customer_email. You can just use it as is.
sessionObj.customer_email
will i get customer email right away ?
Yup you can give it a try in testmode
Sure hanzo
Nope, i get null for "sessionObj.customer_email"
now , what is the option ?
CustomerDetail as expanded item ?
can you share the a session ID that you're testing with? I can take a quick look and see
sure
cs_test_a1p255fpUV8YDuyl1snctWK998XnLgSR0PC0x0Gvmf8RWsBNylJzFCwXZE
Event : evt_1KcBItAEkdu20a8XqktQZnRc
ah okay so it seems like there's a customer attached to it
so you can expand the customer and access the email from the customer object.
Sure @bleak oxide LEt me try that out. Thanks buddy