#eterowicz_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1255263770796884059
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi there
hi
Do you have an Event ID you can share? It should begin with evt_
Can you clarify what you mean by "which is sent to create payment session"? Are you working with Checkout Sessions, the PaymentElement, or something else?
"id": "evt_3PVfc9RriQcsQV6w1L3nnSmX",
yes, I'm working on a stripe checkout
and i send an attribute "customer_email"
to create the payment
but in the request of webhook it does not returns the "customer_email" attribute
The value you're passing in the top-level customer_email parameter is used to auto fill the Checkout Session's email field. If a customer object is created during the Checkout Session, the value of customer_email is added to the customer. In this case, you're creating a Session in payment mode and passing customer_creation: if_required, so no customer object is being created
As for metadata[customer_email], the event you shared isn't passing an email here
I see you passed customer_id and order_id in this case: https://dashboard.stripe.com/test/logs/req_O725eIy2DDDymm
Since this was passed as metadata in the Checkout Session, the checkout.session.completed event will include the metadata values
I can see the "customer_email" attribute on this link. How can I access this attribute, since it is not being returned to me from the request
The metadata you're adding is being added to the Session, so it's expected that it won't trickle down to the PaymentIntent (which explains why trying to retrieve this from the payment_intent.succeeded event returns undefined)
As for the top-level customer_email, the recommended way to handle this is to create a customer using the email you already have stored, then create the Session for that customer by passing a value for customer. customer will be returned in payment_intent.succeeded