#shiva-email-event
1 messages · Page 1 of 1 (latest)
Hi there 👋 can you elaborate on what type of webhook event you're referring to, and what you're trying to accomplish?
hi dear
im referring to the charge.succeeded
so currently im in production
and stripe is calling my webhook to provide me updates on success charges
now im using react native sdk to use the paymentsheet ui
where i configured it as mentioned above
so in my test mode
i configured a local listener
where i have something like this:
case "charge.succeeded":
const paymentSucceeded = event.data.object;
const userEmail = paymentSucceeded.billing_details.email;
const orderId = paymentSucceeded.metadata.order_id;
console.log(userEmail --> ${userEmail} orderId --> ${orderId})
if (userEmail && orderId) {
updateOrderPaymentInformation(orderId, userEmail);
console.log(
[P02] - In-App Payment received successfully from ${userEmail} with orderid ${orderId}
);
}
the issue here is that the email is null
like you can see in the stripe dashboard
and in the code for initPaymentSheet im providing name and email, but email is not coming in.
Do you have the ID of a particular event that I can reference?
Thank you for the event. toby had to step away but I am catching up and will check in to this behavior
cool
Apologies that that took me a bit to look in to. I actually don't see an email on that payment intent and it is not attached to a customer. How do you typically set this email when confirming your payments?
const billingDetails = {
name: name,
email: email,
};
const { error } = await initPaymentSheet({
paymentIntentClientSecret: cSecret,
defaultBillingDetails: billingDetails,
primaryButtonColor: "#16162E",
customFlow: false,
merchantDisplayName: "Suriwebwinkel B.V.",
returnURL: "suriwebwinkel://orders"
});
this is according to the docs
name is there
Interesting. And does setting this that way typically work? Where are you getting that email variable from before creating the billingDetails object?
from the props
source of truth is asyncstorage
i also did a console print
on billingDetails
and I can see email in there
this is my first time trying sdk react native.
i have gone through the official documentation of stripe
whats also weird is that my current version is production worked perfeclty fine until today i got to see that there is also no email in event object when stripe called me that was a production payment
This is the payment id: pi_3KsnoDH8w5UYmCB01eoAbKPk
Yeah that is strange. So this sheet worked and the email was getting set on these payment intents before today?
no sheet is new implemenation
When you say that you can see this email in the dashboard, where are you seeing it?
i used stripejs before
Gotcha
which is failing for emails now
no icant see the email in the dashboard as well
pi_3KsnoDH8w5UYmCB01eoAbKPk this user made several payment
which used to work
suddenly today
becuase we have a order app
when the wehbhook gets called we send out order notifications to vendor
so someone reported today that the order was not received
that is how i realized that stripe did not include email
but that code in production did not change
and for another payment today the email was there
so its not a consistent problem
Do you have the ID of that other payment?
Looking in to how this may need to be set
pi_3KsjZJH8w5UYmCB00OVxvpR8
Thank you
sure
those 2 payments came in today through the same code base
nothing changed
one has email and the other one has not.
Interesting. I am looking in to why that might be. Looking in to if there is a way to make sure that email is required on the payment sheet or if there is something else that might be at play
ok sure
email is optionnal
according to the docs
but i need that in by server to process the request
alternatively i could add it as a meta datta
but that would not be a nice design
You can collect it in your own separate field and pass that in to the payment sheet via the defaultBillingDetails property
yea that is what i did
i passed it in defaultBillignDetails
but only the name reflects
on the dashboard
not the email
Can you show me where on the dashboard you are seeing this? I am not seeing customer objects on either of these payment intents
you mean the name ?
Right.
so whats weird is that sometimes its come in and sometimes it does not
On the first PI ID that you sent, I see the name on the object but not the email. So it sounds like this is the client setting these fields inconsistently.
Or possibly the users passing these fields in inconsistently
hmm
so why is the name ther ebut not the email
because its in 1 object
And also this is the only client code:
const billingDetails = {
name: name,
email: email,
};
const { error } = await initPaymentSheet({
paymentIntentClientSecret: cSecret,
defaultBillingDetails: billingDetails,
primaryButtonColor: "#16162E",
customFlow: false,
merchantDisplayName: "Suriwebwinkel B.V.",
returnURL: "suriwebwinkel://orders"
});
for initializing the sheet
You said the email was optional correct? Is it possible that they are not filling this out?
Otherwise, do you have the code where you retreive the email? Unfortunately I am not as familiar with RN and am not seeing this in our "Accept a Payment" doc
no the email is something that i am getting from the token
so the client never fills in the information
ok so i have 2 payment flows:
- when the customer orders something
- when the customer pays for an unpaid item
In both the flows the customer is logged in and their details is kept in the assyncstorage that i am retrieving everytime when i initialize the payment sheet
First i get the paymentintent from the server with and then after that is retrieved i am calling initializePaymentSheet that takes in those properties:
const { error } = await initPaymentSheet({
paymentIntentClientSecret: cSecret,
defaultBillingDetails: billingDetails,
primaryButtonColor: "#16162E",
customFlow: false,
merchantDisplayName: "Suriwebwinkel B.V.",
returnURL: "suriwebwinkel://orders",
style:'alwaysDark'
});
As you se the paymentIntentClientSecret was collected from my paymentintent server call so that will be there and the billingDetails is an object that im constructing by fetching those data from the asyncstorage.
i did console.log(billingDetails) and i got this
Object {
"email": "shivabhaggan@gmail.com",
"name": "Shiva bhaggan",
}
HI @hollow jay I'm stepping in for @zealous spruce .
hi
Based on the level of complexity around React Native and how it interacts with both our Android and iOS SDKs, this question might be better handled by Support where we can take time to examine and reproduce the issue
https://support.stripe.com/contact/email
ok
In a live chat situation we cannot spend the time we need to reproduce the error and examine what is going on.