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.

https://stripe.com/docs/api/payment_intents

  • The unique identifier for the intent.

    When an intent is created offline, the stripeId will be nil. To keep track of offline payments, we recommend using the metadata with your own identifiers.

    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 }
  • Charges that were created by this PaymentIntent, if any.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<SCPCharge *> *_Nonnull charges;

    Swift

    var charges: [SCPCharge] { get }
  • The payment method to be used in this PaymentIntent. Only valid in the intent returned during collectPaymentMethod when using the updatePaymentIntent option in the SCPCollectConfiguration.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) SCPPaymentMethod *paymentMethod;

    Swift

    var paymentMethod: SCPPaymentMethod? { get }
  • ID of the payment method used in this PaymentIntent.

    Declaration

    Objective-C

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

    Swift

    var paymentMethodId: String? { 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 using updatePaymentIntent set to true in the CollectConfiguration.

    After confirmPaymentIntent the amount will have this tip amount added to it and the amountDetails 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 }
  • The offline details for this intent, if created or processed while offline.

    When an intent is created offline, the intent.stripeId will be nil. To keep track of offline payments, we recommend using the intent.metadata with your own identifiers.

    The OfflineDetails requiresUpload can be used to identify that the intent was processed offline and requires the device to be brought back online so the intent can be forwarded.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) SCPOfflineDetails *offlineDetails;

    Swift

    var offlineDetails: SCPOfflineDetails? { get }
  • Payment-method-specific configuration for this PaymentIntent.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) SCPPaymentMethodOptionsParameters *paymentMethodOptions;

    Swift

    var paymentMethodOptions: PaymentMethodOptionsParameters? { get }
  • Indicates that you intend to make future payments with this PaymentIntent’s payment method.

    Providing this parameter will attach the payment method to the PaymentIntent’s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.

    When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *setupFutureUsage;

    Swift

    var setupFutureUsage: 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;