ApiError

@Serializable(with = ApiErrorSerializer::class)
data class ApiError(error: InnerError)

An ApiError is an object representing a Stripe API error object.

For more information, see the official Stripe docs: Errors

Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal

Constructors

Link copied to clipboard
constructor(error: InnerError)

Properties

Link copied to clipboard

For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.

Link copied to clipboard

For card errors, the ID of the failed charge

Link copied to clipboard
val code: String?

The code specific to this error type

Link copied to clipboard

If this error results from a declined card (type = CARD_ERROR), this field will provide more details

Link copied to clipboard

A URL to learn more about the error reported

Link copied to clipboard

A human-readable message providing more details about the error

Link copied to clipboard

For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.

Link copied to clipboard

For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.

Link copied to clipboard

If the error is parameter-specific, this returns the parameter related to the error

Link copied to clipboard

If the error is related to a PaymentIntent, this returns the payment intent.

Link copied to clipboard

If the error is related to a Refund, this returns the refund.

Link copied to clipboard

A URL to the request log entry in your dashboard.

Link copied to clipboard

If the error is related to a SetupIntent, this returns the setup intent.

Link copied to clipboard

The type of error returned