PaymentMethod
public struct PaymentMethod : StripeDecodable
PaymentMethod objects represent your customer’s payment instruments. They can be used with PaymentIntents to collect payments.
-
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 valueNO
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
, thecard
property is also populated.Declaration
Swift
public var type: PaymentMethodType?
-
The type of the PaymentMethod.
See moreDeclaration
Swift
@frozen public enum PaymentMethodType : String, StripeEnumCodable
-
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
Declaration
Swift
@IncludeUnknownFields public var billingDetails: BillingDetails? { get set }
-
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
@IncludeUnknownFields public var card: Card? { get set }
-
Declaration
Swift
public var _allResponseFieldsStorage: NonEncodableParameters?