public static enum TerminalException.TerminalErrorCode
A TerminalErrorCode
represents the class of error
Enum Constant and Description |
---|
ALREADY_CONNECTED_TO_READER
Already connected to reader
|
BLUETOOTH_DISCONNECTED
The Bluetooth device was disconnected unexpectedly.
|
BLUETOOTH_ERROR
Generic bluetooth error.
|
BLUETOOTH_LOW_ENERGY_UNSUPPORTED |
BLUETOOTH_PERMISSION_DENIED
Either android.permission.BLUETOOTH or android.permission.BLUETOOTH_ADMIN must be
enabled.
|
BLUETOOTH_SCAN_TIMED_OUT
Scanning for bluetooth devices timed out.
|
CANCELED
The operation was cancelled by the user
|
CANCEL_FAILED
Cancelling an operation failed
|
CARD_INSERT_NOT_READ
The card is not a chip card.
|
CARD_READ_TIMED_OUT
Reading a card timed out
|
CARD_REMOVED
The card was removed during the transaction
|
CARD_SWIPE_NOT_READ
The swipe could not be read.
|
CONNECTION_TOKEN_PROVIDER_ERROR
Failure to fetch a connection token from the
interface ConnectionTokenProvider |
INVALID_CLIENT_SECRET
A PaymentIntent was referenced using an invalid client secret.
|
LOCATION_SERVICES_DISABLED
Access to location services is currently disabled. This may be because:
|
MUST_BE_DISCOVERING_TO_CONNECT
The SDK must be actively discovering readers in order to successfully connect to a
reader.
|
NOT_CONNECTED_TO_READER
No reader is connected. Connect to a reader before trying again.
|
PAYMENT_DECLINED_BY_READER
The reader declined the payment. Try another card.
|
PAYMENT_DECLINED_BY_STRIPE_API
The Stripe API declined the payment. If this error code is returned,
.getApiError will return more details on the decline.
|
PROCESS_INVALID_PAYMENT_INTENT
Terminal.processPayment was called with an unknown or invalid PaymentIntent.
You must process a payment immediately after collecting a payment method. |
READER_BUSY
The reader is busy.
|
READER_COMMUNICATION_ERROR
Could not communicate with the reader.
|
READER_SOFTWARE_UPDATE_FAILED
Generic reader software update error.
|
READER_SOFTWARE_UPDATE_FAILED_BATTERY_LOW
Updating the reader software failed because the reader's battery is
too low. Charge the reader before trying again.
|
READER_SOFTWARE_UPDATE_FAILED_INTERRUPTED
Updating the reader software failed because the update was interrupted.
|
READER_SOFTWARE_UPDATE_FAILED_READER_ERROR
Updating the reader software failed because there was an error
communicating with the reader.
|
READER_SOFTWARE_UPDATE_FAILED_SERVER_ERROR
Updating the reader software failed because there was an error
communicating with the update server.
|
REQUEST_TIMED_OUT
The underlying request timed out.
|
SESSION_EXPIRED
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. |
STRIPE_API_ERROR
The underlying request returned an API error.
|
STRIPE_API_RESPONSE_DECODING_ERROR
The API response from Stripe could not be decoded.
|
UNEXPECTED_SDK_ERROR
Unexpected SDK error
|
UNSUPPORTED_READER_VERSION
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.installUpdate . |
UNSUPPORTED_SDK
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. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
public static TerminalException.TerminalErrorCode CANCEL_FAILED
Cancelling an operation failed
public static TerminalException.TerminalErrorCode NOT_CONNECTED_TO_READER
No reader is connected. Connect to a reader before trying again.
public static TerminalException.TerminalErrorCode ALREADY_CONNECTED_TO_READER
Already connected to reader
public static TerminalException.TerminalErrorCode BLUETOOTH_PERMISSION_DENIED
Either android.permission.BLUETOOTH or android.permission.BLUETOOTH_ADMIN must be enabled.
public static TerminalException.TerminalErrorCode PROCESS_INVALID_PAYMENT_INTENT
Terminal.processPayment
was called with an unknown or invalid PaymentIntent.
You must process a payment immediately after collecting a payment method.
Terminal.processPayment
public static TerminalException.TerminalErrorCode INVALID_CLIENT_SECRET
A PaymentIntent was referenced using an invalid client secret.
public static TerminalException.TerminalErrorCode MUST_BE_DISCOVERING_TO_CONNECT
The SDK must be actively discovering readers in order to successfully connect to a reader.
public static TerminalException.TerminalErrorCode UNSUPPORTED_SDK
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.
https://github.com/stripe/stripe-terminal-android/releases
Terminal.connectReader
public static TerminalException.TerminalErrorCode CANCELED
The operation was cancelled by the user
public static TerminalException.TerminalErrorCode LOCATION_SERVICES_DISABLED
Access to location services is currently disabled. This may be because:
The user disabled location services in the system settings.
The user denied access to location services for your app.
The user's device is in Airplane Mode and unable to gather location data.
public static TerminalException.TerminalErrorCode BLUETOOTH_SCAN_TIMED_OUT
Scanning for bluetooth devices timed out.
public static TerminalException.TerminalErrorCode BLUETOOTH_LOW_ENERGY_UNSUPPORTED
public static TerminalException.TerminalErrorCode READER_SOFTWARE_UPDATE_FAILED_BATTERY_LOW
Updating the reader software failed because the reader's battery is too low. Charge the reader before trying again.
public static TerminalException.TerminalErrorCode READER_SOFTWARE_UPDATE_FAILED_INTERRUPTED
Updating the reader software failed because the update was interrupted.
public static TerminalException.TerminalErrorCode CARD_INSERT_NOT_READ
The card is not a chip card.
public static TerminalException.TerminalErrorCode CARD_SWIPE_NOT_READ
The swipe could not be read.
public static TerminalException.TerminalErrorCode CARD_READ_TIMED_OUT
Reading a card timed out
public static TerminalException.TerminalErrorCode CARD_REMOVED
The card was removed during the transaction
public static TerminalException.TerminalErrorCode READER_BUSY
The reader is busy.
public static TerminalException.TerminalErrorCode READER_COMMUNICATION_ERROR
Could not communicate with the reader.
public static TerminalException.TerminalErrorCode BLUETOOTH_ERROR
Generic bluetooth error.
public static TerminalException.TerminalErrorCode BLUETOOTH_DISCONNECTED
The Bluetooth device was disconnected unexpectedly.
public static TerminalException.TerminalErrorCode READER_SOFTWARE_UPDATE_FAILED
Generic reader software update error.
public static TerminalException.TerminalErrorCode READER_SOFTWARE_UPDATE_FAILED_READER_ERROR
Updating the reader software failed because there was an error communicating with the reader.
public static TerminalException.TerminalErrorCode READER_SOFTWARE_UPDATE_FAILED_SERVER_ERROR
Updating the reader software failed because there was an error communicating with the update server.
public static TerminalException.TerminalErrorCode UNSUPPORTED_READER_VERSION
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.installUpdate
.
https://stripe.com/docs/terminal/readers/bbpos-chipper2xbt#bbpos-chipper-2x-bt-software-releases
public static TerminalException.TerminalErrorCode UNEXPECTED_SDK_ERROR
Unexpected SDK error
public static TerminalException.TerminalErrorCode PAYMENT_DECLINED_BY_STRIPE_API
The Stripe API declined the payment. If this error code is returned, .getApiError will return more details on the decline.
public static TerminalException.TerminalErrorCode PAYMENT_DECLINED_BY_READER
The reader declined the payment. Try another card.
public static TerminalException.TerminalErrorCode REQUEST_TIMED_OUT
The underlying request timed out.
public static TerminalException.TerminalErrorCode STRIPE_API_ERROR
The underlying request returned an API error.
public static TerminalException.TerminalErrorCode STRIPE_API_RESPONSE_DECODING_ERROR
The API response from Stripe could not be decoded.
public static TerminalException.TerminalErrorCode CONNECTION_TOKEN_PROVIDER_ERROR
Failure to fetch a connection token from the interface ConnectionTokenProvider
interface ConnectionTokenProvider
public static TerminalException.TerminalErrorCode SESSION_EXPIRED
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.
NOTE: This error will only occur in one of the following calls:
Terminal.readReusableCard
, Terminal.createPaymentIntent
,
Terminal.retrievePaymentIntent
, Terminal.processPayment
, and
Terminal.cancelPaymentIntent
.