Errors
-
Possible error codes for NSError objects under the SCPErrorDomain domain.
See moreDeclaration
Objective-C
enum SCPError : NSInteger {}Swift
typealias ErrorCode.Code._ErrorType = ErrorCode -
The error domain for all errors originating from the Stripe Terminal SDK.
Declaration
Objective-C
extern NSString *const _Nonnull SCPErrorDomainSwift
let ErrorDomain: String
-
Use this enum to access
userInfokeys forNSErrorobjects under theSCPErrorDomaindomain.Declaration
Objective-C
typedef NSString *const SCPErrorKeySwift
struct ErrorKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable -
An error message explaining what went wrong. You probably shouldn’t show this to your users, but may want to use it yourself.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyMessageSwift
static let message: ErrorKey -
The HTTP status code of the response.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyHttpStatusCodeSwift
static let httpStatusCode: ErrorKey -
This error message comes from the reader. You probably shouldn’t show this to your users, but may want to inspect it yourself.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyReaderMessageSwift
static let readerMessage: ErrorKey -
If an Tap To Pay reader fails to connect due to a device ban and the error has an associated ban expiry date, the
NSDatewill be returned under this key.See
SCPErrorTapToPayReaderDeviceBannedDeclaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyDeviceBannedUntilDateSwift
static let deviceBannedUntilDate: ErrorKey -
If an Tap To Pay reader fails to prepare and includes an associated reason string, the associated
NSStringwill be returned under this key.See
SCPErrorTapToPayReaderFailedToPrepareDeclaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyPrepareFailedReasonSwift
static let prepareFailedReason: ErrorKey -
If a Stripe API request failed, the failed request’s id will be returned in the error under this key.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIRequestIdSwift
static let stripeAPIRequestId: ErrorKey -
The decline code returned by the Stripe API.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIDeclineCodeSwift
static let stripeAPIDeclineCode: ErrorKey -
The error code returned by the Stripe API.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIErrorCodeSwift
static let stripeAPIErrorCode: ErrorKey -
The parameter the error relates to if the error is parameter-specific.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIErrorParameterSwift
static let stripeAPIErrorParameter: ErrorKey -
The error type returned by the Stripe API.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIErrorTypeSwift
static let stripeAPIErrorType: ErrorKey -
If a Stripe API request failed and the error has an associated PaymentIntent, the
SCPPaymentIntentwill be returned under this key.Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIPaymentIntentSwift
static let stripeAPIPaymentIntent: ErrorKey -
The documentation URL for the error returned by the Stripe API.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIDocUrlSwift
static let stripeAPIDocUrl: ErrorKey -
If a refund fails, the reason for refund failure if known. Possible values are
lost_or_stolen_card,expired_or_canceled_card, orunknown.Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyStripeAPIFailureReasonSwift
static let stripeAPIFailureReason: ErrorKey -
If a decline occurs while offline, the reason for the failure.
Declaration
Objective-C
extern SCPErrorKey _Nonnull SCPErrorKeyOfflineDeclineReasonSwift
static let offlineDeclineReason: ErrorKey
Errors Reference