SCPError

Objective-C

enum SCPError : NSInteger {}

Swift

typealias ErrorCode.Code._ErrorType = ErrorCode

Possible error codes for NSError objects under the SCPErrorDomain domain.

  • The SDK is busy executing another command. The SDK can only execute a single command at a time. You can use the paymentStatus or connectionStatus properties on your SCPTerminal instance (or the corresponding delegate methods) to determine if the SDK is ready to accept another command.

    Declaration

    Objective-C

    SCPErrorBusy = 1000

    Swift

    case busy = 1000
  • Canceling a command failed because the command already completed.

    Declaration

    Objective-C

    SCPErrorCancelFailedAlreadyCompleted = 1010

    Swift

    case cancelFailedAlreadyCompleted = 1010
  • No reader is connected. Connect to a reader before trying again.

    Declaration

    Objective-C

    SCPErrorNotConnectedToReader = 1100

    Swift

    case notConnectedToReader = 1100
  • Already connected to a reader.

    Declaration

    Objective-C

    SCPErrorAlreadyConnectedToReader = 1110

    Swift

    case alreadyConnectedToReader = 1110
  • Your implementation of fetchConnectionToken called the completion block with (nil, nil). Please make sure your integration completes with either a connection token or an error.

    Declaration

    Objective-C

    SCPErrorConnectionTokenProviderCompletedWithNothing = 1510

    Swift

    case connectionTokenProviderCompletedWithNothing = 1510
  • processPayment was called with an unknown or invalid PaymentIntent. You must process a payment immediately after collecting a payment method.

    Declaration

    Objective-C

    SCPErrorProcessInvalidPaymentIntent = 1530

    Swift

    case processInvalidPaymentIntent = 1530
  • collectPaymentMethod or processPayment was called with a nil PaymentIntent.

    Declaration

    Objective-C

    SCPErrorNilPaymentIntent = 1540

    Swift

    case nilPaymentIntent = 1540
  • collectSetupIntentPaymentMethod or processSetupIntent was called with a nil SetupIntent.

    Declaration

    Objective-C

    SCPErrorNilSetupIntent = 1542

    Swift

    case nilSetupIntent = 1542
  • processRefund was called without calling collectRefundPaymentMethod beforehand.

    Declaration

    Objective-C

    SCPErrorNilRefundPaymentMethod = 1550

    Swift

    case nilRefundPaymentMethod = 1550
  • The RefundParameters object has invalid values. The Charge ID (ch_123abc) can be found on the PaymentIntent object, which you should get from your backend.

    Declaration

    Objective-C

    SCPErrorInvalidRefundParameters = 1555

    Swift

    case invalidRefundParameters = 1555
  • A PaymentIntent or SetupIntent was referenced using an invalid client secret.

    Declaration

    Objective-C

    SCPErrorInvalidClientSecret = 1560

    Swift

    case invalidClientSecret = 1560
  • The SDK must be actively Discovering Readers in order to successfully connect to a reader. See documentation on -[SCPTerminal discoverReaders:delegate:completion:] and -[SCPTerminal connectReader:completion:]

    Declaration

    Objective-C

    SCPErrorMustBeDiscoveringToConnect = 1570

    Swift

    case mustBeDiscoveringToConnect = 1570
  • Before connecting to a reader, it must have already been discovered in the current discovery session. Trying to connect to a reader from a previous discovery session is not supported.

    Declaration

    Objective-C

    SCPErrorCannotConnectToUndiscoveredReader = 1580

    Swift

    case cannotConnectToUndiscoveredReader = 1580
  • discoverReaders was called using an invalid SCPDiscoveryConfiguration. Your app selected a discovery method that is either incompatible with the selected device type or attemped to use simulated or locationId with a reader which does not support simulated or locationId. Currently chipper2X is the only reader which supports simulated and verifoneP400 is the only reader which supports use of locationId for location filtering.

    See

    SCPDiscoveryConfiguration for valid configurations.

    Declaration

    Objective-C

    SCPErrorInvalidDiscoveryConfiguration = 1590

    Swift

    case invalidDiscoveryConfiguration = 1590
  • installUpdate was passed an update that is for a different reader. Updates can only be installed on the reader that was connected when the update was announced.

    Declaration

    Objective-C

    SCPErrorInvalidReaderForUpdate = 1861

    Swift

    case invalidReaderForUpdate = 1861
  • -[SCPTerminal connectReader:completion:] 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.

    Declaration

    Objective-C

    SCPErrorUnsupportedSDK = 1870

    Swift

    case unsupportedSDK = 1870
  • This feature is currently not available for the selected reader.

    Declaration

    Objective-C

    SCPErrorFeatureNotAvailableWithConnectedReader = 1880

    Swift

    case featureNotAvailableWithConnectedReader = 1880
  • This feature is not currently available.

    Declaration

    Objective-C

    SCPErrorFeatureNotAvailable = 1890

    Swift

    case featureNotAvailable = 1890
  • The ListLocationsParameters object has invalid values.

    Declaration

    Objective-C

    SCPErrorInvalidListLocationsLimitParameter = 1900

    Swift

    case invalidListLocationsLimitParameter = 1900
  • The locationId parameter to BluetoothConnectionConfiguration is required but a valid one was not provided.

    Declaration

    Objective-C

    SCPErrorBluetoothConnectionInvalidLocationIdParameter = 1910

    Swift

    case bluetoothConnectionInvalidLocationIdParameter = 1910
  • A required parameter was invalid or missing.

    Declaration

    Objective-C

    SCPErrorInvalidRequiredParameter = 1920

    Swift

    case invalidRequiredParameter = 1920
  • An invalid ConnectionConfiguration was passed through connect.

    Declaration

    Objective-C

    SCPErrorReaderConnectionConfigurationInvalid = 1940

    Swift

    case readerConnectionConfigurationInvalid = 1940
  • An invalid usage of eligibleAmount or skipTipping was passed into collect.

    Declaration

    Objective-C

    SCPErrorReaderTippingParameterInvalid = 1950

    Swift

    case readerTippingParameterInvalid = 1950
  • The provided location ID parameter was invalid.

    Declaration

    Objective-C

    SCPErrorInvalidLocationIdParameter = 1960

    Swift

    case invalidLocationIdParameter = 1960
  • The command was canceled by your app.

    Declaration

    Objective-C

    SCPErrorCanceled = 2020

    Swift

    case canceled = 2020
  • 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.

    Declaration

    Objective-C

    SCPErrorLocationServicesDisabled = 2200

    Swift

    case locationServicesDisabled = 2200
  • This error indicates that Bluetooth is turned off, and the user should use Settings to turn Bluetooth on.

    If Bluetooth is on but the app does not have permission to use it, a different error (SCPErrorBluetoothError) occurs.

    Declaration

    Objective-C

    SCPErrorBluetoothDisabled = 2320

    Swift

    case bluetoothDisabled = 2320
  • Bluetooth is turned on on the device, but access to Bluetooth has been denied for your app. The user needs to go to Settings > Your App > and enable Bluetooth

    Declaration

    Objective-C

    SCPErrorBluetoothAccessDenied = 2321

    Swift

    case bluetoothAccessDenied = 2321
  • Scanning for bluetooth devices timed out.

    Declaration

    Objective-C

    SCPErrorBluetoothScanTimedOut = 2330

    Swift

    case bluetoothScanTimedOut = 2330
  • Bluetooth Low Energy is unsupported on this iOS device. Use a different iOS device that supports BLE (also known as Bluetooth 4.0)

    Declaration

    Objective-C

    SCPErrorBluetoothLowEnergyUnsupported = 2340

    Swift

    case bluetoothLowEnergyUnsupported = 2340
  • Updating the reader software failed because the reader’s battery is too low. Charge the reader before trying again.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailedBatteryLow = 2650

    Swift

    case readerSoftwareUpdateFailedBatteryLow = 2650
  • Updating the reader software failed because the update was interrupted.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailedInterrupted = 2660

    Swift

    case readerSoftwareUpdateFailedInterrupted = 2660
  • Updating the reader software failed because the update has expired. Please disconnect and reconnect from the reader to retrieve a new update.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailedExpiredUpdate = 2670

    Swift

    case readerSoftwareUpdateFailedExpiredUpdate = 2670
  • The reader has a critically low battery and cannot connect to the iOS device. Charge the reader before trying again.

    Declaration

    Objective-C

    SCPErrorBluetoothConnectionFailedBatteryCriticallyLow = 2680

    Swift

    case bluetoothConnectionFailedBatteryCriticallyLow = 2680
  • The card is not a chip card.

    Declaration

    Objective-C

    SCPErrorCardInsertNotRead = 2810

    Swift

    case cardInsertNotRead = 2810
  • The swipe could not be read.

    Declaration

    Objective-C

    SCPErrorCardSwipeNotRead = 2820

    Swift

    case cardSwipeNotRead = 2820
  • Reading a card timed out.

    Declaration

    Objective-C

    SCPErrorCardReadTimedOut = 2830

    Swift

    case cardReadTimedOut = 2830
  • The card was removed during the transaction.

    Declaration

    Objective-C

    SCPErrorCardRemoved = 2840

    Swift

    case cardRemoved = 2840
  • 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.

    Your terminal delegate will receive -[SCPTerminalDelegate terminal:didReportReaderEvent:info:] with SCPReaderEventCardRemoved when the card is removed.

    The Chipper 2x and WisePad 3 will beep until the card is removed.

    Declaration

    Objective-C

    SCPErrorCardLeftInReader = 2850

    Swift

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

    Declaration

    Objective-C

    SCPErrorMissingEMVData = 2892

    Swift

    case missingEMVData = 2892
  • The command was not permitted to execute by the operating system. This can happen for a number of reasons, but most commonly:

    • Your application does not have the necessary entitlements.
    • Your application bundle is invalid.

    Declaration

    Objective-C

    SCPErrorCommandNotAllowed = 2900

    Swift

    case commandNotAllowed = 2900
  • The mobile device on which the app is running is in an unsupported configuration. Verify that the device is running a supported version of iOS and that the mobile device has the capability you are attempting to use.

    Declaration

    Objective-C

    SCPErrorUnsupportedMobileDeviceConfiguration = 2910

    Swift

    case unsupportedMobileDeviceConfiguration = 2910
  • The mobile device on which the app is running must have a passcode set.

    Declaration

    Objective-C

    SCPErrorPasscodeNotEnabled = 2920

    Swift

    case passcodeNotEnabled = 2920
  • The card reader cannot be used while a phone call is active.

    Declaration

    Objective-C

    SCPErrorCommandNotAllowedDuringCall = 2930

    Swift

    case commandNotAllowedDuringCall = 2930
  • An attempt was made to charge an amount not supported by the reader.

    Declaration

    Objective-C

    SCPErrorInvalidAmount = 2940

    Swift

    case invalidAmount = 2940
  • An attempt was made to charge an amount in a currency not supported by the reader.

    Declaration

    Objective-C

    SCPErrorInvalidCurrency = 2950

    Swift

    case invalidCurrency = 2950
  • Failed to accept reader-specific terms of service because there is no iCloud user signed in. Direct the user to sign into an appropriate iCloud account via iOS Settings and try again.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn = 2960

    Swift

    case appleBuiltInReaderTOSAcceptanceRequiresiCloudSignIn = 2960
  • The user cancelled reader-specific terms of service acceptance.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderTOSAcceptanceCanceled = 2970

    Swift

    case appleBuiltInReaderTOSAcceptanceCanceled = 2970
  • The reader is busy.

    Declaration

    Objective-C

    SCPErrorReaderBusy = 3010

    Swift

    case readerBusy = 3010
  • An incompatible reader was detected. You can only use the Stripe Terminal iOS SDK with one of Stripe’s pre-certified readers.

    Declaration

    Objective-C

    SCPErrorIncompatibleReader = 3030

    Swift

    case incompatibleReader = 3030
  • Could not communicate with the reader.

    Declaration

    Objective-C

    SCPErrorReaderCommunicationError = 3060

    Swift

    case readerCommunicationError = 3060
  • NFC functionality is disabled. Among other things, it may indicate that the app does not have permission to use NFC.

    Declaration

    Objective-C

    SCPErrorNFCDisabled = 3100

    Swift

    case nfcDisabled = 3100
  • Generic Bluetooth error.

    Among other things, it may indicate that the app does not have permission to use Bluetooth (iOS 13+).

    Declaration

    Objective-C

    SCPErrorBluetoothError = 3200

    Swift

    case bluetoothError = 3200
  • Connecting to the bluetooth device timed out. Make sure the device is powered on, in range, and not connected to another app or device. If this error continues to occur, you may need to charge the device.

    Declaration

    Objective-C

    SCPErrorBluetoothConnectTimedOut = 3210

    Swift

    case bluetoothConnectTimedOut = 3210
  • The Bluetooth device was disconnected unexpectedly.

    Declaration

    Objective-C

    SCPErrorBluetoothDisconnected = 3230

    Swift

    case bluetoothDisconnected = 3230
  • Bluetooth pairing error, the reader has removed this device pairing information. Forget the reader in iOS Settings.

    Declaration

    Objective-C

    SCPErrorBluetoothPeerRemovedPairingInformation = 3240

    Swift

    case bluetoothPeerRemovedPairingInformation = 3240
  • The Bluetooth reader is already paired to another device. The Bluetooth reader must have its pairing reset to connect to this device.

    Declaration

    Objective-C

    SCPErrorBluetoothAlreadyPairedWithAnotherDevice = 3241

    Swift

    case bluetoothAlreadyPairedWithAnotherDevice = 3241
  • Generic reader software update error.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailed = 3800

    Swift

    case readerSoftwareUpdateFailed = 3800
  • Updating the reader software failed because there was an error communicating with the reader.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailedReaderError = 3830

    Swift

    case readerSoftwareUpdateFailedReaderError = 3830
  • Updating the reader software failed because there was an error communicating with the update server.

    Declaration

    Objective-C

    SCPErrorReaderSoftwareUpdateFailedServerError = 3840

    Swift

    case readerSoftwareUpdateFailedServerError = 3840
  • 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 to disconnect and reconnect their reader in order to update the reader.

    Declaration

    Objective-C

    SCPErrorUnsupportedReaderVersion = 3850

    Swift

    case unsupportedReaderVersion = 3850
  • The reader returned from discovery does not have an IP address and cannot be connected to. The IP address should have been set by the SDK during registration of the reader. Try registering the reader again.

    Declaration

    Objective-C

    SCPErrorUnknownReaderIpAddress = 3860

    Swift

    case unknownReaderIpAddress = 3860
  • Connecting to reader over the internet timed out. Make sure your device and reader are on the same Wifi network and your reader is connected to the Wifi network.

    Declaration

    Objective-C

    SCPErrorInternetConnectTimeOut = 3870

    Swift

    case internetConnectTimeOut = 3870
  • Connecting to the reader failed because it is currently in use and SCPConnectionConfiguration.failIfInUse was set to true.

    Try to connect again with failIfInUse = false, or choose a different reader.

    A reader is in use while it’s collecting a payment.

    Declaration

    Objective-C

    SCPErrorConnectFailedReaderIsInUse = 3880

    Swift

    case connectFailedReaderIsInUse = 3880
  • The Bluetooth reader has disconnected and we are attempting to reconnect.

    Declaration

    Objective-C

    SCPErrorBluetoothReconnectStarted = 3890

    Swift

    case bluetoothReconnectStarted = 3890
  • An attempt was made to interact with the reader while the the app is in the background.

    Declaration

    Objective-C

    SCPErrorReaderNotAccessibleInBackground = 3900

    Swift

    case readerNotAccessibleInBackground = 3900
  • Preparing the Apple Built-In reader to collect payments failed. Try connecting again.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderFailedToPrepare = 3910

    Swift

    case appleBuiltInReaderFailedToPrepare = 3910
  • This device cannot be used to process using the Apple Built-In reader as it has been banned.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderDeviceBanned = 3920

    Swift

    case appleBuiltInReaderDeviceBanned = 3920
  • The operation could not be completed because the reader-specific terms of service have not yet been accepted. Try connecting again.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderTOSNotYetAccepted = 3930

    Swift

    case appleBuiltInReaderTOSNotYetAccepted = 3930
  • Failed to accept reader-specific terms of service using the signed-in Apple ID. Ensure the Apple ID is still active and in a good standing and try again.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderTOSAcceptanceFailed = 3940

    Swift

    case appleBuiltInReaderTOSAcceptanceFailed = 3940
  • This merchant account cannot be used with Apple Built-In reader as it has been blocked.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderMerchantBlocked = 3950

    Swift

    case appleBuiltInReaderMerchantBlocked = 3950
  • This merchant account cannot be used with the Apple Built-In reader as it is invalid.

    Declaration

    Objective-C

    SCPErrorAppleBuiltInReaderInvalidMerchant = 3960

    Swift

    case appleBuiltInReaderInvalidMerchant = 3960
  • Unexpected SDK error.

    Declaration

    Objective-C

    SCPErrorUnexpectedSdkError = 5000

    Swift

    case unexpectedSdkError = 5000
  • Unexpected reader error.

    Declaration

    Objective-C

    SCPErrorUnexpectedReaderError = 5001

    Swift

    case unexpectedReaderError = 5001
  • The Stripe API declined the transaction. Inspect the error’s requestError property for more information about the decline, including the decline code.

    Declaration

    Objective-C

    SCPErrorDeclinedByStripeAPI = 6000

    Swift

    case declinedByStripeAPI = 6000
  • The reader declined the transaction. Try another card.

    Declaration

    Objective-C

    SCPErrorDeclinedByReader = 6500

    Swift

    case declinedByReader = 6500
  • The cardholder must give consent in order for this operation to succeed.

    Declaration

    Objective-C

    SCPErrorCommandRequiresCardholderConsent = 6700

    Swift

    case commandRequiresCardholderConsent = 6700
  • The refund failed. The customer’s bank or card issuer was unable to process it correctly (e.g., a closed bank account or a problem with the card)

    Declaration

    Objective-C

    SCPErrorRefundFailed = 6800

    Swift

    case refundFailed = 6800
  • The SDK is not connected to the internet.

    Declaration

    Objective-C

    SCPErrorNotConnectedToInternet = 9000

    Swift

    case notConnectedToInternet = 9000
  • The underlying request timed out.

    Declaration

    Objective-C

    SCPErrorRequestTimedOut = 9010

    Swift

    case requestTimedOut = 9010
  • The underlying request returned an API error.

    Declaration

    Objective-C

    SCPErrorStripeAPIError = 9020

    Swift

    case stripeAPIError = 9020
  • The API response from Stripe could not be decoded.

    Declaration

    Objective-C

    SCPErrorStripeAPIResponseDecodingError = 9030

    Swift

    case stripeAPIResponseDecodingError = 9030
  • Generic network error

    Declaration

    Objective-C

    SCPErrorInternalNetworkError = 9040

    Swift

    case internalNetworkError = 9040
  • Your implementation of -[SCPConnectionTokenProvider fetchConnectionToken:] called the completion block with an error.

    Declaration

    Objective-C

    SCPErrorConnectionTokenProviderCompletedWithError = 9050

    Swift

    case connectionTokenProviderCompletedWithError = 9050
  • Your implementation of -[SCPConnectionTokenProvider fetchConnectionToken:] did not call the provided completion block within 60 seconds.

    Declaration

    Objective-C

    SCPErrorConnectionTokenProviderTimedOut = 9052

    Swift

    case connectionTokenProviderTimedOut = 9052
  • 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. -[SCPTerminalDelegate terminal:didReportUnexpectedReaderDisconnect:] will be called if the SDK is able to successfully auto-disconnect. If it does not successfully auto-disconnect (didReportUnexpectedReaderDisconnect will not be called and SCPTerminal.connectionStatus will still be SCPConnectionStatusConnected) you can attempt again via -[SCPTerminal 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:

    Declaration

    Objective-C

    SCPErrorSessionExpired = 9060

    Swift

    case sessionExpired = 9060