STPSource

@interface STPSource
    : NSObject <STPAPIResponseDecodable, STPSourceProtocol, STPPaymentOption>

Representation of a customer’s payment instrument created with the Stripe API. - see: https://stripe.com/docs/api#sources

  • Unavailable

    You cannot directly instantiate an STPSource. You should only use one that has been returned from an STPAPIClient callback.

    You cannot directly instantiate an STPSource. You should only use one that has been returned from an STPAPIClient callback.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • The amount associated with the source.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSNumber *amount;

    Swift

    var amount: NSNumber? { get }
  • The client secret of the source. Used for client-side fetching of a source using a publishable key.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *clientSecret;

    Swift

    var clientSecret: String? { get }
  • When the source was created.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDate *created;

    Swift

    var created: Date? { get }
  • The currency associated with the source.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *currency;

    Swift

    var currency: String? { get }
  • The authentication flow of the source.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPSourceFlow flow;

    Swift

    var flow: STPSourceFlow { get }
  • Whether or not this source was created in livemode.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL livemode;

    Swift

    var livemode: Bool { get }
  • A set of key/value pairs associated with the source object.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable)
        NSDictionary<NSString *, NSString *> *metadata;

    Swift

    var metadata: [String : String]? { get }
  • Information about the owner of the payment instrument.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPSourceOwner *owner;

    Swift

    var owner: STPSourceOwner? { get }
  • Information related to the receiver flow. Present if the source’s flow is receiver.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPSourceReceiver *receiver;

    Swift

    var receiver: STPSourceReceiver? { get }
  • Information related to the redirect flow. Present if the source’s flow is redirect.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPSourceRedirect *redirect;

    Swift

    var redirect: STPSourceRedirect? { get }
  • The status of the source.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPSourceStatus status;

    Swift

    var status: STPSourceStatus { get }
  • The type of the source.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPSourceType type;

    Swift

    var type: STPSourceType { get }
  • Whether this source should be reusable or not.

    Declaration

    Objective-C

    @property (readonly, nonatomic) STPSourceUsage usage;

    Swift

    var usage: STPSourceUsage { get }
  • Information related to the verification flow. Present if the source’s flow is verification.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPSourceVerification *verification;

    Swift

    var verification: STPSourceVerification? { get }
  • Information about the source specific to its type

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDictionary *details;

    Swift

    var details: [AnyHashable : Any]? { get }
  • If this is a card source, this property provides typed access to the contents of the details dictionary.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) STPSourceCardDetails *cardDetails;

    Swift

    var cardDetails: STPSourceCardDetails? { get }
  • If this is a SEPA Debit source, this property provides typed access to the contents of the details dictionary.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        STPSourceSEPADebitDetails *sepaDebitDetails;

    Swift

    var sepaDebitDetails: STPSourceSEPADebitDetails? { get }
  • If this is a WeChat Pay source, this property provides typed access to the contents of the details dictionary.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        STPSourceWeChatPayDetails *weChatPayDetails;

    Swift

    var weChatPayDetails: STPSourceWeChatPayDetails? { get }