STPPaymentOption

@protocol STPPaymentOption <NSObject>

This protocol represents a payment method that a user can select and use to pay. Currently the only classes that conform to it are STPCard, which represents that the user wants to pay with a specific card, STPApplePay, which represents that the user wants to pay with Apple Pay, and STPSource. Only STPSource.type == STPSourceTypeCard payment methods are supported by STPPaymentContext and STPPaymentOptionsViewController, but the other types do have basic support for 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 }