STPPaymentMethodCard

@interface STPPaymentMethodCard : NSObject <STPAPIResponseDecodable>

Contains details about a user’s credit card.

  • Unavailable

    You cannot directly instantiate an STPPaymentMethodCard. You should only use one that is part of an existing STPPaymentMethod object.

    You cannot directly instantiate an STPPaymentMethodCard. You should only use one that is part of an existing STPPaymentMethod object.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • The issuer of the card.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPCardBrand brand;

    Swift

    var brand: STPCardBrand { get }
  • Checks on Card address and CVC if provided.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPPaymentMethodCardChecks *checks;

    Swift

    var checks: STPPaymentMethodCardChecks? { get }
  • Two-letter ISO code representing the country of the card.

    Declaration

    Objective-C

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

    Swift

    var country: String? { get }
  • Two-digit number representing the card’s expiration month.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger expMonth;

    Swift

    var expMonth: Int { get }
  • Four-digit number representing the card’s expiration year.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger expYear;

    Swift

    var expYear: Int { get }
  • Card funding type. Can be credit, debit, prepaid, or unknown.

    Declaration

    Objective-C

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

    Swift

    var funding: String? { get }
  • The last four digits of the card.

    Declaration

    Objective-C

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

    Swift

    var last4: String? { get }
  • Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example.

    Declaration

    Objective-C

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

    Swift

    var fingerprint: String? { get }
  • Contains details on how this Card maybe be used for 3D Secure authentication.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        STPPaymentMethodThreeDSecureUsage *threeDSecureUsage;

    Swift

    var threeDSecureUsage: STPPaymentMethodThreeDSecureUsage? { get }
  • If this Card is part of a Card Wallet, this contains the details of the Card Wallet.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPPaymentMethodCardWallet *wallet;

    Swift

    var wallet: STPPaymentMethodCardWallet? { get }
  • Returns a string representation for the provided card brand; i.e. [NSString stringFromBrand:STPCardBrandVisa] == @"Visa".

    Declaration

    Objective-C

    + (nonnull NSString *)stringFromBrand:(STPCardBrand)brand;

    Swift

    class func string(from brand: STPCardBrand) -> String

    Parameters

    brand

    the brand you want to convert to a string

    Return Value

    A string representing the brand, suitable for displaying to a user.