#alex-dp - java webhook events
1 messages · Page 1 of 1 (latest)
hey there
Can you share an example event / charge ID i can look at?
Did you provide an existing customer when you created the payment?
hi, look at this charge id
ch_3KRfuYFg4Rvv65py0vsFRTrC
it's in test mode
the checkout is happening through a checkout.stripe.com page
where the user enters their email
I would like to capture that when the charge goes through
perhaps there is another event type that I should use instead of charge.succeeded? thank you
hi
looking
can you retrieve the entire Charge object and log out the raw response? you can use curl for it, for example and share it here (redact any personal info like email etc)
something like (replace sk_test with your test mode publishable key
curl https://api.stripe.com/v1/charges/ch_3KRfuYFg4Rvv65py0vsFRTrC \
-u sk_test_123:
give me 1 min
here
the email is there
I'm just clueless on how to access it from the Charge object sent to the webhook
charge.getBillingDetails().getEmail() I guess will work. thank you so much!
to get the email of the Customer object, you first need to fetch the CUstomer object using the charge.customer CUstomer ID
that Customer object will have customer.email