TerminalErrorCode

A TerminalErrorCode represents the type of error thrown during SDK operations.

Entries

Link copied to clipboard

Cancelling an operation failed

Link copied to clipboard

No reader is connected. Connect to a reader before trying again.

Link copied to clipboard

Already connected to reader

Link copied to clipboard

Either android.permission.BLUETOOTH_CONNECT or android.permission.BLUETOOTH_SCAN must be enabled.

Link copied to clipboard

Terminal.confirmPaymentIntent was called with an unknown or invalid PaymentIntent. You must confirm a payment after collecting a payment method. Successfully confirmed payments may not be confirmed again.

Link copied to clipboard

Terminal.confirmSetupIntent was called with an invalid SetupIntent. You must confirm a SetupIntent after collecting a payment method. Successfully confirmed SetupIntents may not be confirmed again.

Link copied to clipboard

A PaymentIntent was referenced using an invalid client secret.

Link copied to clipboard

The Terminal operation that was called isn't supported for this device type

Link copied to clipboard

The Terminal operation shouldn't have been called at this time.

Link copied to clipboard

Terminal.connectReader was called from an unsupported version of the SDK. In order to fix this you will need to update your app to the most recent version of the SDK. We suggest you prompt your user to update their app, assuming there is an update app version with a supported version of our SDK.

Link copied to clipboard

User denied USB access when requested by the SDK.

Link copied to clipboard

Some integration prerequisite was missing or not met. For example, TerminalApplicationDelegate::onCreate was not called before calling Terminal::initTerminal.

Link copied to clipboard

A parameter that is required for your Terminal configuration is missing.

Link copied to clipboard

A required parameter is misconfigured or invalid

Link copied to clipboard

A tipping parameter is misconfigured or invalid

Link copied to clipboard

The Tap to Pay library hasn't been included with the SDK.

Link copied to clipboard

The Android device the SDK is running on is unsupported by the Tap to Pay library. Reasons for this might include:

Link copied to clipboard

The SDK is running on a version of Android older than 10/SDK 29.

Link copied to clipboard

The Android device the SDK is running on has been tampered. These issues are usually the cause of an untrusted OS or hardware. Some examples of tampering include:

Link copied to clipboard

The SDK is running in an insecure environment. Some examples of insecure situations include:

Link copied to clipboard

The SDK is running in a debuggable application. This is not supported for security and compliance reasons. Please test the Tap to Pay on Android SDK with a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true.

Link copied to clipboard

The Android device the SDK is running on does not support offline mode.

Link copied to clipboard

The operation was cancelled by the user

Link copied to clipboard

Access to location services is currently disabled. This may be because:

Link copied to clipboard

Scanning for bluetooth devices timed out.

Updating the reader software failed because the reader's battery is too low. Charge the reader before trying again.

Updating the reader software failed because the update was interrupted.

Link copied to clipboard

The card is not a chip card.

Link copied to clipboard

The swipe could not be read.

Link copied to clipboard

Reading a card timed out

Link copied to clipboard

The card was removed during the transaction

Link copied to clipboard

Customer is required to give consent for this operation, such as card collection.

Link copied to clipboard

A card can only be used for one transaction, and must be removed after being read. Otherwise, subsequent collectPaymentMethod attempts will fail with this error.

Link copied to clipboard

Scanning for USB devices timed out.

Link copied to clipboard

The connected account is not enabled to use the specified feature. Retry without the parameter in question or contact Stripe support to enable the feature on this account.

Link copied to clipboard

The reader is busy.

Link copied to clipboard

Could not communicate with the reader.

Link copied to clipboard

Generic bluetooth error.

Link copied to clipboard

The Bluetooth device was disconnected unexpectedly.

Link copied to clipboard

The Bluetooth device was disconnected unexpectedly, reconnecting.

Link copied to clipboard

The USB device was disconnected unexpectedly.

Link copied to clipboard

The USB device was disconnected unexpectedly, reconnecting.

Link copied to clipboard

The reader cannot be reached because it is already connected to a different device.

Link copied to clipboard

The reader cannot be reached because the battery level is too low. Charge the reader before trying again.

Link copied to clipboard

Generic reader software update error.

Updating the reader software failed because there was an error communicating with the reader.

Updating the reader software failed because there was an error communicating with the update server.

Link copied to clipboard

NFC must be enabled on the device to allow COTS payment processing.

Link copied to clipboard

Terminal.confirmPaymentIntent was called from a reader with an unsupported reader version. You will need to update your reader to the most recent version in order to accept payments. We suggest you prompt your user update the reader via the update flow that you have implemented using Terminal.checkForUpdate and Terminal.installAvailableUpdate.

Link copied to clipboard

This error can happen if the SDK is out-of-date and the SDK can't map to a TerminalErrorCode returned from an internet reader. The error message is prefixed with "Error code: new_error_code."

Link copied to clipboard

Unexpected SDK error

Link copied to clipboard

The Stripe API declined the payment. If this error code is returned, .getApiError will return more details on the decline.

Link copied to clipboard

The reader declined the payment. Try another card.

Link copied to clipboard

The underlying request timed out.

Link copied to clipboard

Failure to connect to Stripe's API.

Link copied to clipboard

