STPPaymentOption
Objective-C
@protocol STPPaymentOption <NSObject>
Swift
protocol STPPaymentOption : NSObjectProtocol
This protocol represents a payment method that a user can select and use to pay.
The classes that conform to it and are supported by the UI:
STPApplePay
, which represents that the user wants to pay with Apple PaySTPPaymentMethod
. OnlySTPPaymentMethod.type == STPPaymentMethodTypeCard
andSTPPaymentMethod.type == STPPaymentMethodTypeFPX
are supported bySTPPaymentContext
andSTPPaymentOptionsViewController
STPPaymentMethodParams
. This should be used with non-reusable payment method, such as FPX and iDEAL. Instead of reaching out to Stripe to create a PaymentMethod, you can pass an STPPaymentMethodParams directly to Stripe when confirming a PaymentIntent.
Note
card-based Sources, Cards, and FPX support this protocol for use in a custom integration.
-
A small (32 x 20 points) logo image representing the payment method. For example, the Visa logo for a Visa card, or the Apple Pay logo.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIImage *_Nonnull image;
Swift
var image: UIImage { get }
-
A small (32 x 20 points) logo image representing the payment method that can be used as template for tinted icons.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIImage *_Nonnull templateImage;
Swift
var templateImage: UIImage { get }
-
A string describing the payment method, such as “Apple Pay” or “Visa 4242”.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSString *_Nonnull label;
Swift
var label: String { get }
-
Describes whether this payment option may be used multiple times. If it is not reusable, the payment method must be discarded after use.
Declaration
Objective-C
@property (nonatomic, readonly, getter=isReusable) BOOL reusable;
Swift
var isReusable: Bool { get }