STPSetupIntentLastSetupErrorType
enum STPSetupIntentLastSetupErrorType {}
The type of the error represented by STPSetupIntentLastSetupError
.
Some STPSetupIntentLastError properties are only populated for certain error types.
-
An unknown error type.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeUnknown
Swift
case unknown = 0
-
An error connecting to Stripe’s API.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeAPIConnection
Swift
case apiConnection = 1
-
An error with the Stripe API.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeAPI
Swift
case API = 2
-
A failure to authenticate your customer.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeAuthentication
Swift
case authentication = 3
-
Card errors are the most common type of error you should expect to handle. They result when the user enters a card that can’t be charged for some reason.
Check the
declineCode
property for the decline code. Themessage
property contains a message you can show to your users.Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeCard
Swift
case card = 4
-
Keys for idempotent requests can only be used with the same parameters they were first used with.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeIdempotency
Swift
case idempotency = 5
-
Invalid request errors. Typically, this is because your request has invalid parameters.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeInvalidRequest
Swift
case invalidRequest = 6
-
Too many requests hit the API too quickly.
Declaration
Objective-C
STPSetupIntentLastSetupErrorTypeRateLimit
Swift
case rateLimit = 7