TerminalErrorCode
A TerminalErrorCode
represents the type of error thrown during SDK operations.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
Entries
Cancelling an operation failed
No reader is connected. Connect to a reader before trying again.
Already connected to reader
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.
The version of the SDK you are using is unsupported.
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
Access to location services is currently disabled. This may be because:
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.
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.
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.
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.
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.