Handling Errors

Applies to: Mobile Payments SDK - Android

Learn how to resolve errors in the Mobile Payments SDK for Android.

Link to section

Authorization errors

AuthorizeErrorCodes might be returned when using the AuthorizationManager. These errors are surfaced as a result of your authorization callback.

Error Description
NO_NETWORKThe Mobile Payments SDK couldn't connect to the network.
USAGE_ERRORAuthorizationManager.authorize was used in an unexpected or unsupported way. For more information, see the debugCode and debugMessage within Result.Failure.
Link to section

Bluetooth and pairing errors

PairingErrorCodes might be returned when pairing readers using the ReaderManager. These errors are surfaced as a result of your pairing callback.

Error Description
BLUETOOTH_ALREADY_SCANNINGBluetooth scanning is already in progress. Only one scan can be active at a time. Wait for the first scan to complete and try again.
BLUETOOTH_DISABLEDBluetooth was disabled by the user. Prompt the user to enable Bluetooth and try again.
BLUETOOTH_PERMISSION_DENIEDYour application is missing one or both Android runtime permissions for Bluetooth: BLUETOOTH_CONNECT or BLUETOOTH_SCAN. Check for these permissions and try again.
BLUETOOTH_UNSUPPORTEDThis device doesn't support Bluetooth.
NOT_AUTHORIZEDThe Mobile Payments SDK isn't currently authorized with a Square seller account. Use the AuthorizationManager to authorize a Square account.
TIMEOUTThe Mobile Payments SDK timed out while awaiting reader pairing. Try pairing again.
USAGE_ERRORReaderManager.pairReader was used in an unexpected or unsupported way. For more information, see the debugCode and debugMessage.
Link to section

Payment errors

PaymentErrorCodes might be returned when taking a payment with the PaymentManager. These errors are surfaced as a result of your payment callback.

Error Description
CANCELEDThe payment was canceled before completion.
DEVICE_CLOCK_SKEWEDThe local device time is out of sync with the server time, which could lead to inaccurate payment reporting. Check your device's time and attempt your action again.
LOCATION_SERVICES_DISABLEDThe device's location services were disabled and the payment couldn't be completed. Enable location services and try again.
NOT_AUTHORIZEDThe Mobile Payments SDK isn't currently authorized with a Square seller account. Use the AuthorizationManager to authorize a Square account.
TIMEOUTThe Mobile Payments SDK timed out while awaiting a payment. Try the payment again.
USAGE_ERRORPaymentManager.startPaymentActivity was used in an unexpected or unsupported way. For more information, see the debugCode and debugMessage within Result.Failure.