STPPaymentIntentLastPaymentErrorType
enum STPPaymentIntentLastPaymentErrorType {}
The type of the error represented by STPPaymentIntentLastPaymentError
.
Some STPPaymentIntentLastPaymentError properties are only populated for certain error types.
-
An unknown error type.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeUnknown
Swift
case unknown = 0
-
An error connecting to Stripe’s API.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeAPIConnection
Swift
case apiConnection = 1
-
An error with the Stripe API.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeAPI
Swift
case API = 2
-
A failure to authenticate your customer.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeAuthentication
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
STPPaymentIntentLastPaymentErrorTypeCard
Swift
case card = 4
-
Keys for idempotent requests can only be used with the same parameters they were first used with.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeIdempotency
Swift
case idempotency = 5
-
Invalid request errors. Typically, this is because your request has invalid parameters.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeInvalidRequest
Swift
case invalidRequest = 6
-
Too many requests hit the API too quickly.
Declaration
Objective-C
STPPaymentIntentLastPaymentErrorTypeRateLimit
Swift
case rateLimit = 7