TerminalErrorCode

enum TerminalErrorCode : Enum<TerminalException.TerminalErrorCode>

A TerminalErrorCode represents the class of error

Entries

Link copied to clipboard
COLLECT_INPUTS_TIMED_OUT(TerminalErrorType.USER_ERROR)

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

The device is offline and the PaymentIntent was created with OfflineBehavior.REQUIRE_ONLINE.

Link copied to clipboard
FORCE_OFFLINE_WITH_FEATURE_DISABLED(TerminalErrorType.USER_ERROR)

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
ACCOUNT_ID_MISMATCH_WHILE_FORWARDING(TerminalErrorType.INTEGRATION_ERROR)

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

CONNECTION_TOKEN_PROVIDER_ERROR_WHILE_FORWARDING(TerminalErrorType.NETWORK_ERROR)

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

Link copied to clipboard
MISSING_EMV_DATA(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
OFFLINE_PAYMENT_INTENT_NOT_FOUND(TerminalErrorType.PAYMENT_ERROR)

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
OFFLINE_LIVEMODE_PAYMENT_IN_TESTMODE(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
OFFLINE_TESTMODE_PAYMENT_IN_LIVEMODE(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
OFFLINE_COLLECT_AND_PROCESS_MISMATCH(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
OFFLINE_TRANSACTION_DECLINED(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
OFFLINE_AND_CARD_EXPIRED(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
ONLINE_PIN_NOT_SUPPORTED_OFFLINE(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
INTERAC_NOT_SUPPORTED_OFFLINE(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
CARD_SWIPE_NOT_AVAILABLE(TerminalErrorType.PAYMENT_ERROR)

Error reported when collectPaymentMethod or processPayment 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
INVALID_OFFLINE_CURRENCY(TerminalErrorType.USER_ERROR)

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

Link copied to clipboard
NO_LAST_SEEN_ACCOUNT(TerminalErrorType.USER_ERROR)

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
READER_CONNECTION_NOT_AVAILABLE_OFFLINE(TerminalErrorType.USER_ERROR)

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 several weeks.

Link copied to clipboard
OFFLINE_PAYMENTS_DATABASE_TOO_LARGE(TerminalErrorType.USER_ERROR)

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
AMOUNT_EXCEEDS_MAX_OFFLINE_AMOUNT(TerminalErrorType.USER_ERROR)

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

Link copied to clipboard
ANDROID_API_LEVEL_ERROR(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
SESSION_EXPIRED(TerminalErrorType.NETWORK_ERROR)

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
CONNECTION_TOKEN_PROVIDER_ERROR(TerminalErrorType.NETWORK_ERROR)

Failure to fetch a connection token from the ConnectionTokenProvider

Link copied to clipboard
STRIPE_API_RESPONSE_DECODING_ERROR(TerminalErrorType.NETWORK_ERROR)

The API response from Stripe could not be decoded.

Link copied to clipboard
STRIPE_API_ERROR(TerminalErrorType.NETWORK_ERROR)

The underlying request returned an API error.

Link copied to clipboard
STRIPE_API_CONNECTION_ERROR(TerminalErrorType.NETWORK_ERROR)

Failure to connect to Stripe's API.

Link copied to clipboard
REQUEST_TIMED_OUT(TerminalErrorType.NETWORK_ERROR)

The underlying request timed out.

Link copied to clipboard
DECLINED_BY_READER(TerminalErrorType.PAYMENT_ERROR)

The reader declined the payment. Try another card.

Link copied to clipboard
DECLINED_BY_STRIPE_API(TerminalErrorType.PAYMENT_ERROR)

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

Link copied to clipboard
UNEXPECTED_SDK_ERROR(TerminalErrorType.UNEXPECTED_ERROR)

Unexpected SDK error

Link copied to clipboard
UNSUPPORTED_READER_VERSION(TerminalErrorType.READER_ERROR)

Terminal.processPayment 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
LOCAL_MOBILE_NFC_DISABLED(TerminalErrorType.READER_ERROR)

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

READER_SOFTWARE_UPDATE_FAILED_SERVER_ERROR(TerminalErrorType.READER_ERROR)

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

READER_SOFTWARE_UPDATE_FAILED_READER_ERROR(TerminalErrorType.READER_ERROR)

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

Link copied to clipboard
READER_SOFTWARE_UPDATE_FAILED(TerminalErrorType.READER_ERROR)

Generic reader software update error.

Link copied to clipboard
READER_CONNECTED_TO_ANOTHER_DEVICE(TerminalErrorType.READER_ERROR)

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

Link copied to clipboard
USB_RECONNECT_STARTED(TerminalErrorType.READER_ERROR)

The USB device was disconnected unexpectedly, reconnecting.

Link copied to clipboard
USB_DISCONNECTED(TerminalErrorType.READER_ERROR)

The USB device was disconnected unexpectedly.

Link copied to clipboard
BLUETOOTH_RECONNECT_STARTED(TerminalErrorType.READER_ERROR)

The Bluetooth device was disconnected unexpectedly, reconnecting.

Link copied to clipboard
BLUETOOTH_DISCONNECTED(TerminalErrorType.READER_ERROR)

The Bluetooth device was disconnected unexpectedly.

Link copied to clipboard
BLUETOOTH_ERROR(TerminalErrorType.READER_ERROR)

Generic bluetooth error.

Link copied to clipboard
READER_COMMUNICATION_ERROR(TerminalErrorType.READER_ERROR)

Could not communicate with the reader.

Link copied to clipboard
READER_BUSY(TerminalErrorType.READER_ERROR)

The reader is busy.

Link copied to clipboard
FEATURE_NOT_ENABLED_ON_ACCOUNT(TerminalErrorType.USER_ERROR)

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
USB_DISCOVERY_TIMED_OUT(TerminalErrorType.USER_ERROR)

Scanning for USB devices timed out.

Link copied to clipboard
CARD_LEFT_IN_READER(TerminalErrorType.USER_ERROR)

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
CUSTOMER_CONSENT_REQUIRED(TerminalErrorType.USER_ERROR)

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

Link copied to clipboard
CARD_REMOVED(TerminalErrorType.USER_ERROR)

The card was removed during the transaction

Link copied to clipboard
CARD_READ_TIMED_OUT(TerminalErrorType.USER_ERROR)

Reading a card timed out

Link copied to clipboard
CARD_SWIPE_NOT_READ(TerminalErrorType.USER_ERROR)

The swipe could not be read.

Link copied to clipboard
CARD_INSERT_NOT_READ(TerminalErrorType.USER_ERROR)

The card is not a chip card.

READER_SOFTWARE_UPDATE_FAILED_INTERRUPTED(TerminalErrorType.USER_ERROR)

Updating the reader software failed because the update was interrupted.

READER_SOFTWARE_UPDATE_FAILED_BATTERY_LOW(TerminalErrorType.USER_ERROR)

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

Link copied to clipboard
BLUETOOTH_LOW_ENERGY_UNSUPPORTED(TerminalErrorType.USER_ERROR)
Link copied to clipboard
BLUETOOTH_SCAN_TIMED_OUT(TerminalErrorType.USER_ERROR)

Scanning for bluetooth devices timed out.

Link copied to clipboard
LOCATION_SERVICES_DISABLED(TerminalErrorType.USER_ERROR)

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

Link copied to clipboard
CANCELED(TerminalErrorType.USER_ERROR)

The operation was cancelled by the user

Link copied to clipboard
OFFLINE_MODE_UNSUPPORTED_ANDROID_VERSION(TerminalErrorType.INTEGRATION_ERROR)

The SDK is running on a version of Android older than M/SDK 23.

Link copied to clipboard
LOCAL_MOBILE_DEBUG_NOT_SUPPORTED(TerminalErrorType.INTEGRATION_ERROR)

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
LOCAL_MOBILE_DEVICE_TAMPERED(TerminalErrorType.INTEGRATION_ERROR)

The Android device the SDK is running on has been tampered. Some examples of tampering include:

Link copied to clipboard
LOCAL_MOBILE_UNSUPPORTED_ANDROID_VERSION(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
LOCAL_MOBILE_UNSUPPORTED_DEVICE(TerminalErrorType.INTEGRATION_ERROR)

The Android device the SDK is running on is unsupported by the local mobile library. Reasons for this might include:

Link copied to clipboard
LOCAL_MOBILE_LIBRARY_NOT_INCLUDED(TerminalErrorType.INTEGRATION_ERROR)

The local mobile library hasn't been included with the SDK.

Link copied to clipboard
INVALID_TIP_PARAMETER(TerminalErrorType.INTEGRATION_ERROR)

A tipping parameter is misconfigured or invalid

Link copied to clipboard
INVALID_REQUIRED_PARAMETER(TerminalErrorType.INTEGRATION_ERROR)

A required parameter is misconfigured or invalid

Link copied to clipboard
MISSING_REQUIRED_PARAMETER(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
USB_PERMISSION_DENIED(TerminalErrorType.USER_ERROR)

User denied USB access when requested by the SDK.

Link copied to clipboard
UNSUPPORTED_SDK(TerminalErrorType.INTEGRATION_ERROR)

Terminal.connectBluetoothReader 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
UNEXPECTED_OPERATION(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
UNSUPPORTED_OPERATION(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
INVALID_CLIENT_SECRET(TerminalErrorType.INTEGRATION_ERROR)

A PaymentIntent was referenced using an invalid client secret.

Link copied to clipboard
PROCESS_INVALID_PAYMENT_INTENT(TerminalErrorType.INTEGRATION_ERROR)

Terminal.processPayment was called with an unknown or invalid PaymentIntent. You must process a payment after collecting a payment method. Successfully processed payments may not be processed again.

Link copied to clipboard
BLUETOOTH_PERMISSION_DENIED(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
ALREADY_CONNECTED_TO_READER(TerminalErrorType.INTEGRATION_ERROR)

Already connected to reader

Link copied to clipboard
NOT_CONNECTED_TO_READER(TerminalErrorType.INTEGRATION_ERROR)

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

Link copied to clipboard
CANCEL_FAILED(TerminalErrorType.INTEGRATION_ERROR)

Cancelling an operation failed

Functions

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

Properties

Link copied to clipboard
val name: String
Link copied to clipboard
val ordinal: Int