TerminalException

class TerminalException @JvmOverloads constructor(val errorCode: TerminalErrorCode, val errorMessage: String, val cause: Throwable? = null, val apiError: ApiError? = null) : Exception

A TerminalException represents an error thrown during SDK operations and will contain a TerminalErrorCode and an errorMessage to provide more specific details.

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

Constructors

Link copied to clipboard
@JvmOverloads
constructor(errorCode: TerminalErrorCode, errorMessage: String, cause: Throwable? = null, apiError: ApiError? = null)

Properties

Link copied to clipboard
val apiError: ApiError? = null

If the errorCode is STRIPE_API_ERROR or DECLINED_BY_STRIPE_API, this field will return a representation of the error object, with additional details.

Link copied to clipboard
open override val cause: Throwable? = null

The root cause for the exception, if any

Link copied to clipboard

The error code associated with this exception.

Link copied to clipboard
val errorMessage: String

The error message associated with this exception.

Link copied to clipboard
open val message: String?
Link copied to clipboard

If the exception is related to a PaymentIntent, this will return one of three things:

Link copied to clipboard

If the exception is related to a Refund, this will return one of two things:

Link copied to clipboard

If the exception is related to a SetupIntent, this will return one of two things:

Functions

Link copied to clipboard
fun addSuppressed(p0: Throwable)
Link copied to clipboard
open fun fillInStackTrace(): Throwable
Link copied to clipboard
open fun getLocalizedMessage(): String
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)