#red_node-javascript-browser
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1385006455375003803
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
From your code, it looks like you're searching the customer with email as propsData.contact.email? You're not passing the actual email address
the email address is contained in that JSON
the error is on stripe.customers being undefined
this is on the client
Can you share the request ID (req_xxx) of your search request? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
it doesn't get that far
Could you share the full error message you're facing?
payments:93 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'search')
at handlePaymentSuccess (payments:93:44)
at HTMLFormElement.handleSubmit (payments:66:9)
Which version of stripe-node are you using?
Are you referring to Stripe.js?
I had a similar issue with the following code:
var paymentIntent = await stripe.paymentIntents.retrieve
yes
<script src="https://js.stripe.com/v3/"></script>
This is expected. stripe.customer.search is only supported at the server side
not client side
on the above code stripe.paymentIntents was undefined - I had to change it to stripe.retrievePaymentIntent(cs)
gotcha, that's what I was wondering
is there a way to retrieve on client?
I'm afraid that's not possible
stripe.retrieveCustomer maybe?
Stripe.js only supports retrieving Payment Intent and Setup Intent, but not Customer
Here are the functions supported in Stripe.js: https://docs.stripe.com/js
To retrieve, list or search a customer, this can only be done at server side
gotcha. thanks
No problem! Happy to help 😄