STPPaymentMethodCard

public class STPPaymentMethodCard : NSObject, STPAPIResponseDecodable

Contains details about a user’s credit card.

  • The issuer of the card.

    Declaration

    Swift

    @objc
    public private(set) var brand: STPCardBrand { get }
  • Checks on Card address and CVC if provided.

    Declaration

    Swift

    @objc
    public private(set) var checks: STPPaymentMethodCardChecks? { get }
  • Two-letter ISO code representing the country of the card.

    Declaration

    Swift

    @objc
    public private(set) var country: String? { get }
  • Two-digit number representing the card’s expiration month.

    Declaration

    Swift

    @objc
    public private(set) var expMonth: Int { get }
  • Four-digit number representing the card’s expiration year.

    Declaration

    Swift

    @objc
    public private(set) var expYear: Int { get }
  • Card funding type. Can be credit, debit, prepaid, or unknown.

    Declaration

    Swift

    @objc
    public private(set) var funding: String? { get }
  • The last four digits of the card.

    Declaration

    Swift

    @objc
    public private(set) 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

    Swift

    @objc
    public private(set) var fingerprint: String? { get }
  • Contains information about card networks that can be used to process the payment.

    Declaration

    Swift

    @objc
    public private(set) var networks: STPPaymentMethodCardNetworks? { get }
  • Contains details on how this Card maybe be used for 3D Secure authentication.

    Declaration

    Swift

    @objc
    public private(set) var threeDSecureUsage: STPPaymentMethodThreeDSecureUsage? { get }
  • If this Card is part of a Card Wallet, this contains the details of the Card Wallet.

    Declaration

    Swift

    @objc
    public private(set) var wallet: STPPaymentMethodCardWallet? { get }
  • Returns a string representation for the provided card brand; i.e. STPPaymentMethodCard.string(from brand:.visa) == "Visa".

    Declaration

    Swift

    @objc(stringFromBrand:)
    public 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.

  • Declaration

    Swift

    public private(set) var allResponseFields: [AnyHashable : Any] { get }

STPAPIResponseDecodable