#Thnks_CJ - event data

1 messages · Page 1 of 1 (latest)

pseudo ridge
#

Hello, what data are you looking for in an event or the API?

unreal patio
#

I'm trying to get the email and name from the payment

pseudo ridge
#

What Stripe product are you currently using to charge your users? Checkout? Your own page with Stripe Elements?

unreal patio
#

Your generated page

#

And I use a webhook to listen for the event

pseudo ridge
#

So you are listening to the checkout.session.completed event?

unreal patio
#

Yes

pseudo ridge
unreal patio
#

how do i properly access the data thoughon the docs it tells you the strings but not how to get them

pseudo ridge
#

What strings are you having trouble finding?

unreal patio
#

i have the event but what i dont udnerstand is how after this i get the strings

pseudo ridge
#

At this point in your code, you have an event object of some sort, correct?

#

Like that switch statement is on something like event.type?

unreal patio
#

yes

pseudo ridge
#

So the customer ID that I mentioned (cus_123) will be at event.data.object.customer

unreal patio
#

so for the email i would use event.data.object.email?

pseudo ridge
#

I don't think so, that email is set when creating the Checkout Session. I don't think it will be filled out with whatever the customer specifies in our form

unreal patio
#

I found it event.data.object.customer_details.email Thank you for your help

pseudo ridge
#

Even better, nice find!

unreal patio
#

1 last thing is there PayPal support?

pseudo ridge
#

For Checkout? I don't think so at the moment.