STPPaymentIntentParams
@interface STPPaymentIntentParams : NSObject <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
orSTPSourceParams
object in thepaymentMethodParams
orsourceParams
field - a pre-existing PaymentMethod or Source can be associated by passing its id in the
paymentMethodId
orsourceId
field or already set via your backend, either when creating or updating the PaymentIntent
-
Initialize this
STPPaymentIntentParams
with aclientSecret
, 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 (nonatomic, copy, readonly, nullable) NSString *stripeId;
Swift
var stripeId: String? { get }
-
The client secret of the PaymentIntent. Required
Declaration
Objective-C
@property (nonatomic, copy, readwrite) 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, readwrite, 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 topaymentMethodParams
Declaration
Objective-C
@property (nonatomic, copy, readwrite, 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 tosourceId
Declaration
Objective-C
@property (nonatomic, strong, readwrite, 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 tosourceParams
Declaration
Objective-C
@property (nonatomic, copy, readwrite, 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 (nonatomic, copy, readwrite, 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 (nonatomic, strong, readwrite, 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 (nonatomic, copy, readwrite, nullable) NSString *returnURL;
Swift
var returnURL: String? { 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 (nonatomic, copy, readwrite, 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 (nonatomic, strong, readwrite, nullable) NSNumber *saveSourceToCustomer;
Swift
var saveSourceToCustomer: NSNumber? { get set }