#eterowicz_webhooks

1 messages ¡ Page 1 of 1 (latest)

astral ospreyBOT
#

👋 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.

ionic turtle
#

Hi there

cloud wadi
#

hi

ionic turtle
#

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?

cloud wadi
#

"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

ionic turtle
#

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

#

Since this was passed as metadata in the Checkout Session, the checkout.session.completed event will include the metadata values

cloud wadi
ionic turtle
#

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

cloud wadi
#

Oh, I understand now

#

thank you so much

#

I'll try to do here