translate

abstract fun translate(httpCode: Int, errorMessage: String?, stripeError: StripeError?): String

See Stripe API Errors for a list of error codes and associated messages.

Return

a non-null error message

Parameters

httpCode

The HTTP code associated with the error response.

errorMessage

A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.

stripeError

The StripeError that represents detailed information about the error. Specifically, StripeError.code is useful for understanding the underlying error (e.g. "payment_method_unactivated").