STPSetupIntentLastSetupError

@interface STPSetupIntentLastSetupError : NSObject <STPAPIResponseDecodable>

The error encountered in the previous SetupIntent confirmation.

  • For some errors that could be handled programmatically, a short string indicating the error code reported.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *code;

    Swift

    var code: String? { get }
  • For card (STPSetupIntentLastSetupErrorTypeCard) errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *declineCode;

    Swift

    var declineCode: String? { get }
  • A URL to more information about the error code reported.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull docURL;

    Swift

    var docURL: String { get }
  • A human-readable message providing more details about the error. For card (STPSetupIntentLastSetupErrorTypeCard) errors, these messages can be shown to your users.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull message;

    Swift

    var message: String { get }
  • If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *param;

    Swift

    var param: String? { get }
  • The PaymentMethod object for errors returned on a request involving a PaymentMethod.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPPaymentMethod *paymentMethod;

    Swift

    var paymentMethod: STPPaymentMethod? { get }
  • The type of error.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPSetupIntentLastSetupErrorType type;

    Swift

    var type: STPSetupIntentLastSetupErrorType { get }