#afenster
1 messages · Page 1 of 1 (latest)
Always if Stripe returns an array of errors, the first is user-friendly and the second is "Must provide source or customer."
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
What is that object? That doesn't look like our SDK. Are you aggregating errors in your system?
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
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
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.
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