TerminalErrorCode
A TerminalErrorCode
represents the type of error thrown during SDK operations.
Entries
Cancelling an operation failed
No reader is connected. Connect to a reader before trying again.
Already connected to reader
Either android.permission.BLUETOOTH_CONNECT or android.permission.BLUETOOTH_SCAN must be enabled.
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.
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.
A PaymentIntent was referenced using an invalid client secret.
The Terminal operation that was called isn't supported for this device type
The Terminal operation shouldn't have been called at this time.
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.
User denied USB access when requested by the SDK.
Some integration prerequisite was missing or not met. For example, TerminalApplicationDelegate::onCreate was not called before calling Terminal::initTerminal.
A parameter that is required for your Terminal configuration is missing.
A required parameter is misconfigured or invalid
A tipping parameter is misconfigured or invalid
The Tap to Pay library hasn't been included with the SDK.
The Android device the SDK is running on is unsupported by the Tap to Pay library. Reasons for this might include:
The SDK is running on a version of Android older than 10/SDK 29.
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:
The SDK is running in an insecure environment. Some examples of insecure situations include:
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.
The Android device the SDK is running on does not support offline mode.
Access to location services is currently disabled. This may be because:
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.
The card is not a chip card.
The swipe could not be read.
Reading a card timed out
The card was removed during the transaction
Customer is required to give consent for this operation, such as card collection.
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.
Scanning for USB devices timed out.
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.
The reader is busy.
Could not communicate with the reader.
Generic bluetooth error.
The Bluetooth device was disconnected unexpectedly.
The Bluetooth device was disconnected unexpectedly, reconnecting.
The USB device was disconnected unexpectedly.
The USB device was disconnected unexpectedly, reconnecting.
The reader cannot be reached because it is already connected to a different device.
The reader cannot be reached because the battery level is too low. Charge the reader before trying again.
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.
NFC must be enabled on the device to allow COTS payment processing.
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.
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."
Unexpected SDK error
The Stripe API declined the payment. If this error code is returned, .getApiError will return more details on the decline.
The reader declined the payment. Try another card.
The underlying request timed out.
Failure to connect to Stripe's API.
The underlying request returned an API error.
The API response from Stripe could not be decoded.
Failure to fetch a connection token from the ConnectionTokenProvider
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.
The SDK is running on an unsupported version of Android. This occurs when an integrator overrides minSdkVersion.
Failure in Terminal.confirmPaymentIntent, reported when the PaymentIntent's amount exceeds the configured allowable maximum amount for offline transactions.
Error reported when the offline payments database has too many records. The Terminal should be brought back online to forward payments before collecting more.
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
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.
Error reported when the PaymentIntent's currency is not configured as a valid currency for offline transactions.
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.
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.
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.
Processing a payment while offline and the card was identified as being expired.
Processing a payment while offline and the card's verification failed. Please try a different card.
Error reported when collectPaymentMethod was called while online and confirmPaymentIntent was called while offline. Retry the payment by calling collectPaymentMethod()
again.
Error reported when a testmode payment attempts to forward while the SDK is operating in livemode.
Error reported when a livemode payment attempts to forward while the SDK is operating in testmode.
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:
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.
Error reported when forwarding stored offline payments. The fetched connection token was generated with a different account ID than the stored payment.
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.
The device is offline and the PaymentIntent was created with OfflineBehavior.REQUIRE_ONLINE.
The card used is a known test card and the SDK is operating in livemode.
An unexpected error occurred when using collectInputs
Error reported when a timeout occurs while processing a collect inputs operation.
Error reported when invalid parameters are used while processing a collect inputs operation.
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.
Error reported when an attempt to get or set reader settings has failed.
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.
A surcharging parameter is misconfigured or invalid
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.
Customer consent is required to set allow redisplay to ALWAYS
or LIMITED
for this operation.
The operation was cancelled due to an integration error.
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.