STPPaymentMethod

public class STPPaymentMethod : NSObject, STPAPIResponseDecodable, STPPaymentOption

PaymentMethod objects represent your customer’s payment instruments. They can be used with PaymentIntents to collect payments.

  • Unique identifier for the object.

    Declaration

    Swift

    @objc
    private(set) public var stripeId: String { get }
  • Time at which the object was created. Measured in seconds since the Unix epoch.

    Declaration

    Swift

    @objc
    private(set) public var created: Date? { get }
  • YES if the object exists in live mode or the value NO if the object exists in test mode.

    Declaration

    Swift

    @objc
    private(set) public var liveMode: Bool { get }
  • The type of the PaymentMethod. The corresponding, similarly named property contains additional information specific to the PaymentMethod type. e.g. if the type is STPPaymentMethodTypeCard, the card property is also populated.

    Declaration

    Swift

    @objc
    private(set) public var type: STPPaymentMethodType { get }
  • Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

    Declaration

    Swift

    @objc
    private(set) public var billingDetails: STPPaymentMethodBillingDetails? { get }
  • If this is an Alipay PaymentMethod (ie self.type == STPPaymentMethodTypeAlipay), this contains additional detailsl

    Declaration

    Swift

    @objc
    private(set) public var alipay: STPPaymentMethodAlipay? { get }
  • If this is a GrabPay PaymentMethod (ie self.type == STPPaymentMethodTypeGrabPay), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var grabPay: STPPaymentMethodGrabPay? { get }
  • If this is a card PaymentMethod (ie self.type == STPPaymentMethodTypeCard), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var card: STPPaymentMethodCard? { get }
  • If this is a iDEAL PaymentMethod (ie self.type == STPPaymentMethodTypeiDEAL), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var iDEAL: STPPaymentMethodiDEAL? { get }
  • fpx

    If this is an FPX PaymentMethod (ie self.type == STPPaymentMethodTypeFPX), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var fpx: STPPaymentMethodFPX? { get }
  • If this is a card present PaymentMethod (ie self.type == STPPaymentMethodTypeCardPresent), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var cardPresent: STPPaymentMethodCardPresent? { get }
  • If this is a SEPA Debit PaymentMethod (ie self.type == STPPaymentMethodTypeSEPADebit), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var sepaDebit: STPPaymentMethodSEPADebit? { get }
  • If this is a Bacs Debit PaymentMethod (ie self.type == STPPaymentMethodTypeBacsDebit), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var bacsDebit: STPPaymentMethodBacsDebit? { get }
  • If this is an AU BECS Debit PaymentMethod (i.e. self.type == STPPaymentMethodTypeAUBECSDebit), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var auBECSDebit: STPPaymentMethodAUBECSDebit? { get }
  • If this is a giropay PaymentMethod (i.e. self.type == STPPaymentMethodTypeGiropay), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var giropay: STPPaymentMethodGiropay? { get }
  • eps

    If this is an EPS PaymentMethod (i.e. self.type == STPPaymentMethodTypeEPS), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var eps: STPPaymentMethodEPS? { get }
  • If this is a Przelewy24 PaymentMethod (i.e. self.type == STPPaymentMethodTypePrzelewy24), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var przelewy24: STPPaymentMethodPrzelewy24? { get }
  • If this is a Bancontact PaymentMethod (i.e. self.type == STPPaymentMethodTypeBancontact), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var bancontact: STPPaymentMethodBancontact? { get }
  • If this is an OXXO PaymentMethod (i.e. self.type == STPPaymentMethodTypeOXXO), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var oxxo: STPPaymentMethodOXXO? { get }
  • If this is a Sofort PaymentMethod (i.e. self.type == STPPaymentMethodTypeSofort), this contains additional details.

    Declaration

    Swift

    @objc
    private(set) public var sofort: STPPaymentMethodSofort? { get }
  • The ID of the Customer to which this PaymentMethod is saved. Nil when the PaymentMethod has not been saved to a Customer.

    Declaration

    Swift

    @objc
    private(set) public var customerId: String? { get }

Deprecated

  • Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @deprecated Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.

    Declaration

    Swift

    @available(*, deprecated, message: "Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using your secret key instead.")
    private(set) public var metadata: [String : String]? { get }

STPAPIResponseDecodable

STPPaymentOption