#perqin_api

1 messages ¡ Page 1 of 1 (latest)

narrow briarBOT
#

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

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

spiral nightBOT
hexed halo
#

Are you asking how to handle if API responds with invalid_request ?

olive raptor
#

Yes because the error property is only available for a failed preview request.

#

This is not specified in the documentation, but we need the detail to display the proper message to the users.

hexed halo
#

Do you have an example of such request?

olive raptor
#

It looks like this:

{
    message: '"+12312312323" is not a valid phone number',
    param: 'shipping.phone',
    request_log_url: 'https://dashboard.stripe.com/test/logs/req_0stbl8ejJw1guQ?t=1713231726',
    type: 'invalid_request_error'
}
#

Sorry that I have to correct a mistaken expression above. There's no "error" field. That field is provided by our backend, which wraps the error response from the Stripe server.

hexed halo
#
If the error involves a specific parameter, use e.param to determine which one.```
olive raptor
#

OK I got it. But it seems that the behavior of the Stripe server is changing. When sending an invalid phone number, we previously have the param valued shipping[phone] but these days it changes to shipping.phone.

hexed halo
#

Do you have the other request ID?

olive raptor
#

Let me check the log.