SCPPaymentIntent
Objective-C
@interface SCPPaymentIntent : NSObject <SCPJSONDecodable, NSCopying>
Swift
class PaymentIntent : NSObject, JSONDecodable, NSCopying
A PaymentIntent tracks the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.
A PaymentIntent transitions through multiple statuses throughout its lifetime and ultimately creates at most one successful charge.
-
The unique identifier for the intent.
If the intent was created offline the stripeId will be nil. See
offlineDetails.stripeId
for a unique ID to use while offline.After the payment has been forwarded the intent’s stripeId will be filled in.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *stripeId;
Swift
var stripeId: String? { get }
-
When the intent was created.
Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull created;
Swift
var created: Date { get }
-
The status of the PaymentIntent.
Declaration
Objective-C
@property (nonatomic, readonly) SCPPaymentIntentStatus status;
Swift
var status: PaymentIntentStatus { get }
-
The amount to be collected by this PaymentIntent, provided in the currency’s smallest unit.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger amount;
Swift
var amount: UInt { get }
-
Controls when the funds will be captured from the customer’s account.
Declaration
Objective-C
@property (nonatomic, readonly) SCPCaptureMethod captureMethod;
Swift
var captureMethod: CaptureMethod { get }
-
The currency of the payment.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull currency;
Swift
var currency: String { get }
-
Set of key-value pairs attached to the object.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, NSString *> *metadata;
Swift
var metadata: [String : String]? { get }
-
The payment method to be used in this PaymentIntent. Only valid in the intent returned during
collectPaymentMethod
when using theupdatePaymentIntent
option in theSCPCollectConfiguration
.Declaration
Objective-C
@property (nonatomic, readonly, nullable) SCPPaymentMethod *paymentMethod;
Swift
var paymentMethod: SCPPaymentMethod? { get }
-
Details about items included in the amount after confirmation.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) SCPAmountDetails *amountDetails;
Swift
var amountDetails: SCPAmountDetails? { get }
-
Indicates how much the user intends to tip in addition to the amount by at confirmation time. This is only non-null in the
PaymentIntent
instance returned during collect when usingupdatePaymentIntent
set to true in theCollectConfiguration
.After
confirmPaymentIntent
theamount
will have this tip amount added to it and theamountDetails
will contain the breakdown of how much of the amount was a tip.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *amountTip;
Swift
var amountTip: NSNumber? { get }
-
Extra information about a PaymentIntent. This will appear on your customer’s statement when this PaymentIntent succeeds in creating a charge.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *statementDescriptor;
Swift
var statementDescriptor: String? { get }
-
Extra dynamic information about a PaymentIntent. This will appear concatenated with the statementDescriptor on your customer’s statement when this PaymentIntent succeeds in creating a charge.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *statementDescriptorSuffix;
Swift
var statementDescriptorSuffix: String? { get }
-
Unavailable
You cannot directly instantiate
SCPPaymentIntent
. You should only use one that has been returned by our SDK.See
SCPTerminal.shared.createPaymentIntent()Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
You cannot directly instantiate
SCPPaymentIntent
. You should only use one that has been returned by our SDK.See
SCPTerminal.shared.createPaymentIntent()Declaration
Objective-C
+ (nonnull instancetype)new;