STPPaymentMethod
Objective-C
@interface STPPaymentMethod
: NSObject <STPAPIResponseDecodable, STPPaymentOption>
Swift
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
Objective-C
@property (nonatomic, readonly) 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 (nonatomic, readonly, 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 (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, readonly, nullable) STPPaymentMethodBillingDetails *billingDetails;
Swift
var billingDetails: STPPaymentMethodBillingDetails? { get }
-
If this is an Alipay PaymentMethod (ie
self.type == STPPaymentMethodTypeAlipay
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodAlipay *alipay;
Swift
var alipay: STPPaymentMethodAlipay? { get }
-
If this is a card PaymentMethod (ie
self.type == STPPaymentMethodTypeCard
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, 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 (nonatomic, readonly, 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 (nonatomic, readonly, 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 (nonatomic, readonly, nullable) STPPaymentMethodCardPresent *cardPresent;
Swift
var cardPresent: STPPaymentMethodCardPresent? { get }
-
If this is a SEPA Debit PaymentMethod (ie
self.type == STPPaymentMethodTypeSEPADebit
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodSEPADebit *sepaDebit;
Swift
var sepaDebit: STPPaymentMethodSEPADebit? { get }
-
If this is a Bacs Debit PaymentMethod (ie
self.type == STPPaymentMethodTypeBacsDebit
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodBacsDebit *bacsDebit;
Swift
var bacsDebit: STPPaymentMethodBacsDebit? { get }
-
If this is an AU BECS Debit PaymentMethod (i.e.
self.type == STPPaymentMethodTypeAUBECSDebit
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodAUBECSDebit *auBECSDebit;
Swift
var auBECSDebit: STPPaymentMethodAUBECSDebit? { get }
-
If this is a giropay PaymentMethod (i.e.
self.type == STPPaymentMethodTypeGiropay
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodGiropay *giropay;
Swift
var giropay: STPPaymentMethodGiropay? { get }
-
If this is an EPS PaymentMethod (i.e.
self.type == STPPaymentMethodTypeEPS
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodEPS *eps;
Swift
var eps: STPPaymentMethodEPS? { get }
-
If this is a Przelewy24 PaymentMethod (i.e.
self.type == STPPaymentMethodTypePrzelewy24
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodPrzelewy24 *przelewy24;
Swift
var przelewy24: STPPaymentMethodPrzelewy24? { get }
-
If this is a Bancontact PaymentMethod (i.e.
self.type == STPPaymentMethodTypeBancontact
), this contains additional details.Declaration
Objective-C
@property (nonatomic, readonly, nullable) STPPaymentMethodBancontact *bancontact;
Swift
var bancontact: STPPaymentMethodBancontact? { 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 (nonatomic, readonly, nullable) NSString *customerId;
Swift
var customerId: String? { get }
-
Deprecated
Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.
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
Objective-C
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *metadata;
Swift
var metadata: [String : String]? { get }