PaymentMethod

public struct PaymentMethod : UnknownFieldsDecodable

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

  • id

    The Stripe ID of the PaymentMethod.

    Declaration

    Swift

    public let id: String
  • Time at which the object was created. Measured in seconds since the Unix epoch.

    Declaration

    Swift

    public var created: Date?
  • YES if the object exists in live mode or the value NO if the object exists in test mode.

    Declaration

    Swift

    public var livemode: Bool
  • The type of the PaymentMethod. The corresponding, similarly named property contains additional information specific to the PaymentMethod type. e.g. if the type is Card, the card property is also populated.

    Declaration

    Swift

    public var type: PaymentMethodType?
  • The type of the PaymentMethod.

    See more

    Declaration

    Swift

    @frozen
    public enum PaymentMethodType : String, SafeEnumCodable
  • Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

    Declaration

    Swift

    public var billingDetails: BillingDetails?
  • The ID of the Customer to which this PaymentMethod is saved. Nil when the PaymentMethod has not been saved to a Customer.

    Declaration

    Swift

    public var customerId: String?
  • If this is a card PaymentMethod (ie self.type == .card), this contains additional details.

    Declaration

    Swift

    public var card: Card?
  • Declaration

    Swift

    public var _allResponseFieldsStorage: NonEncodableParameters?