### processSetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPTerminal.html Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. ```APIDOC ## processSetupIntent ### Description Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. This method combines the functionality of `collectSetupIntentPaymentMethod` and `confirmSetupIntent` into a single call. ### Method Signature Objective-C: ```objc - (nullable SCPCancelable *)processSetupIntent:(nonnull SCPSetupIntent *)setupIntent allowRedisplay:(SCPAllowRedisplay)allowRedisplay collectConfig:(nullable SCPCollectSetupIntentConfiguration *)collectConfig completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` Swift: ```swift func processSetupIntent(_ setupIntent: SCPSetupIntent, allowRedisplay: AllowRedisplay, collectConfig: CollectSetupIntentConfiguration?, completion: @escaping SetupIntentCompletionBlock) -> SCPCancelable? ``` ### Parameters - `setupIntent` (SCPSetupIntent) - The SetupIntent to process. - `allowRedisplay` (SCPAllowRedisplay) - Controls how this SetupIntent may be shown to the customer in the Stripe Dashboard. - `collectConfig` (SCPCollectSetupIntentConfiguration) - The configuration for collecting the setup intent payment method. - `completion` (SCPSetupIntentCompletionBlock) - The completion block called when the setup intent completes. ### Return Value A cancelable that can be used to cancel the setup intent process. ``` -------------------------------- ### reader:didFinishInstallingUpdate:error: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPMobileReaderDelegate.html The reader is reporting that an installation has finished. If the install was successful, error will be nil. ```APIDOC ## Objective-C ```objc - (void)reader:(nonnull SCPReader *)reader didFinishInstallingUpdate:(nonnull SCPReaderSoftwareUpdate *)update error:(nullable NSError *)error; ``` ### Parameters * `_reader_` (SCPReader *) - The originating reader. * `_update_` (SCPReaderSoftwareUpdate *) - The update that was installed. * `_error_` (NSError *) - An error object if the installation failed, otherwise nil. ``` ```APIDOC ## Swift ```swift func reader(_ reader: SCPReader, didFinishInstallingUpdate update: SCPReaderSoftwareUpdate, error: Error?) ``` ### Parameters * `reader` (SCPReader) - The originating reader. * `update` (SCPReaderSoftwareUpdate) - The update that was installed. * `error` (Error?) - An error object if the installation failed, otherwise nil. ``` -------------------------------- ### Install Available Reader Update Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPTerminal.html Call this method to start the installation of an available reader software update. You should display the progress to the user and prevent the device from locking during the update. This method is not available for Verifone P400 or WisePOS E readers. ```Objective-C - (void)installAvailableUpdate; ``` ```Swift func installAvailableUpdate() ``` -------------------------------- ### Swift Setup Intent Completion Block Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Blocks.html Swift type alias for handling setup intent operations. It is called with the SCPSetupIntent or an error. ```swift typealias SetupIntentCompletionBlock = (SCPSetupIntent?, (any Error)?) -> Void ``` -------------------------------- ### Process SetupIntent - Swift Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. This method combines the functionality of collectSetupIntentPaymentMethod and confirmSetupIntent. ```Swift func processSetupIntent(_ setupIntent: SCPSetupIntent, allowRedisplay: AllowRedisplay, collectConfig: CollectSetupIntentConfiguration?, completion: @escaping SetupIntentCompletionBlock) -> SCPCancelable? ``` -------------------------------- ### Process Setup Intent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. This method combines the functionality of `collectSetupIntentPaymentMethod` and `confirmSetupIntent`. ```APIDOC ## processSetupIntent ### Description Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. This method combines the functionality of `collectSetupIntentPaymentMethod` and `confirmSetupIntent`. ### Method Signature Objective-C ```objc - (nullable SCPCancelable *)processSetupIntent:(nonnull SCPSetupIntent *)setupIntent allowRedisplay:(SCPAllowRedisplay)allowRedisplay collectConfig:(nullable SCPCollectSetupIntentConfiguration *)collectConfig completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` Swift ```swift func processSetupIntent(_ setupIntent: SCPSetupIntent, allowRedisplay: AllowRedisplay, collectConfig: CollectSetupIntentConfiguration?, completion: @escaping SetupIntentCompletionBlock) -> SCPCancelable? ``` ### Parameters - `setupIntent` (SCPSetupIntent) - The SetupIntent to process. - `allowRedisplay` (SCPAllowRedisplay) - Controls how this SetupIntent may be shown to the customer in the Stripe Dashboard. - `collectConfig` (SCPCollectSetupIntentConfiguration) - The configuration for collecting the setup intent payment method. - `completion` (SCPSetupIntentCompletionBlock) - The completion block called when the setup intent completes. ### Return Value A cancelable that can be used to cancel the setup intent process. ``` -------------------------------- ### readerDidBeginSetup: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPReaderDelegate.html Called when the reader begins the setup process. This method is invoked when the reader is preparing for a new configuration or connection. ```APIDOC ## readerDidBeginSetup: ### Description Called when the reader begins the setup process. ### Method - `readerDidBeginSetup:` ### Parameters #### Setup - **reader** (SCPReader) - The SCPReader instance initiating setup. ``` -------------------------------- ### Process SetupIntent - Objective-C Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Processes a setup intent by collecting a payment method and confirming the setup intent in a single operation. This method combines the functionality of collectSetupIntentPaymentMethod and confirmSetupIntent. ```Objective-C - (nullable SCPCancelable *) processSetupIntent:(nonnull SCPSetupIntent *)setupIntent allowRedisplay:(SCPAllowRedisplay)allowRedisplay collectConfig: (nullable SCPCollectSetupIntentConfiguration *)collectConfig completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` -------------------------------- ### Confirm Setup Intent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Confirms a SetupIntent, which can be used to save payment details for later use. ```APIDOC ## confirmSetupIntent ### Description Confirms a SetupIntent, which can be used to save payment details for later use. ### Method Signature Objective-C ```objc - (nullable SCPCancelable *)confirmSetupIntent:(nonnull SCPSetupIntent *)setupIntent completion:(nonnull SCPConfirmSetupIntentCompletionBlock)completion; ``` Swift ```swift func confirmSetupIntent(_ setupIntent: SCPSetupIntent, completion: @escaping ConfirmSetupIntentCompletionBlock) -> SCPCancelable? ``` ### Parameters - `setupIntent` (SCPSetupIntent) - The SetupIntent to confirm. - `completion` (SCPConfirmSetupIntentCompletionBlock) - The completion block called when the confirmation completes. ``` -------------------------------- ### Install Available Update Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPTerminal.html Installs the available update for the currently connected reader. ```Objective-C - (void)installAvailableUpdate; ``` -------------------------------- ### SCPSetupAttempt Properties Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupAttempt.html This snippet details the properties available on the SCPSetupAttempt object, providing information about the setup attempt. ```APIDOC ## SCPSetupAttempt Properties ### Description Provides details about a single attempt to set up a payment method for future use. ### Properties - **application** (NSString?): The ID of the Connect application that created the SetupIntent. - **created** (NSDate): Time at which the object was created. - **customer** (NSString?): ID of the Customer this SetupIntent belongs to, if one exists. - **onBehalfOf** (NSString?): (Connect) The account (if any) for which the setup is intended. - **paymentMethod** (NSString?): ID of the payment method used with this SetupAttempt. - **paymentMethodDetails** (SCPSetupAttemptPaymentMethodDetails?): Details about the payment method at the time of SetupIntent confirmation. - **setupIntent** (NSString): ID of the SetupIntent that this attempt belongs to. - **status** (NSString): The status of this SetupAttempt. One of: `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. - **stripeId** (NSString): The unique identifier for the SetupAttempt. - **livemode** (BOOL): Whether this SetupAttempt was created in live mode or test mode. - **usage** (SCPSetupIntentUsage): The value of usage on the SetupIntent at the time of this confirmation. - **setupError** (SCPApiError?): The error encountered during this attempt to confirm the SetupIntent, if any. ``` -------------------------------- ### SCPSetupIntent Properties Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupIntent.html This section details the properties of the SCPSetupIntent class, which provide information about the setup intent. ```APIDOC ## SCPSetupIntent Properties ### application * **Description**: Represents the application associated with the setup intent. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) NSString *application;` * Swift: `var application: String? { get }` ### onBehalfOf * **Description**: The account (if any) for which the setup is intended. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) NSString *onBehalfOf;` * Swift: `var onBehalfOf: String? { get }` ### paymentMethodOptions * **Description**: Payment-method-specific configuration for this SetupIntent. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) SCPPaymentMethodOptionsParameters *paymentMethodOptions;` * Swift: `var paymentMethodOptions: SCPPaymentMethodOptionsParameters? { get }` ### cancellationReason * **Description**: Reason for cancellation of this SetupIntent. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) NSString *cancellationReason;` * Swift: `var cancellationReason: String? { get }` ### paymentMethodTypes * **Description**: The list of payment method types that this SetupIntent is allowed to use. These are NSNumber’s where the value is in `[SCPPaymentMethodType](../Enums/SCPPaymentMethodType.html)`. * **Declaration**: * Objective-C: `@property (nonatomic, readonly) NSArray *_Nonnull paymentMethodTypes;` * Swift: `var paymentMethodTypes: [NSNumber] { get }` ### clientSecret * **Description**: The client secret for this intent. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) NSString *clientSecret;` * Swift: `var clientSecret: String? { get }` ### lastSetupError * **Description**: The error encountered in the previous SetupIntent confirmation. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) SCPApiError *lastSetupError;` * Swift: `var lastSetupError: SCPApiError? { get }` ### latestAttemptId * **Description**: The ID of the most recent SetupAttempt for this SetupIntent. * **Declaration**: * Objective-C: `@property (nonatomic, readonly, nullable) NSString *latestAttemptId;` * Swift: `var latestAttemptId: String? { get }` ``` -------------------------------- ### SCPSetupAttemptCardPresentDetails Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupAttemptCardPresentDetails.html Represents the details of a card present setup attempt. ```APIDOC ## SCPSetupAttemptCardPresentDetails ### Description This class encapsulates the details of a card present setup attempt. ### Properties * **cardBrand** (SCPBrand) - The brand of the card used in the setup attempt. * **fundingType** (SCPFundingType) - The funding type of the card. * **last4** (NSString) - The last four digits of the card number. * **readMethod** (SCPReadMethod) - The method used to read the card details. ``` -------------------------------- ### SCPSetupAttemptPaymentMethodDetails Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPSetupAttemptPaymentMethodDetails.html Represents details about a payment method associated with a setup attempt. ```APIDOC ## SCPSetupAttemptPaymentMethodDetails ### Description Details about a PaymentMethod at a specific time. ex: at time of transaction for a SetupAttempt. ### Objective-C ```objc @interface SCPSetupAttemptPaymentMethodDetails : NSObject @end ``` ### Swift ```swift class SetupAttemptPaymentMethodDetails : NSObject { } ``` ``` -------------------------------- ### Create SetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Creates a new SCPSetupIntent with the given parameters. This is useful for saving payment details for later use. ```APIDOC ## createSetupIntent ### Description Creates a new `SCPSetupIntent` with the given parameters. ### Method Objective-C: `- (void)createSetupIntent:(nonnull SCPSetupIntentParameters *)setupIntentParams completion:(nonnull SCPSetupIntentCompletionBlock)completion;` Swift: `func createSetupIntent(_ setupIntentParams: SCPSetupIntentParameters) async throws -> SCPSetupIntent` ### Parameters - `setupIntentParams` (SCPSetupIntentParameters) - Required - The parameters that control the creation of the SetupIntent. - `completion` (SCPSetupIntentCompletionBlock) - Required - The completion block called when the command completes. ``` -------------------------------- ### tapToPayReader(_:didStartInstallingUpdate:cancelable:) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPTapToPayReaderDelegate.html The reader has started installing a software update. The cancelable parameter can be used to cancel the installation if needed. ```APIDOC ## tapToPayReader(_:didStartInstallingUpdate:cancelable:) ### Description The reader has started installing a software update. ### Parameters - **reader** (SCPReader) - The originating reader. - **update** (SCPReaderSoftwareUpdate) - The `SCPReaderSoftwareUpdate` with an `durationEstimate` that can be used to communicate how long the update is expected to take. - **cancelable** (SCPCancelable?) - This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Some updates will have a nil cancelable because these updates can not be canceled. ``` -------------------------------- ### reader:didStartInstallingUpdate:cancelable: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPBluetoothReaderDelegate.html The SDK is reporting that the reader has started installing a software update. There are two scenarios when a reader’s software update can be installed. Some updates must be installed immediately, and may be being installed automatically during `connectReader:`. Other updates can be delayed, and will be installed when your integration calls `installAvailableUpdate`. Required updates will only start installing during `connectReader:`. Once your app’s `connectReader:` completion is called, `didStartInstallingUpdate:` will only fire from requests to install via `installUpdate:`. Note that required updates are critical for the reader to have the correct configuration and prevent receiving `SCPErrorUnsupportedReaderVersion`. Updates that aren’t yet required are reported by `reader:didReportUpdateAvailable:`. ```APIDOC ## reader:didStartInstallingUpdate:cancelable: ### Description The SDK is reporting that the reader has started installing a software update. There are two scenarios when a reader’s software update can be installed. Some updates must be installed immediately, and may be being installed automatically during `connectReader:`. Other updates can be delayed, and will be installed when your integration calls `installAvailableUpdate`. Required updates will only start installing during `connectReader:`. Once your app’s `connectReader:` completion is called, `didStartInstallingUpdate:` will only fire from requests to install via `installUpdate:`. Note that required updates are critical for the reader to have the correct configuration and prevent receiving `SCPErrorUnsupportedReaderVersion`. Updates that aren’t yet required are reported by `reader:didReportUpdateAvailable:`. See [https://stripe.com/docs/terminal/readers/bbpos-chipper2xbt#updating-reader-software](https://stripe.com/docs/terminal/readers/bbpos-chipper2xbt#updating-reader-software) ### Method - (void)reader:(nonnull SCPReader *)reader didStartInstallingUpdate:(nonnull SCPReaderSoftwareUpdate *)update cancelable:(nullable SCPCancelable *)cancelable; ### Parameters #### Path Parameters - **reader** (SCPReader *) - The originating reader. - **update** (SCPReaderSoftwareUpdate *) - The `[SCPReaderSoftwareUpdate](../Classes/SCPReaderSoftwareUpdate.html)` with an `estimatedUpdateTime` that can be used to communicate how long the update is expected to take. - **cancelable** (SCPCancelable *) - This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Incremental only updates will have a nil cancelable because these updates can not be canceled. ``` -------------------------------- ### Create SetupIntent - Swift Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Creates a new SCPSetupIntent with the given parameters. Use this to initiate the process of saving payment details. ```Swift func createSetupIntent(_ setupIntentParams: SCPSetupIntentParameters) async throws -> SCPSetupIntent ``` -------------------------------- ### reader:didStartInstallingUpdate:cancelable: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPMobileReaderDelegate.html The SDK is reporting that the reader has started installing a software update. Required updates will only start installing during `connectReader:`. Once your app’s `connectReader:` completion is called, `didStartInstallingUpdate:` will only fire from requests to install via `installUpdate:`. Note that required updates are critical for the reader to have the correct configuration and prevent receiving `SCPErrorUnsupportedReaderVersion`. Updates that aren’t yet required are reported by `reader:didReportUpdateAvailable:`. ```APIDOC ## Objective-C ```objc - (void)reader:(nonnull SCPReader *)reader didStartInstallingUpdate:(nonnull SCPReaderSoftwareUpdate *)update cancelable:(nullable SCPCancelable *)cancelable; ``` ### Parameters * `_reader_` (SCPReader *) - The originating reader. * `_update_` (SCPReaderSoftwareUpdate *) - The `SCPReaderSoftwareUpdate` with an `durationEstimate` that can be used to communicate how long the update is expected to take. * `_cancelable_` (SCPCancelable *) - This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Incremental only updates will have a nil cancelable because these updates can not be canceled. ``` ```APIDOC ## Swift ```swift func reader(_ reader: SCPReader, didStartInstallingUpdate update: SCPReaderSoftwareUpdate, cancelable: SCPCancelable?) ``` ### Parameters * `reader` (SCPReader) - The originating reader. * `update` (SCPReaderSoftwareUpdate) - The `SCPReaderSoftwareUpdate` with an `durationEstimate` that can be used to communicate how long the update is expected to take. * `cancelable` (SCPCancelable?) - This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Incremental only updates will have a nil cancelable because these updates can not be canceled. ``` -------------------------------- ### Create SetupIntent - Objective-C Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Creates a new SCPSetupIntent with the given parameters. Use this to initiate the process of saving payment details. ```Objective-C - (void)createSetupIntent:(nonnull SCPSetupIntentParameters *)setupIntentParams completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` -------------------------------- ### tapToPayReader:didStartInstallingUpdate:cancelable: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPTapToPayReaderDelegate.html The reader has started installing a software update. This method is called when a software update begins on the reader. It provides information about the update and a cancelable object to potentially stop the installation. ```APIDOC ## tapToPayReader:didStartInstallingUpdate:cancelable: ### Description The reader has started installing a software update. ### Parameters - **reader** (nonnull SCPReader *) - The originating reader. - **update** (nonnull SCPReaderSoftwareUpdate *) - The `[SCPReaderSoftwareUpdate](../Classes/SCPReaderSoftwareUpdate.html)` with an `durationEstimate` that can be used to communicate how long the update is expected to take. - **cancelable** (nullable SCPCancelable *) - This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Some updates will have a nil cancelable because these updates can not be canceled. ``` -------------------------------- ### SCPSetupIntentParameters Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Blocks.html Parameters for creating a SetupIntent. ```APIDOC ## SCPSetupIntentParameters ### Description Parameters for creating a SetupIntent. ### Class SCPSetupIntentParameters ``` -------------------------------- ### SCPSetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPJSONDecodable.html Represents a SetupIntent object. ```APIDOC ## SCPSetupIntent ### Description Represents a SetupIntent object used for saving payment methods. ### Class SCPSetupIntent ``` -------------------------------- ### Discover Readers with BluetoothScanDiscoveryConfiguration Source: https://context7.com/stripe/stripe-terminal-ios/llms.txt Starts scanning for Bluetooth readers using a `BluetoothScanDiscoveryConfiguration`. Results are delivered continuously via `DiscoveryDelegate.didUpdateDiscoveredReaders`. This example uses Swift async/await. ```swift import StripeTerminal // Build a discovery configuration — choose the method matching your reader type let config = try BluetoothScanDiscoveryConfigurationBuilder(simulated: false).build() // For Internet readers: InternetDiscoveryConfigurationBuilder(simulated: false).build() // For Tap to Pay: TapToPayDiscoveryConfigurationBuilder(simulated: false).build() // For USB: UsbDiscoveryConfigurationBuilder(simulated: false).build() // Swift async/await (available in SDK 5.x) let discoverStream = Terminal.shared.discoverReaders(config) Task { do { for try await readers in discoverStream { // Called each time the discovered reader list changes print("Discovered \(readers.count) reader(s):") readers.forEach { reader in print(" \(reader.serialNumber) – \(reader.deviceType) – battery: \(reader.batteryLevel ?? 0)") } } } catch { let nsError = error as NSError if nsError.domain == ErrorDomain, nsError.code == ErrorCode.canceled.rawValue { print("Discovery was canceled") } else { print("Discovery error: \(error.localizedDescription)") } } } // Cancel discovery when needed discoverStream.cancel() ``` -------------------------------- ### SCPSetupIntentUsage Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Errors.html The usage of a SetupIntent. ```APIDOC ## SCPSetupIntentUsage ### Description The usage of a SetupIntent. ### Enum SCPSetupIntentUsage ``` -------------------------------- ### SCPSetupIntentStatusRequiresConfirmation Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent requires confirmation. The next step is to call `confirmSetupIntent`. ```APIDOC ## SCPSetupIntentStatusRequiresConfirmation ### Description The SetupIntent requires explicit confirmation before it can proceed. This might involve user interaction or additional verification. ### Next Step Call `confirmSetupIntent` to confirm the SetupIntent. ``` -------------------------------- ### Confirm Setup Intent (Objective-C) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Confirms a SetupIntent after payment method collection is complete. Handles potential errors by returning an updated SetupIntent, guiding retry logic or further actions. ```objectivec - (nullable SCPCancelable *)confirmSetupIntent:(nonnull SCPSetupIntent *)setupIntent completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` -------------------------------- ### terminal:didRequestReaderDisplayMessage: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPReaderDisplayDelegate.html Called to request that a prompt be displayed in your app. For example, if the prompt is `SwipeCard`, your app should instruct the user to present the card again by swiping it. Use `stringFromReaderDisplayMessage` to get a user-facing string for the prompt. ```APIDOC ## terminal:didRequestReaderDisplayMessage: ### Description This method is called to request that a prompt be displayed in your app. For example, if the prompt is `SwipeCard`, your app should instruct the user to present the card again by swiping it. Use `stringFromReaderDisplayMessage` to get a user facing string for the prompt. See SCPReaderDisplayMessage ### Parameters * **terminal** (SCPTerminal *) - The originating terminal. * **displayMessage** (SCPReaderDisplayMessage) - The message to display to the user. ``` -------------------------------- ### SCPSetupIntentConfiguration Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPJSONDecodable.html Configuration for SetupIntents. ```APIDOC ## SCPSetupIntentConfiguration ### Description Configuration object for creating and managing SetupIntents. ### Class SCPSetupIntentConfiguration ``` -------------------------------- ### reader(_:didRequestReaderDisplayMessage:) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPMobileReaderDelegate.html This method is called to request that a prompt be displayed in your app. For example, if the prompt is `SwipeCard`, your app should instruct the user to present the card again by swiping it. Use `- [SCPTerminal stringFromReaderDisplayMessage]` to get a user facing string for the prompt. ```APIDOC ## Objective-C - (void)reader:(nonnull SCPReader *)reader didRequestReaderDisplayMessage:(SCPReaderDisplayMessage)displayMessage; ## Swift func reader(_ reader: SCPReader, didRequestReaderDisplayMessage displayMessage: ReaderDisplayMessage) ### Parameters `reader` The originating reader. `displayMessage` The message to display to the user. ``` -------------------------------- ### SCPSetupIntentStatus Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The possible states of a SetupIntent. ```APIDOC enum SCPSetupIntentStatus : NSInteger { SCPSetupIntentStatusRequiresPaymentMethod = 1, SCPSetupIntentStatusRequiresConfirmation = 2, SCPSetupIntentStatusRequiresAction = 3, SCPSetupIntentStatusProcessing = 4, SCPSetupIntentStatusSucceeded = 5, SCPSetupIntentStatusCanceled = 6 }; ``` -------------------------------- ### Install Stripe Terminal with CocoaPods Source: https://github.com/stripe/stripe-terminal-ios/blob/master/README.md Add the StripeTerminal pod to your Podfile for installation. Ensure you open the .xcworkspace file in Xcode after installation. ```ruby pod 'StripeTerminal', '~> 5.0' ``` -------------------------------- ### SCPSetupIntentParameters Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Reader.html Parameters for creating or updating a SetupIntent. ```APIDOC ## SCPSetupIntentParameters ### Description Parameters for creating or updating a SetupIntent. ### Class SCPSetupIntentParameters ``` -------------------------------- ### SCPSetupIntentStatusProcessing Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent is currently being processed. This status indicates that the payment method is being finalized. ```APIDOC ## SCPSetupIntentStatusProcessing ### Description The SetupIntent is actively being processed. This status is temporary and will transition to either `succeeded` or `canceled` once the processing is complete. ### Note Processing times can vary depending on the payment method. ``` -------------------------------- ### SCPCreateConfiguration Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPCreateConfiguration.html The SCPCreateConfiguration class allows you to specify various settings when creating a payment or setup intent. This includes options for offline behavior, surcharges, and tipping. ```APIDOC ## SCPCreateConfiguration ### Description Used to configure settings for creating payment intents or setup intents. ### Properties * `offlineBehavior`: Specifies how the SDK should behave when offline. (See `SCPOfflineBehavior` enum) * `surchargeConfiguration`: Configuration for handling surcharges. (See `SCPSurchargeConfiguration` class) * `tippingConfiguration`: Configuration for handling tipping. (See `SCPTippingConfiguration` class) * `motoConfiguration`: Configuration for Mail Order / Telephone Order (MOTO) transactions. (See `SCPMotoConfiguration` class) ### Example ```swift let configuration = SCPCreateConfiguration() configuration.offlineBehavior = .autoUpdate configuration.surchargeConfiguration = SCPSurchargeConfiguration(/* ... */) configuration.tippingConfiguration = SCPTippingConfiguration(/* ... */) configuration.motoConfiguration = SCPMotoConfiguration(/* ... */) ``` ``` -------------------------------- ### SCPSetupAttempt Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Errors.html Represents a SetupIntent attempt. ```APIDOC ## SCPSetupAttempt ### Description Represents a SetupIntent attempt. ### Class SCPSetupAttempt ``` -------------------------------- ### Install Available Update Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Installs the available update for the connected reader. ```APIDOC ## Install Available Update ### Description Installs the available update for the connected reader. ### Method - (void)installAvailableUpdate; ### Endpoint N/A (SDK Method) ### Parameters None ### Request Example Objective-C: ```objc [terminal installAvailableUpdate]; ``` Swift: ```swift terminal.installAvailableUpdate() ``` ### Response None explicitly documented for this method. ``` -------------------------------- ### SCPSetupAttempt Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Reader.html Represents a SetupAttempt object. ```APIDOC ## SCPSetupAttempt ### Description Represents a single attempt to set up a customer's payment method. ### Properties * `id` (string) - The unique identifier for the SetupAttempt. * `status` (NSString) - The status of the SetupAttempt. * `paymentMethod` (SCPPaymentMethod) - The PaymentMethod used in the attempt. * `usage` (SCPSetupIntentUsage) - The intended usage of the payment method. * `failureReason` (NSString) - The reason for failure, if applicable. * `failureCode` (NSString) - The error code for the failure, if applicable. * `created` (NSDate) - The time at which the SetupAttempt was created. * `livemode` (BOOL) - Whether the SetupAttempt was created in live mode. * `object` (NSString) - The type of the object, typically "setup_attempt". ``` -------------------------------- ### SCPSetupIntentStatusRequiresAction Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent requires additional actions, such as 3D Secure authentication. The next step depends on the specific action required. ```APIDOC ## SCPSetupIntentStatusRequiresAction ### Description The SetupIntent is in a state that requires further action from the user or the system. This often involves security measures like 3D Secure authentication. ### Next Step Refer to the SetupIntent's `nextAction` property for details on the required action. ``` -------------------------------- ### reader:didStartInstallingUpdate:cancelable: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPBluetoothReaderDelegate.html Notifies when the reader begins installing a software update. Updates can be mandatory (installing automatically during `connectReader:`) or deferrable (installed via `installUpdate:`). Canceling a required update may lead to a connection failure. ```APIDOC ## reader:didStartInstallingUpdate:cancelable: ### Description The SDK is reporting that the reader has started installing a software update. There are two scenarios when a reader’s software update can be installed. Some updates must be installed immediately, and may be being installed automatically during `connectReader:`. Other updates can be delayed, and will be installed when your integration calls `installAvailableUpdate`. Required updates will only start installing during `connectReader:`. Once your app’s `connectReader:` completion is called, `didStartInstallingUpdate:` will only fire from requests to install via `installUpdate:`. Note that required updates are critical for the reader to have the correct configuration and prevent receiving `SCPErrorUnsupportedReaderVersion`. Updates that aren’t yet required are reported by `reader:didReportUpdateAvailable:`. See [https://stripe.com/docs/terminal/readers/bbpos-chipper2xbt#updating-reader-software](https://stripe.com/docs/terminal/readers/bbpos-chipper2xbt#updating-reader-software) ### Declaration Objective-C - (void)reader:(nonnull SCPReader *)reader didStartInstallingUpdate:(nonnull SCPReaderSoftwareUpdate *)update cancelable:(nullable SCPCancelable *)cancelable; Swift func reader(_ reader: SCPReader, didStartInstallingUpdate update: SCPReaderSoftwareUpdate, cancelable: SCPCancelable?) ### Parameters `_reader_` The originating reader. `_update_` The `[SCPReaderSoftwareUpdate](../Classes/SCPReaderSoftwareUpdate.html)` with an `estimatedUpdateTime` that can be used to communicate how long the update is expected to take. `_cancelable_` This cancelable is provided to cancel the installation if needed. Canceling a required update will result in a failed connect with error `SCPErrorUnsupportedReaderVersion`. Incremental only updates will have a nil cancelable because these updates can not be canceled. ``` -------------------------------- ### Confirm Setup Intent (Objective-C) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPTerminal.html Confirms a SetupIntent after payment method collection is complete. Handles potential failures by returning an updated SetupIntent for inspection. ```objc - (nullable SCPCancelable *)confirmSetupIntent:(nonnull SCPSetupIntent *)setupIntent completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` -------------------------------- ### Install Available Reader Update (Objective-C) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Installs the available firmware update for the currently connected reader. ```Objective-C - (void)installAvailableUpdate ``` -------------------------------- ### SCPSetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Blocks.html Represents a SetupIntent object, used for saving payment methods. ```APIDOC ## SCPSetupIntent ### Description Represents a SetupIntent object, used for saving payment methods. ### Class SCPSetupIntent ``` -------------------------------- ### createSetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Classes/SCPTerminal.html Creates a new SCPSetupIntent with the given parameters. This is used to initiate the process of saving payment details for later use. ```APIDOC ## createSetupIntent ### Description Creates a new `SCPSetupIntent` with the given parameters. See [https://stripe.com/docs/api/setup_intents/create](https://stripe.com/docs/api/setup_intents/create) ### Method Signature Objective-C ```objc - (void)createSetupIntent:(nonnull SCPSetupIntentParameters *)setupIntentParams completion:(nonnull SCPSetupIntentCompletionBlock)completion; ``` Swift ```swift func createSetupIntent(_ setupIntentParams: SCPSetupIntentParameters) async throws -> SCPSetupIntent ``` ### Parameters * `setupIntentParams` (SCPSetupIntentParameters) - Required - The parameters that control the creation of the SetupIntent. * `completion` (SCPSetupIntentCompletionBlock) - Required - The completion block called when the command completes. ``` -------------------------------- ### SCPSetupIntentStatusSucceeded Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent has successfully completed. ```APIDOC ## SCPSetupIntentStatusSucceeded ### Description The SetupIntent has been successfully completed. The payment method is now set up and ready for use. ``` -------------------------------- ### Install Static with CocoaPods Source: https://github.com/stripe/stripe-terminal-ios/blob/master/Example/Pods/Static/Readme.markdown Install Static using CocoaPods by adding the pod to your Podfile and ensuring you use frameworks. ```ruby use_frameworks! pod 'Static', git: 'https://github.com/venmo/Static' ``` -------------------------------- ### setStripeDescription: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupIntentParametersBuilder.html Sets a description for the SetupIntent. ```APIDOC ## setStripeDescription: ### Description Sets a description for the SetupIntent. ### Method Objective-C: `- (nonnull SCPSetupIntentParametersBuilder *)setStripeDescription:(nullable NSString *)stripeDescription;` Swift: `func setStripeDescription(_ stripeDescription: String?) -> SetupIntentParametersBuilder` ``` -------------------------------- ### Setup Intent Completion Block Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Blocks.html This block is called with a SetupIntent object or an error, indicating the result of a setup intent operation. ```Objective-C typedef void (^SCPSetupIntentCompletionBlock)(SCPSetupIntent *_Nullable, NSError *_Nullable) ``` ```Swift typealias SetupIntentCompletionBlock = (SCPSetupIntent?, (any Error)?) -> Void ``` -------------------------------- ### SCPSetupIntent Declaration (Swift) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Saving Cards.html Swift declaration for the SetupIntent class, which facilitates the process of setting up and saving customer payment credentials for future transactions. ```swift class SetupIntent : NSObject, NSCopying ``` -------------------------------- ### tapToPayReader:didFinishInstallingUpdate:error: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Protocols/SCPTapToPayReaderDelegate.html The reader has finished installing an update. This method is called when a software update installation has completed, indicating success or failure. ```APIDOC ## tapToPayReader:didFinishInstallingUpdate:error: ### Description The reader has finished installing an update. ### Parameters - **reader** (nonnull SCPReader *) - The originating reader. - **update** (nullable SCPReaderSoftwareUpdate *) - The update that was being installed, if any. - **error** (nullable NSError *) - If the install failed, this will describe the error preventing install. If it succeeded, the error will be `nil`. ``` -------------------------------- ### SCPSetupIntentStatusProcessing Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/docsets/StripeTerminal.docset/Contents/Resources/Documents/Enums/SCPSetupIntentStatus.html Once required actions are handled, the SetupIntent moves to processing. While for certain payment methods (e.g., cards) processing can be quick, other payment methods can take up to a few days to process. ```APIDOC ## SCPSetupIntentStatusProcessing ### Description Represents the status where the SetupIntent is currently being processed. ### Declaration Objective-C: ```objectivec SCPSetupIntentStatusProcessing ``` Swift: ```swift case processing = 3 ``` ``` -------------------------------- ### Objective-C Setup Intent Completion Block Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Blocks.html Objective-C block definition for handling setup intent operations. It is called with the SetupIntent object or an error. ```objective-c typedef void (^SCPSetupIntentCompletionBlock)(SCPSetupIntent *_Nullable, NSError *_Nullable) ``` -------------------------------- ### SCPSetupIntentStatusRequiresConfirmation Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html Indicates that the SetupIntent requires confirmation. Call `confirmSetupIntent` to proceed. ```Objective-C SCPSetupIntentStatusRequiresConfirmation ``` ```Swift case requiresConfirmation = 1 ``` -------------------------------- ### SCPSetupIntentStatusRequiresPaymentMethod Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent is waiting for a payment method to be collected. The next step is to call `collectPaymentMethod`. ```APIDOC ## SCPSetupIntentStatusRequiresPaymentMethod ### Description The SetupIntent requires a payment method to be collected. This is typically the first step in the setup process. ### Next Step Call `collectPaymentMethod` to proceed. ``` -------------------------------- ### SCPSetupAttempt Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Reader.html Represents a SetupAttempt object, which is part of a SetupIntent. ```APIDOC ## SCPSetupAttempt ### Description Represents a SetupAttempt object, which is part of a SetupIntent. ### Class SCPSetupAttempt ``` -------------------------------- ### SCPSetupIntentStatusProcessing Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html Indicates that the SetupIntent is currently processing. This status can persist for varying durations depending on the payment method. ```Objective-C SCPSetupIntentStatusProcessing ``` ```Swift case processing = 3 ``` -------------------------------- ### SCPPaymentStatusReady Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPPaymentStatus.html The SDK is ready to start a payment. ```APIDOC ## SCPPaymentStatusReady ### Description The SDK is ready to start a payment. ### Declaration Objective-C ```objectivec SCPPaymentStatusReady ``` Swift ```swift case ready = 1 ``` ``` -------------------------------- ### Install Reader Software Update using installAvailableUpdate Source: https://context7.com/stripe/stripe-terminal-ios/llms.txt Installs a pending firmware or configuration update on the connected mobile reader. The `MobileReaderDelegate` reports progress and completion events. Ensure `UIApplication.shared.isIdleTimerDisabled` is managed to prevent screen lock during updates. ```swift import StripeTerminal // MobileReaderDelegate implementation class MyMobileReaderDelegate: NSObject, MobileReaderDelegate { func reader(_ reader: Reader, didReportAvailableUpdate update: ReaderSoftwareUpdate) { print("Optional update available: \(update.deviceSoftwareVersion)") // Prompt user to decide Terminal.shared.installAvailableUpdate() } func reader(_ reader: Reader, didStartInstallingUpdate update: ReaderSoftwareUpdate, cancelable: Cancelable?) { print("Installing update \(update.deviceSoftwareVersion)…") UIApplication.shared.isIdleTimerDisabled = true // prevent screen lock } func reader(_ reader: Reader, didReportReaderSoftwareUpdateProgress progress: Float) { print("Update progress: \(Int(progress * 100))%") } func reader(_ reader: Reader, didFinishInstallingUpdate update: ReaderSoftwareUpdate?, error: Error?) { UIApplication.shared.isIdleTimerDisabled = false if let error = error { print("Update failed: \(error.localizedDescription)") } else { print("Update installed successfully") } } // Required MobileReaderDelegate stubs func reader(_ reader: Reader, didRequestReaderInput inputOptions: ReaderInputOptions) {} func reader(_ reader: Reader, didRequestReaderDisplayMessage message: ReaderDisplayMessage) { print("Reader says: \(Terminal.stringFromReaderDisplayMessage(message))") } } ``` -------------------------------- ### SCPSetupIntentStatusCanceled Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html The SetupIntent has been canceled and cannot be used. ```APIDOC ## SCPSetupIntentStatusCanceled ### Description The SetupIntent has been canceled. It is no longer valid and cannot be used for any further actions. ``` -------------------------------- ### SCPPaymentStatusReady Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPPaymentStatus.html Indicates the SDK is ready to start a payment. ```Objective-C SCPPaymentStatusReady ``` -------------------------------- ### SCPSetupIntent Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Errors.html Represents a Stripe SetupIntent object. ```APIDOC ## SCPSetupIntent ### Description Represents a Stripe SetupIntent object. ### Class SCPSetupIntent ``` -------------------------------- ### Install Available Update Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Initiates the installation of an available software update for the connected Stripe Terminal reader. The app should display the update progress to the user and ensure the device does not lock during the process. This method is not applicable for Verifone P400 or WisePOS E readers. ```APIDOC ## Install Available Update ### Description Installs the available software update for the connected reader. The app should display the update progress to the user and prevent the device from locking during the update. ### Method `installAvailableUpdate()` ### Notes - This method is not supported for Verifone P400 or WisePOS E readers. - Implement `reader:didFinishInstallingUpdate:error:` on `SCPMobileReaderDelegate` to handle success or failure. - Consider setting `UIApplication.shared.isIdleTimerDisabled` to `true` during the update. ``` -------------------------------- ### tapToPayReader(_:didFinishInstallingUpdate:error:) Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPTapToPayReaderDelegate.html The reader has finished installing an update. ```APIDOC ## tapToPayReader(_:didFinishInstallingUpdate:error:) ### Description The reader has finished installing an update. ### Parameters - **reader** (SCPReader) - The originating reader. - **update** (SCPReaderSoftwareUpdate?) - The update that was being installed, if any. - **error** (NSError?) - If the installed failed, this will describe the error preventing install. If it succeeded, the error will be `nil`. ``` -------------------------------- ### SCPSetupIntentConfigurationBuilder Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupIntentConfigurationBuilder.html The SCPSetupIntentConfigurationBuilder class provides methods to configure various aspects of a SetupIntent, such as the payment method types, return URL, and whether to confirm the SetupIntent immediately. ```APIDOC ## SCPSetupIntentConfigurationBuilder ### Description A builder class for creating `SCPSetupIntentConfiguration` objects. This allows for the fluent configuration of parameters related to the creation and confirmation of a SetupIntent. ### Methods - `paymentMethodTypes`: Sets the allowed payment method types for the SetupIntent. - `returnURL`: Sets the URL to redirect the customer to after the SetupIntent is completed. - `confirm`: Sets a boolean value indicating whether the SetupIntent should be confirmed immediately after creation. ### Example ```swift let configuration = SCPSetupIntentConfigurationBuilder() .paymentMethodTypes([.card]) .returnURL("yourapp://stripe-redirect") .confirm(true) .build() ``` ### Parameters #### `paymentMethodTypes` - **Type**: `[SCPPaymentMethodType]` - **Description**: An array of `SCPPaymentMethodType` objects that are allowed for this SetupIntent. #### `returnURL` - **Type**: `URL` - **Description**: The URL that the customer will be redirected to after the SetupIntent is successfully completed. #### `confirm` - **Type**: `Bool` - **Description**: If `true`, the SetupIntent will be confirmed immediately after creation. If `false`, the SetupIntent will remain in a `requires_confirmation` state. ### Build Method - `build()`: Returns an immutable `SCPSetupIntentConfiguration` object based on the builder's current configuration. ``` -------------------------------- ### initWithDelegate: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPInternetConnectionConfigurationBuilder.html Create an InternetConnectionConfigurationBuilder with the provided delegate. ```APIDOC ## initWithDelegate: ### Description Create an `InternetConnectionConfigurationBuilder` with the provided delegate. ### Method Objective-C: `- (nonnull instancetype)initWithDelegate: (nonnull id)delegate;` Swift: `init(delegate: any InternetReaderDelegate)` ``` -------------------------------- ### setSetupFutureUsage Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPPaymentIntentParametersBuilder.html Sets the future usage of the payment method for setup. ```APIDOC ## setSetupFutureUsage ### Description Sets the future usage of the payment method for setup. ### Method Objective-C: `- (nonnull SCPPaymentIntentParametersBuilder *)setSetupFutureUsage:(nullable NSString *)setupFutureUsage;` Swift: `func setSetupFutureUsage(_ setupFutureUsage: String?) -> PaymentIntentParametersBuilder` ``` -------------------------------- ### Discovery Method Property Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPDiscoveryConfiguration.html Gets the method by which readers are discovered. ```APIDOC ## Discovery Method Property ### Description The method by which to discover readers. ### Objective-C ```objc @property (nonatomic, readonly) SCPDiscoveryMethod discoveryMethod; ``` ### Swift ```swift var discoveryMethod: DiscoveryMethod { get } ``` ``` -------------------------------- ### SCPSetupIntentStatusRequiresAction Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Enums/SCPSetupIntentStatus.html Indicates that the SetupIntent requires additional actions, such as 3D Secure authentication. The SetupIntent will remain in this status until these actions are completed. ```Objective-C SCPSetupIntentStatusRequiresAction ``` ```Swift case requiresAction = 2 ``` -------------------------------- ### localMobileReader:didReportReaderSoftwareUpdateProgress: Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Protocols/SCPLocalMobileReaderDelegate.html Reports the progress of a software update installation on the reader. ```APIDOC ## localMobileReader:didReportReaderSoftwareUpdateProgress: ### Description The reader reported progress on a software update. ### Parameters - `reader` (SCPReader) - The originating reader. - `progress` (Float) - An estimate of the software update progress, ranging from 0.0 to 1.0. ``` -------------------------------- ### SCPConfirmSetupIntentError Initialization Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPConfirmSetupIntentError.html The initialization methods for SCPConfirmSetupIntentError are unavailable for direct instantiation. ```APIDOC ## SCPConfirmSetupIntentError Initialization ### `init` Unavailable You cannot directly instantiate this class. #### Declaration Objective-C ```objc - (nonnull instancetype)init; ``` ### `new` Unavailable You cannot directly instantiate this class. #### Declaration Objective-C ```objc + (nonnull instancetype)new; ``` ``` -------------------------------- ### SCPSetupIntentConfiguration Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPSetupIntentConfiguration.html The SCPSetupIntentConfiguration class allows you to customize the setup of a Payment Intent. ```APIDOC ## SCPSetupIntentConfiguration ### Description Configuration for setting up a Payment Intent. ### Properties - **returnURL** (string) - Optional - The URL to which the customer will be redirected after the setup is complete. - **paymentMethodType** (SCPPaymentMethodType) - Optional - The type of payment method to collect. Defaults to SCPPaymentMethodTypeCard. - **captureMethod** (SCPCardPresentCaptureMethod) - Optional - The capture method for the card present payment. Defaults to SCPCardPresentCaptureMethodAutomatic. - **shippingInformation** (SCPShippingInformation) - Optional - Shipping information for the transaction. - **shippingAddress** (SCPAddress) - Optional - Shipping address for the transaction. - **extraParameters** (NSDictionary *) - Optional - Additional parameters to be sent to the Stripe API. ``` -------------------------------- ### Payment Status Source: https://github.com/stripe/stripe-terminal-ios/blob/master/docs/docs/Classes/SCPTerminal.html Get the current payment status of the Terminal instance. ```APIDOC ## Payment Status ### Description The Terminal instance’s current payment status. ### Declaration Objective-C ```objc @property (nonatomic, readonly) SCPPaymentStatus paymentStatus; ``` Swift ```swift var paymentStatus: PaymentStatus { get } ``` ```