STPPaymentIntentParams

@interface STPPaymentIntentParams : NSObject <NSCopying, STPFormEncodable>

An object representing parameters used to confirm a PaymentIntent object.

A PaymentIntent must have a PaymentMethod or Source associated in order to successfully confirm it.

That PaymentMethod or Source can either be:

  • created during confirmation, by passing in a STPPaymentMethodParams or STPSourceParams object in the paymentMethodParams or sourceParams field
  • a pre-existing PaymentMethod or Source can be associated by passing its id in the paymentMethodId or sourceId field
  • or already set via your backend, either when creating or updating the PaymentIntent

  • Initialize this STPPaymentIntentParams with a clientSecret, which is the only required field.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClientSecret:(nonnull NSString *)clientSecret;

    Swift

    init(clientSecret: String)

    Parameters

    clientSecret

    the client secret for this PaymentIntent

  • The Stripe id of the PaymentIntent, extracted from the clientSecret.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *stripeId;

    Swift

    var stripeId: String? { get }
  • The client secret of the PaymentIntent. Required

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull clientSecret;

    Swift

    var clientSecret: String { get set }
  • Provide a supported STPPaymentMethodParams object, and Stripe will create a PaymentMethod during PaymentIntent confirmation.

    Note

    alternative to paymentMethodId

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        STPPaymentMethodParams *paymentMethodParams;

    Swift

    var paymentMethodParams: STPPaymentMethodParams? { get set }
  • Provide an already created PaymentMethod’s id, and it will be used to confirm the PaymentIntent.

    Note

    alternative to paymentMethodParams

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *paymentMethodId;

    Swift

    var paymentMethodId: String? { get set }
  • Provide a supported STPSourceParams object into here, and Stripe will create a Source during PaymentIntent confirmation.

    Note

    alternative to sourceId

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) STPSourceParams *sourceParams;

    Swift

    var sourceParams: STPSourceParams? { get set }
  • Provide an already created Source’s id, and it will be used to confirm the PaymentIntent.

    Note

    alternative to sourceParams

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *sourceId;

    Swift

    var sourceId: String? { get set }
  • Email address that the receipt for the resulting payment will be sent to.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *receiptEmail;

    Swift

    var receiptEmail: String? { get set }
  • @YES to save this PaymentIntent’s PaymentMethod or Source to the associated Customer, if the PaymentMethod/Source is not already attached.

    This should be a boolean NSNumber, so that it can be nil

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *savePaymentMethod;

    Swift

    var savePaymentMethod: NSNumber? { get set }
  • The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. This should probably be a URL that opens your iOS app.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *returnURL;

    Swift

    var returnURL: String? { get set }
  • When provided, this property indicates how you intend to use the payment method that your customer provides after the current payment completes.

    If applicable, additional authentication may be performed to comply with regional legislation or network rules required to enable the usage of the same payment method for additional payments.

    See

    STPPaymentIntentSetupFutureUsage for more details on what values you can provide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) NSNumber *setupFutureUsage;

    Swift

    var setupFutureUsage: NSNumber? { get set }
  • A boolean number to indicate whether you intend to use the Stripe SDK’s functionality to handle any PaymentIntent next actions. If set to false, STPPaymentIntent.nextAction will only ever contain a redirect url that can be opened in a webview or mobile browser. When set to true, the nextAction may contain information that the Stripe SDK can use to perform native authentication within your app.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) NSNumber *useStripeSDK;

    Swift

    var useStripeSDK: NSNumber? { get set }
  • Deprecated

    returnUrl has been renamed to returnURL

    The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site.

    This property has been renamed to returnURL and deprecated.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *returnUrl;

    Swift

    var returnUrl: String? { get set }
  • Deprecated

    saveSourceToCustomer has been renamed to savePaymentMethod

    @YES to save this PaymentIntent’s Source to the associated Customer, if the Source is not already attached.

    This should be a boolean NSNumber, so that it can be nil

    This property has been renamed to savePaymentMethod and deprecated.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        NSNumber *saveSourceToCustomer;

    Swift

    var saveSourceToCustomer: NSNumber? { get set }