STPSetupIntentConfirmParams
@interface STPSetupIntentConfirmParams : NSObject <NSCopying, STPFormEncodable>
An object representing parameters to confirm a SetupIntent object.
For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management view in your app.
If the selected payment method does not require any additional steps from the customer, the SetupIntent’s status will transition to STPSetupIntentStatusSucceeded
. Otherwise, it will transition to STPSetupIntentStatusRequiresAction
, and suggest additional actions via nextAction
.
Instead of passing this to [STPAPIClient confirmSetupIntent...]
directly, we recommend using STPPaymentHandler
to handle any additional steps for you.
-
Initialize this
STPSetupIntentConfirmParams
with aclientSecret
.Declaration
Objective-C
- (nonnull instancetype)initWithClientSecret:(nonnull NSString *)clientSecret;
Swift
init(clientSecret: String)
Parameters
clientSecret
the client secret for this SetupIntent
-
The client secret of the SetupIntent. 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 topaymentMethodId
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 SetupIntent.
Note
alternative topaymentMethodParams
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *paymentMethodID;
Swift
var paymentMethodID: String? { 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 }
-
A boolean number to indicate whether you intend to use the Stripe SDK’s functionality to handle any SetupIntent next actions. If set to false, STPSetupIntent.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 }