Constants
The following constants are available globally.
-
The current version of this library.
Declaration
Objective-C
static NSString *const _Nonnull STPSDKVersion = @"19.4.0"
Swift
let STPSDKVersion: String
-
The contact’s full physical address.
Declaration
Objective-C
extern const STPContactField _Nonnull STPContactFieldPostalAddress
Swift
static let postalAddress: STPContactField
-
The contact’s email address.
Declaration
Objective-C
extern const STPContactField _Nonnull STPContactFieldEmailAddress
Swift
static let emailAddress: STPContactField
-
The contact’s phone number.
Declaration
Objective-C
extern const STPContactField _Nonnull STPContactFieldPhoneNumber
Swift
static let phoneNumber: STPContactField
-
The contact’s name.
Declaration
Objective-C
extern const STPContactField _Nonnull STPContactFieldName
Swift
static let name: STPContactField
-
The error domain for errors in
STPPaymentHandler
.Declaration
Objective-C
extern NSString *const _Nonnull STPPaymentHandlerErrorDomain
Swift
let STPPaymentHandlerErrorDomain: String
-
A value for
code
indicating the provided payment method failed authentication.Declaration
Objective-C
extern NSString *const _Nonnull STPPaymentIntentLastPaymentErrorCodeAuthenticationFailure
Swift
let STPPaymentIntentLastPaymentErrorCodeAuthenticationFailure: String
-
The domain for NSErrors specific to
STPRedirectContext
Declaration
Objective-C
extern NSString *const _Nonnull STPRedirectContextErrorDomain
Swift
let STPRedirectContextErrorDomain: String
-
A value for
code
indicating the provided payment method failed authentication.Declaration
Objective-C
extern NSString *const _Nonnull STPSetupIntentLastSetupErrorCodeAuthenticationFailure
Swift
let STPSetupIntentLastSetupErrorCodeAuthenticationFailure: String
-
All Stripe iOS errors will be under this domain.
Declaration
Objective-C
extern NSString *const _Nonnull StripeDomain
Swift
let StripeDomain: String
-
A developer-friendly error message that explains what went wrong. You probably shouldn’t show this to your users, but might want to use it yourself.
Declaration
Objective-C
extern NSString *const _Nonnull STPErrorMessageKey
Swift
let STPErrorMessageKey: String
-
What went wrong with your STPCard (e.g., STPInvalidCVC. See below for full list).
Declaration
Objective-C
extern NSString *const _Nonnull STPCardErrorCodeKey
Swift
let STPCardErrorCodeKey: String
-
Which parameter on the STPCard had an error (e.g., “cvc”). Useful for marking up the right UI element.
Declaration
Objective-C
extern NSString *const _Nonnull STPErrorParameterKey
Swift
let STPErrorParameterKey: String
-
The error code returned by the Stripe API.
Declaration
Objective-C
extern NSString *const _Nonnull STPStripeErrorCodeKey
Swift
let STPStripeErrorCodeKey: String
-
The error type returned by the Stripe API.
Declaration
Objective-C
extern NSString *const _Nonnull STPStripeErrorTypeKey
Swift
let STPStripeErrorTypeKey: String
-
The card number is not a valid credit card number.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPInvalidNumber
Swift
static let invalidNumber: STPCardErrorCode
-
The card has an invalid expiration month.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPInvalidExpMonth
Swift
static let invalidExpMonth: STPCardErrorCode
-
The card has an invalid expiration year.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPInvalidExpYear
Swift
static let invalidExpYear: STPCardErrorCode
-
The card has an invalid CVC.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPInvalidCVC
Swift
static let invalidCVC: STPCardErrorCode
-
The card number is incorrect.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPIncorrectNumber
Swift
static let incorrectNumber: STPCardErrorCode
-
The card is expired.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPExpiredCard
Swift
static let expiredCard: STPCardErrorCode
-
The card was declined.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPCardDeclined
Swift
static let declined: STPCardErrorCode
-
The card has an incorrect CVC.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPIncorrectCVC
Swift
static let incorrectCVC: STPCardErrorCode
-
An error occured while processing this card.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPProcessingError
Swift
static let processingError: STPCardErrorCode
-
The postal code is incorrect.
Declaration
Objective-C
extern STPCardErrorCode _Nonnull const STPIncorrectZip
Swift
static let incorrectZip: STPCardErrorCode