Constants

The following constants are available globally.

userInfo keys

  • 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

STPCardErrorCodeKeys