#peanut_api

1 messages ¡ Page 1 of 1 (latest)

fiery vigilBOT
#

👋 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/1449109791937921206

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

delicate valley
#

Are you using /v1/charge to create a Charge object? This is the legacy integration and shouldn't be used. You should use Payment Intent integration with receipt_email:

Stripe will throw error when creating a Payment Intent if the email address is invalid. It'll be a standard email validation such as a prefix with "@" and a domain

tardy spoke
#

I'm working within a legacy environment that has been in operation for about a decade, I cannot just switch over the new methods right now

#

It'll be a standard email validation such as a prefix with "@" and a domain

Thank you for this, but I guess I would need to know exactly what "standard" means here, otherwise I'd be making a request, throwing an invalid_email error, and then I have to either reattempt without the email or do something else

delicate valley
#

We don't have a comprehensive list of email validation. When the email is invalid, Stripe will return status code of 400 with an error message that the email address is invalid. When this status code and error are returned, you can re-attempt without an email

tardy spoke
#

yeah I was trying to avoid doing that double attempt because it complicates things and also probably doesn't play well with idempontency keys

delicate valley
#

I don't have a comprehensive validation checks to share. As a start, I'd recommend checking the format of the email address. You can then use 400 status code and error message as a fallback for the retry

tardy spoke
#

understood, thank you for your time and support

#

I appreciate it