Perseids
Perseids

Reputation: 13260

How can I get localized error messages from Stripe

One of our customers triggered a "Your card has insufficient funds." error during card registration (we only issue a charge at a later time) and we weren't able to show a helpful error message because we didn't have a localization for this error. While my sibling-question Show (localized) payment source registration errors directly in Stripe Elements tries to work around the issue by avoiding to have to display the error at all, there are other places in our payment flow where our backend has to deal with payment errors (e.g. to send the user a mail stating the reason for the payment failure).

Is it possible to get a localized error text from stripe or is there a complete list of possible error codes so we can localize the messages ourselves? (We are using the stripe ruby gem, if that is of relevance.)

Upvotes: 2

Views: 2538

Answers (1)

floatingLomas
floatingLomas

Reputation: 8747

This gem might be useful for you here: https://github.com/ekosz/stripe-i18n

Upvotes: 2

Related Questions