STPPaymentMethod
@interface 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
Objective-C
@property (readonly, nonatomic) NSString *_Nonnull stripeId;
Swift
var stripeId: String { get }
-
Time at which the object was created. Measured in seconds since the Unix epoch.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSDate *created;
Swift
var created: Date? { get }
-
YES
if the object exists in live mode or the valueNO
if the object exists in test mode.Declaration
Objective-C
@property (readonly, nonatomic) BOOL liveMode;
Swift
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
, thecard
property is also populated.Declaration
Objective-C
@property (readonly, nonatomic) STPPaymentMethodType type;
Swift
var type: STPPaymentMethodType { get }
-
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) STPPaymentMethodBillingDetails *billingDetails;
Swift
var billingDetails: STPPaymentMethodBillingDetails? { get }
-
If this is a card PaymentMethod (ie
self.type == STPPaymentMethodTypeCard
), this contains additional details.Declaration
Objective-C
@property (readonly, nonatomic, nullable) STPPaymentMethodCard *card;
Swift
var card: STPPaymentMethodCard? { get }
-
If this is a iDEAL PaymentMethod (ie
self.type == STPPaymentMethodTypeiDEAL
), this contains additional details.Declaration
Objective-C
@property (readonly, nonatomic, nullable) STPPaymentMethodiDEAL *iDEAL;
Swift
var iDEAL: STPPaymentMethodiDEAL? { get }
-
If this is an FPX PaymentMethod (ie
self.type == STPPaymentMethodTypeFPX
), this contains additional details.Declaration
Objective-C
@property (readonly, nonatomic, nullable) STPPaymentMethodFPX *fpx;
Swift
var fpx: STPPaymentMethodFPX? { get }
-
If this is a card present PaymentMethod (ie
self.type == STPPaymentMethodTypeCardPresent
), this contains additional details.Declaration
Objective-C
@property (readonly, nonatomic, nullable) STPPaymentMethodCardPresent *cardPresent;
Swift
var cardPresent: STPPaymentMethodCardPresent? { get }
-
The ID of the Customer to which this PaymentMethod is saved. Nil when the PaymentMethod has not been saved to a Customer.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *customerId;
Swift
var customerId: String? { get }
-
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.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSDictionary<NSString *, NSString *> *metadata;
Swift
var metadata: [String : String]? { get }