The underlying request returned an API error.

Link copied to clipboard

The API response from Stripe could not be decoded.

Link copied to clipboard

Failure to fetch a connection token from the ConnectionTokenProvider

Link copied to clipboard

The current session has expired and the reader must be disconnected and reconnected. The SDK will attempt to auto-disconnect for you and you should instruct your user to reconnect it. TerminalListener.onUnexpectedReaderDisconnect will be called if the SDK is able to successfully auto-disconnect. If it does not successfully auto-disconnect, TerminalListener.onUnexpectedReaderDisconnect will not be called and connectionStatus will still be ConnectionStatus.CONNECTED and you can attempt to disconnect via Terminal.disconnectReader or you can instruct your user to disconnect manually by turning the reader off.

Link copied to clipboard

The SDK is running on an unsupported version of Android. This occurs when an integrator overrides minSdkVersion.

Link copied to clipboard

Failure in Terminal.confirmPaymentIntent, reported when the PaymentIntent's amount exceeds the configured allowable maximum amount for offline transactions.

Link copied to clipboard

Error reported when the offline payments database has too many records. The Terminal should be brought back online to forward payments before collecting more.

Link copied to clipboard

Connecting to the reader failed. To connect to a reader offline, the SDK must have connected to a reader of the same type within the last 30 days. See the Terminal docs for details on restrictions around connecting offline. https://stripe.com/docs/terminal/features/operate-offline/collect-payments#connect-while-offline

Connecting to the reader at this location failed. To connect a reader at a specified location while offline, a reader must have been connected online at that location within the last 30 days. See the Terminal docs for details on restrictions around connecting offline. https://stripe.com/docs/terminal/features/operate-offline/collect-payments#connect-while-offline

Link copied to clipboard

There is no stored account with which the SDK can associate offline operations. Connect to a reader while online to save an account for offline operations.

Link copied to clipboard

Error reported when the PaymentIntent's currency is not configured as a valid currency for offline transactions.

Link copied to clipboard

Error reported when collectPaymentMethod or confirmPaymentIntent was called while offline and the card was read using the swipe method. Payment method data collected using the swipe card read method cannot be processed offline. Retry the payment by calling collectPaymentMethod() again.

Link copied to clipboard

Error reported when collectPaymentMethod or confirmPaymentIntent was called while offline and the presented card was an Interac card. Retry the payment by calling collectPaymentMethod() again.

Link copied to clipboard

Error reported when confirmPaymentIntent was called while offline and the presented card was authenticated with an online PIN. Retry the payment by calling collectPaymentMethod() again.

Attempted to confirm a SetupIntent with a mobile wallet.

Link copied to clipboard

Processing a payment while offline and the card was identified as being expired.

Link copied to clipboard

Processing a payment while offline and the card's verification failed. Please try a different card.

Link copied to clipboard

Error reported when collectPaymentMethod was called while online and confirmPaymentIntent was called while offline. Retry the payment by calling collectPaymentMethod() again.

Link copied to clipboard

Error reported when a testmode payment attempts to forward while the SDK is operating in livemode.

Link copied to clipboard

Error reported when a livemode payment attempts to forward while the SDK is operating in testmode.

Link copied to clipboard

Error reported when processing a PaymentIntent that doesn't have a corresponding create request. In this situation, the PaymentIntent should be created again. This would typically happen if:

Link copied to clipboard

The reader failed to read the data from the presented payment method. If you encounter this error repeatedly, the reader may be faulty.

Error reported while forwarding offline payments when the connection token provider returns an error.

Link copied to clipboard

Error reported when forwarding stored offline payments. The fetched connection token was generated with a different account ID than the stored payment.

Link copied to clipboard

Error reported when a PaymentIntent was created with OfflineBehavior.FORCE_OFFLINE and the reader in use is not configured to operate offline. Use the Terminal Configuration API to enable the functionality or retry with another value for OfflineBehavior.

Link copied to clipboard

The card used is a known test card and the SDK is operating in livemode.

Link copied to clipboard

An unexpected error occurred when using collectInputs

Link copied to clipboard

Error reported when a timeout occurs while processing a collect inputs operation.

Link copied to clipboard

Error reported when invalid parameters are used while processing a collect inputs operation.

Link copied to clipboard

Error reported when the connected account does not have access to this feature, or the reader/SDK version is not compatible with the collect inputs operation.

Link copied to clipboard

Error reported when an attempt to get or set reader settings has failed.

Link copied to clipboard

The reader is missing encryption keys required for taking payments. Disconnect and reconnect to the reader to attempt to re-install the keys. If the error persists, contact Stripe support.

Link copied to clipboard

A surcharging parameter is misconfigured or invalid

Link copied to clipboard

Could not communicate to the reader due to SSL handshake failures. Typically occurs when your device is missing SSL certificates, check that you have the required SSL certificates installed on your device. If the error persists, contact Stripe support.

Link copied to clipboard

Customer consent is required to set allow redisplay to ALWAYS or LIMITED for this operation.

Link copied to clipboard

The operation was cancelled due to an integration error.

Types

Link copied to clipboard
actual object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
actual fun toLogString(): String
Link copied to clipboard
actual open override fun toString(): String
Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.