STPPaymentOption

@protocol STPPaymentOption <NSObject>

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 Pay
  • STPPaymentMethod. Only STPPaymentMethod.type == STPPaymentMethodTypeCard and STPPaymentMethod.type == STPPaymentMethodTypeFPX are supported by STPPaymentContext and STPPaymentOptionsViewController
  • 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 (readonly, strong, nonatomic) 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 (readonly, strong, nonatomic) 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 (readonly, strong, nonatomic) 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 (readonly, getter=isReusable, nonatomic) BOOL reusable;

      Swift

      var isReusable: Bool { get }