#afenster

1 messages · Page 1 of 1 (latest)

upbeat lakeBOT
golden verge
#

Always if Stripe returns an array of errors, the first is user-friendly and the second is "Must provide source or customer."

burnt harbor
#

Two errors in what context? ie, from what action?

#

There should only be a single error for any single method call or API request -- i'm not sure how you'd get two

golden verge
#

Just a moment, I'll give you more detail.

burnt harbor
#

What is that object? That doesn't look like our SDK. Are you aggregating errors in your system?

golden verge
#

Sorry, not so familiar with the old code as the new code. Looks like we called stripe in the Javascript, got a token. Then in our .Net API, we're creating a ChargeService and calling CreateAsync()

#

I just tried it and got this token: tok_1MegYhJPqlMypbZJpAF7BfP6

burnt harbor
#

Sure thats a tokenized card object, but is unrelated to the errors you mentioned

#

You'll need to spend some more time with the code to understand where the errors are coming from

#

It looks like you might be aggregating multiple errors on your end

#

But generally speaking our API errors indicate results your server should interpret to manage customer-facing flows

#

Most of the time you won't want to expose those errors directly to customers

golden verge
#

OK, I'll look further. However, at least with the new Stripe PaymentElement, I was under the impression that the error messages were intended to be user friendly. So far it looks that way.

#

thanks. Have a good day.

burnt harbor
#

The error messages controlled by the Payment Element itself are meant to be user facing, yes, but not necessarily those from your server back end