STPSetupIntentConfirmParams
Objective-C
@interface STPSetupIntentConfirmParams : NSObject <NSCopying, STPFormEncodable>
Swift
class 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 (nonatomic, copy) 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 (nonatomic, strong, 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 (nonatomic, copy, 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 (nonatomic, copy, 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 (nonatomic, nullable) NSNumber *useStripeSDK;
Swift
var useStripeSDK: NSNumber? { get set }
-
Details about the Mandate to create.
Note
If this value is null and the(self.paymentMethod.type == STPPaymentMethodTypeSEPADebit | | self.paymentMethodParams.type == STPPaymentMethodTypeAUBECSDebit || self.paymentMethodParams.type == STPPaymentMethodTypeBacsDebit) && self.mandate == nil
, the SDK will set this to an internal value indicating that the mandate data should be inferred from the current context.Declaration
Objective-C
@property (nonatomic, nullable) STPMandateDataParams *mandateData;
Swift
var mandateData: STPMandateDataParams? { get set }
-
The ID of the Mandate to be used for this payment.
Declaration
Objective-C
@property (nonatomic, nullable) NSString *mandate;
Swift
var mandate: String? { get set }
-
Verifies whether the provided client secret matches the expected format. Does NOT validate that the client secret represents an actual object in an account.
Declaration
Objective-C
+ (BOOL)isClientSecretValid:(nonnull NSString *)clientSecret;
Swift
class func isClientSecretValid(_ clientSecret: String) -> Bool