### Retrieve Setup Intent Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves a SetupIntent by its client secret. This is useful for checking the status of a setup attempt. ```APIDOC ## retrieveSetupIntent ### Description Retrieves a SetupIntent by its client secret. This is useful for checking the status of a setup attempt. ### Method GET ### Endpoint /v1/setup_intents/{client_secret} ### Parameters #### Path Parameters - **client_secret** (string) - Required - The client secret of the SetupIntent. ### Response #### Success Response (200) - **setupIntent** (SetupIntentResultType) - The retrieved SetupIntent object. #### Response Example ```json { "setupIntent": { "id": "seti_1J...", "status": "succeeded" } } ``` ``` -------------------------------- ### Install Available Update Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Installs any available software update for the connected reader. ```APIDOC ## installAvailableUpdate ### Description Installs any available software update for the connected reader. ### Method POST ### Endpoint /v1/readers/install_update ### Response #### Success Response (200) - **result** (void) - Indicates the update installation process has started. #### Response Example ```json { "result": null } ``` ``` -------------------------------- ### Process Setup Intent Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Processes a SetupIntent with the provided parameters. This is used to confirm the collection of payment method details for future use. ```APIDOC ## processSetupIntent ### Description Processes a SetupIntent with the provided parameters. This is used to confirm the collection of payment method details for future use. ### Method POST ### Endpoint /v1/setup_intents/{intent_id}/process ### Parameters #### Path Parameters - **intent_id** (string) - Required - The ID of the SetupIntent to process. #### Request Body - **params** (ProcessSetupIntentParams) - Required - Parameters for processing the SetupIntent. ### Request Example ```json { "params": { "payment_method_id": "pm_1J..." } } ``` ### Response #### Success Response (200) - **setupIntent** (SetupIntentResultType) - The result of the SetupIntent processing. #### Response Example ```json { "setupIntent": { "id": "seti_1J...", "status": "succeeded" } } ``` ``` -------------------------------- ### Create Setup Intent Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Creates a SetupIntent on Stripe. This is used to save a customer's payment method for future use. ```APIDOC ## createSetupIntent ### Description Creates a SetupIntent on Stripe. This is used to save a customer's payment method for future use. ### Method POST ### Endpoint /v1/setup_intents ### Parameters #### Request Body - **params** (CreateSetupIntentParams) - Required - Parameters for creating the SetupIntent. ### Request Example ```json { "params": { "payment_method_type": "card" } } ``` ### Response #### Success Response (200) - **setupIntent** (SetupIntentResultType) - The created SetupIntent object. #### Response Example ```json { "setupIntent": { "id": "seti_1J...", "status": "requires_payment_method" } } ``` ``` -------------------------------- ### Confirm Setup Intent Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Confirms a SetupIntent with the provided parameters. This is used to confirm the collection of payment method details. ```APIDOC ## confirmSetupIntent ### Description Confirms a SetupIntent with the provided parameters. This is used to confirm the collection of payment method details. ### Method POST ### Endpoint /v1/setup_intents/{intent_id}/confirm ### Parameters #### Path Parameters - **intent_id** (string) - Required - The ID of the SetupIntent to confirm. #### Request Body - **params** (ConfirmSetupIntentMethodParams) - Required - Parameters for confirming the SetupIntent. ### Request Example ```json { "params": { "payment_method_data": { "type": "card", "card": { "number": "4242", "exp_month": 12, "exp_year": 2024, "cvc": "123" } } } } ``` ### Response #### Success Response (200) - **setupIntent** (SetupIntentResultType) - The result of the SetupIntent confirmation. #### Response Example ```json { "setupIntent": { "id": "seti_1J...". "status": "succeeded" } } ``` ``` -------------------------------- ### Interface SetupAttemptPaymentMethodDetails Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/SetupIntent.SetupAttemptPaymentMethodDetails.html Defines the structure of payment method details during a setup attempt in Stripe Terminal. ```APIDOC ## Interface SetupAttemptPaymentMethodDetails ### Description Represents the payment method details associated with a setup attempt. ### Properties - **cardPresent** (SetupAttemptCardPresentDetails) - Details for card present payment methods. - **interacPresent** (SetupAttemptCardPresentDetails) - Details for Interac present payment methods. - **type** (PaymentMethodType) - The type of the payment method. ``` -------------------------------- ### SetupIntent Type Definition Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/SetupIntent.Type.html The SetupIntent object contains details about the setup process, including status, payment method information, and metadata. ```APIDOC ## SetupIntent Type ### Description Represents a SetupIntent object in the Stripe Terminal React Native SDK. ### Properties - **id** (string) - Required - Unique identifier for the SetupIntent. - **livemode** (boolean) - Required - Whether the object exists in live mode or test mode. - **sdkUuid** (string) - Required - Unique identifier for the SDK instance. - **application** (string) - Optional - The application that created the SetupIntent. - **cancellationReason** (string) - Optional - Reason for cancellation. - **clientSecret** (string) - Optional - The client secret of the SetupIntent. - **created** (string) - Optional - Creation timestamp. - **customer** (string) - Optional - ID of the associated customer. - **description** (string) - Optional - Description of the SetupIntent. - **lastSetupError** (ApiErrorInformation) - Optional - Information about the last error. - **latestAttempt** (SetupAttempt) - Optional - The latest setup attempt. - **mandate** (string) - Optional - ID of the mandate. - **metadata** (Record) - Optional - Set of key-value pairs. - **nextAction** (NextAction) - Optional - Required action for the setup. - **onBehalfOf** (string) - Optional - The account on behalf of which the setup is performed. - **paymentMethod** (PaymentMethod.Type) - Optional - The payment method used. - **paymentMethodId** (string) - Optional - ID of the payment method. - **paymentMethodOptions** (PaymentMethodOptions) - Optional - Options for the payment method. - **paymentMethodTypes** (string[]) - Optional - List of allowed payment method types. - **singleUseMandate** (string) - Optional - ID of the single-use mandate. - **status** (SetupIntent.Status) - Optional - Current status of the SetupIntent. - **usage** (Usage) - Optional - Intended usage of the payment method. ``` -------------------------------- ### CancelSetupIntentMethodParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/CancelSetupIntentMethodParams.html Defines the parameters required to cancel a setup intent. ```APIDOC ## Type Alias: CancelSetupIntentMethodParams ### Description Defines the required parameters for the cancelSetupIntent method. ### Properties - **setupIntent** (SetupIntent.Type) - Required - The setup intent object to be cancelled. ``` -------------------------------- ### Easy Connect Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Initiates an easy connection process for readers. This is a simplified method for connecting readers, often used for initial setup. ```APIDOC ## easyConnect ### Description Initiates an easy connection process for readers. This is a simplified method for connecting readers, often used for initial setup. ### Method POST ### Endpoint /v1/readers/easy_connect ### Parameters #### Request Body - **param** (EasyConnectParams) - Required - Parameters for the easy connection process. ### Request Example ```json { "param": { "location_id": "loc_123" } } ``` ### Response #### Success Response (200) - **reader** (ConnectReaderResultType) - The result of the reader connection. #### Response Example ```json { "reader": { "id": "rdR_1J...", "status": "connected" } } ``` ``` -------------------------------- ### Get Native SDK Version Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves the version of the native Stripe Terminal SDK. ```APIDOC ## getNativeSdkVersion ### Description Retrieves the version of the native Stripe Terminal SDK. ### Method GET ### Endpoint /v1/sdk_version ### Response #### Success Response (200) - **version** (string) - The version of the native SDK. #### Response Example ```json { "version": "1.2.3" } ``` ``` -------------------------------- ### Configure StripeTerminalProvider with Token Provider Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/StripeTerminalProvider.html Use StripeTerminalProvider to wrap your app and provide the tokenProvider prop. This is required for standard setup to authenticate with Stripe. ```javascript ``` -------------------------------- ### Get Reader Settings Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves the current settings of the connected reader. ```APIDOC ## getReaderSettings ### Description Retrieves the current settings of the connected reader. ### Method GET ### Endpoint /v1/readers/settings ### Response #### Success Response (200) - **settings** (ReaderSettings) - The current reader settings. #### Response Example ```json { "settings": { "locale": "en-US" } } ``` ``` -------------------------------- ### Get Locations Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves a list of Stripe Locations associated with the account. ```APIDOC ## getLocations ### Description Retrieves a list of Stripe Locations associated with the account. ### Method GET ### Endpoint /v1/locations ### Parameters #### Query Parameters - **params** (GetLocationsParams) - Optional - Parameters for filtering locations. ### Request Example ```json { "params": { "limit": 10 } } ``` ### Response #### Success Response (200) - **locations** (GetLocationsResultType) - A list of Stripe Locations. #### Response Example ```json { "locations": [ { "id": "loc_123", "name": "Main Store" } ] } ``` ``` -------------------------------- ### Get SDK Version Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/getSdkVersion.html Retrieves the current version of the Stripe Terminal React Native SDK. ```APIDOC ## GET getSdkVersion ### Description Retrieves the current version of the Stripe Terminal React Native SDK. ### Method GET ### Endpoint /getSdkVersion ### Parameters None ### Request Example None ### Response #### Success Response (200) - **version** (string) - The current version of the SDK. #### Response Example { "version": "1.2.3" } ``` -------------------------------- ### SetupIntent Namespace Overview Source: https://stripe.dev/stripe-terminal-react-native/api-reference/modules/SetupIntent.html Overview of the interfaces and type aliases defined within the SetupIntent namespace. ```APIDOC ## SetupIntent Namespace ### Interfaces - **SetupAttemptCardPresentDetails** - **SetupAttemptPaymentMethodDetails** ### Type Aliases - **SetupAttempt** - **Status** - **Type** - **Usage** ``` -------------------------------- ### Get Offline Status Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves the offline status of the reader. ```APIDOC ## getOfflineStatus ### Description Retrieves the offline status of the reader. ### Method GET ### Endpoint /v1/readers/offline_status ### Response #### Success Response (200) - **status** (OfflineStatus) - The offline status of the reader. #### Response Example ```json { "status": "online" } ``` ``` -------------------------------- ### Get Payment Status Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves the current payment status of the transaction. ```APIDOC ## getPaymentStatus ### Description Retrieves the current payment status of the transaction. ### Method GET ### Endpoint /v1/payments/status ### Response #### Success Response (200) - **status** (PaymentStatus) - The current payment status. #### Response Example ```json { "status": "succeeded" } ``` ``` -------------------------------- ### Get Connection Status Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves the current connection status of the reader. ```APIDOC ## getConnectionStatus ### Description Retrieves the current connection status of the reader. ### Method GET ### Endpoint /v1/readers/connection_status ### Response #### Success Response (200) - **status** (ConnectionStatus) - The current connection status. #### Response Example ```json { "status": "connected" } ``` ``` -------------------------------- ### SetupAttemptCardPresentDetails Interface Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/SetupIntent.SetupAttemptCardPresentDetails.html Details the structure and properties of the SetupAttemptCardPresentDetails interface. ```APIDOC ## Interface SetupAttemptCardPresentDetails ### Description Represents details about a card present attempt during a SetupIntent. ### Properties #### emvAuthData - **emvAuthData** (string) - The EMV authorization data. #### generatedCard - **generatedCard** (string) - The identifier for the generated card. ``` -------------------------------- ### Get Connected Reader Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Retrieves information about the currently connected reader. ```APIDOC ## getConnectedReader ### Description Retrieves information about the currently connected reader. ### Method GET ### Endpoint /v1/readers/connected ### Response #### Success Response (200) - **reader** (Reader.Type) - Information about the connected reader. #### Response Example ```json { "reader": { "id": "rdR_1J...", "label": "Terminal 1", "status": "connected" } } ``` ``` -------------------------------- ### SetupAttempt Type Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/SetupIntent.SetupAttempt.html Details the structure and properties of the SetupAttempt object. ```APIDOC ## Type Alias SetupAttempt type SetupAttempt = { applicationId?: string; created?: string; customer?: string; id: string; livemode: boolean; onBehalfOfId?: string; paymentMethodDetails: SetupAttemptPaymentMethodDetails; paymentMethodId?: string; setupIntentId?: string; status: string; usage?: Usage; } ### Properties - **applicationId** (string) - Optional - The ID of the application that created the SetupAttempt. - **created** (string) - Optional - The time at which the SetupAttempt was created. - **customer** (string) - Optional - The Customer associated with the SetupAttempt. - **id** (string) - Required - Unique identifier for the SetupAttempt. - **livemode** (boolean) - Required - Indicates if the SetupAttempt is in live mode. - **onBehalfOfId** (string) - Optional - The ID of the connected account on behalf of which the SetupAttempt was created. - **paymentMethodDetails** (SetupAttemptPaymentMethodDetails) - Required - Details about the payment method used for the SetupAttempt. - **paymentMethodId** (string) - Optional - The ID of the PaymentMethod associated with the SetupAttempt. - **setupIntentId** (string) - Optional - The ID of the SetupIntent associated with the SetupAttempt. - **status** (string) - Required - The status of the SetupAttempt. - **usage** (Usage) - Optional - Indicates the intended usage of the SetupAttempt. ``` -------------------------------- ### Initialize Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Initializes the Stripe Terminal SDK with the provided parameters. This must be called before using other SDK methods. ```APIDOC ## initialize ### Description Initializes the Stripe Terminal SDK with the provided parameters. This must be called before using other SDK methods. ### Method POST ### Endpoint /v1/initialize ### Parameters #### Request Body - **params** (InternalInitParams) - Required - Initialization parameters. ### Request Example ```json { "params": { "publishableKey": "pk_test_...". "locationId": "loc_123" } } ``` ### Response #### Success Response (200) - **result** (InitializeResultNativeType) - The result of the initialization. #### Response Example ```json { "result": { "initialized": true } } ``` ``` -------------------------------- ### ProcessSetupIntentParams Type Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/ProcessSetupIntentParams.html Defines the parameters for processing a SetupIntent, which is used to set up a payment method for future use. ```APIDOC ## Type Alias ProcessSetupIntentParams This type alias defines the parameters required and optional for processing a SetupIntent. ### Properties - **allowRedisplay** (AllowRedisplay) - Optional - Specifies whether to allow redisplaying the payment method. - **collectionReason** (CollectionReason) - Optional - The reason for collecting the payment method. - **customerCancellation** (CustomerCancellation) - Optional - Configuration for customer cancellation. - **motoConfiguration** (MotoConfiguration) - Optional - Configuration for MOTO (Mail Order, Telephone Order) transactions. - **setupIntent** (SetupIntent.Type) - Required - The SetupIntent object to process. ### Request Example ```json { "setupIntent": { "id": "seti_12345", "client_secret": "pi_12345_secret_67890" }, "allowRedisplay": "always", "collectionReason": "subscription", "customerCancellation": { "mode": "cancel" }, "motoConfiguration": { "motoApiVersion": "2020-03-27" } } ``` ### Response Example (Success) ```json { "status": "succeeded" } ``` ### Error Handling - **InvalidRequestError**: If the provided parameters are invalid. - **APIError**: If there is an issue with the Stripe API. ``` -------------------------------- ### CreateSetupIntentParams Type Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/CreateSetupIntentParams.html Defines the parameters for creating a SetupIntent in the Stripe Terminal React Native SDK. ```APIDOC ## Type Alias CreateSetupIntentParams type CreateSetupIntentParams = { customer?: string; description?: string; metadata?: Record; onBehalfOf?: string; paymentMethodTypes?: string[]; usage?: string; } ### Properties - **customer** (string) - Optional - The ID of the Customer to attach the SetupIntent to. - **description** (string) - Optional - An arbitrary string that you can use to identify this SetupIntent. - **metadata** (Record) - Optional - A set of key-value pairs that you can attach to a SetupIntent object. - **onBehalfOf** (string) - Optional - The ID of the connected account that orders generated by this SetupIntent will be attributed to. - **paymentMethodTypes** (string[]) - Optional - An array of strings representing the payment method types that the SetupIntent can use. - **usage** (string) - Optional - Indicates how the SetupIntent will be used. Possible values are 'one_time' or 'recurring'. ``` -------------------------------- ### ConfirmSetupIntentMethodParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/ConfirmSetupIntentMethodParams.html Details the structure and properties of the ConfirmSetupIntentMethodParams type alias, used for confirming SetupIntents. ```APIDOC ## Type Alias ConfirmSetupIntentMethodParams ### Description Represents the parameters required to confirm a SetupIntent. ### Properties #### setupIntent - **setupIntent** (SetupIntent.Type) - Required - The SetupIntent object to confirm. ``` -------------------------------- ### CollectSetupIntentPaymentMethodParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/CollectSetupIntentPaymentMethodParams.html Defines the structure of the parameters object used when collecting a payment method for a SetupIntent. ```APIDOC ## Type Alias: CollectSetupIntentPaymentMethodParams ### Description Defines the parameters required to collect a payment method for a SetupIntent in the Stripe Terminal React Native SDK. ### Properties - **setupIntent** (SetupIntent.Type) - Required - The SetupIntent object to be used for the collection. - **allowRedisplay** (AllowRedisplay) - Optional - Configuration for whether the payment method can be redisplayed. - **collectionReason** (CollectionReason) - Optional - The reason for collecting the payment method. - **customerCancellation** (CustomerCancellation) - Optional - Configuration for handling customer cancellation. - **motoConfiguration** (MotoConfiguration) - Optional - Configuration for Mail Order/Telephone Order (MOTO) transactions. ``` -------------------------------- ### UseStripeSdk Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/UseStripeSdk.html Documentation for the UseStripeSdk type alias, including its properties. ```APIDOC ## Type Alias UseStripeSdk ### Description Represents the configuration options for the Stripe SDK. ### Properties #### `type` (string) - Optional - A string representing the type of the SDK configuration. ``` -------------------------------- ### Initialize StripeTerminalProvider with AppsOnDevicesConnectionTokenProvider Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/AppsOnDevicesConnectionTokenProvider.html Use this provider to enable token generation directly on the device. This feature requires private preview access and is limited to Android. ```typescript import { AppsOnDevicesConnectionTokenProvider } from '@stripe/stripe-terminal-react-native'; ``` -------------------------------- ### Create Payment Intent Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Creates a PaymentIntent on Stripe. This is the first step in processing a payment. ```APIDOC ## createPaymentIntent ### Description Creates a PaymentIntent on Stripe. This is the first step in processing a payment. ### Method POST ### Endpoint /v1/payment_intents ### Parameters #### Request Body - **params** (CreatePaymentIntentParams) - Required - Parameters for creating the PaymentIntent. ### Request Example ```json { "params": { "amount": 1000, "currency": "usd" } } ``` ### Response #### Success Response (200) - **paymentIntent** (PaymentIntentResultType) - The created PaymentIntent object. #### Response Example ```json { "paymentIntent": { "id": "pi_1J...", "amount": 1000, "currency": "usd", "status": "requires_payment_method" } } ``` ``` -------------------------------- ### setTapToPayUxConfiguration Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Configures the user experience for Tap to Pay on mobile. ```APIDOC ## setTapToPayUxConfiguration ### Description Configures the user experience for Tap to Pay on mobile. ### Method POST ### Endpoint /v1/terminal/tap_to_pay_ux_configuration ### Parameters #### Request Body - **params** (TapToPayUxConfiguration) - Required - An object containing the Tap to Pay UX configuration. ### Request Example ```json { "params": { "card_display_format": "receipt", "title_override": "Pay with card" } } ``` ### Response #### Success Response (200) - **error** (StripeError) - An error object if the configuration failed, otherwise null. #### Response Example ```json { "error": null } ``` ``` -------------------------------- ### DiscoverAppsOnDevicesParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/DiscoverAppsOnDevicesParams.html Defines the parameters required to initiate the discovery of apps on devices. ```APIDOC ## Type Alias: DiscoverAppsOnDevicesParams ### Description Defines the configuration object used to specify the discovery method for apps on devices. ### Properties - **discoveryMethod** (string) - Required - Must be set to "appsOnDevices". ``` -------------------------------- ### InitParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/InitParams.html Defines the structure for initialization parameters, including optional logging level. ```APIDOC ## Type Alias InitParams ### Description Represents the parameters used for initializing the Stripe Terminal React Native SDK. ### Type Definition ```typescript type InitParams = { logLevel?: LogLevel; } ``` ### Properties #### `logLevel` (Optional) - **Type**: `LogLevel` - **Description**: Specifies the logging level for the SDK. This is an optional parameter. ``` -------------------------------- ### SetupIntentResultType Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/SetupIntentResultType.html Defines the union type for the result of a SetupIntent operation, handling both success and error scenarios. ```APIDOC ## SetupIntentResultType ### Description A type alias representing the result of a SetupIntent operation. It is a union type that either contains a successful SetupIntent object or a StripeError object. ### Structure - **{ error?: undefined; setupIntent: SetupIntent.Type }** - Represents a successful operation. - **{ error: StripeError; setupIntent?: undefined }** - Represents a failed operation. ``` -------------------------------- ### EasyConnectTapToPayParams Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/EasyConnectTapToPayParams.html Parameters for configuring Tap to Pay connections. ```APIDOC ## Type Alias EasyConnectTapToPayParams ### Description Parameters for configuring Tap to Pay connections. ### Type ```typescript type EasyConnectTapToPayParams = { autoReconnectOnUnexpectedDisconnect?: boolean; discoveryMethod: "tapToPay"; locationId: string; merchantDisplayName?: string; onBehalfOf?: string; simulated?: boolean; tosAcceptancePermitted?: boolean; } ``` ### Properties #### `Optional` autoReconnectOnUnexpectedDisconnect - **Type**: boolean - **Description**: Automatically reconnects if the connection is unexpectedly lost. #### discoveryMethod - **Type**: "tapToPay" - **Description**: Specifies the discovery method as Tap to Pay. #### locationId - **Type**: string - **Description**: The ID of the Stripe Location associated with this terminal. #### `Optional` merchantDisplayName - **Type**: string - **Description**: The name of the merchant to display to the user. #### `Optional` onBehalfOf - **Type**: string - **Description**: The ID of the connected account on behalf of which the request is being made. #### `Optional` simulated - **Type**: boolean - **Description**: Enables simulated mode for testing purposes. #### `Optional` tosAcceptancePermitted - **Type**: boolean - **Description**: Indicates whether the user has permitted the acceptance of Terms of Service. ``` -------------------------------- ### Initialize Stripe Terminal Hook Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/useStripeTerminal.html Use the useStripeTerminal hook to access terminal functionality and handle reader discovery and update progress events. ```javascript const { discoverReaders } = useStripeTerminal({ onUpdateDiscoveredReaders: (readers) => { setDisoveredReaders(readers) } onDidReportReaderSoftwareUpdateProgress: (progress) => { setCurrentProgress(progress) } }) ``` -------------------------------- ### FINISH_INSTALLING_UPDATE Variable Source: https://stripe.dev/stripe-terminal-react-native/api-reference/variables/FINISH_INSTALLING_UPDATE.html Information about the FINISH_INSTALLING_UPDATE variable within the Stripe Terminal React Native SDK. ```APIDOC ## Variable FINISH_INSTALLING_UPDATE ### Description Represents the state or status related to finishing an update installation. ### Type `any` ### Usage This variable is likely used internally by the Stripe Terminal React Native SDK to manage the update process. ``` -------------------------------- ### ConnectAppsOnDevicesParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/ConnectAppsOnDevicesParams.html Defines the parameters required to initiate a connection to a reader using the appsOnDevices discovery method. ```APIDOC ## ConnectAppsOnDevicesParams ### Description Type alias used to define the parameters for connecting to a reader via the appsOnDevices discovery method. ### Properties - **discoveryMethod** (string) - Required - Must be set to "appsOnDevices". - **reader** (Reader.Type) - Required - The reader instance to connect to. ``` -------------------------------- ### Stripe Terminal Methods Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/useStripeTerminal.html A comprehensive list of methods available for interacting with Stripe Terminal readers, including connection management, payment processing, and reader configuration. ```APIDOC ## Stripe Terminal Methods ### Description Methods provided by the useStripeTerminal hook to manage the lifecycle of Stripe Terminal readers and perform payment operations. ### Methods - **cancelPaymentIntent(params: CancelPaymentMethodParams)**: Cancels a payment intent. - **cancelSetupIntent(params: CancelSetupIntentMethodParams)**: Cancels a setup intent. - **collectData(params: CollectDataParams)**: Collects data from the reader. - **collectInputs(params: ICollectInputsParameters)**: Collects inputs from the reader. - **collectPaymentMethod(params: CollectPaymentMethodParams)**: Collects a payment method for a payment intent. - **confirmPaymentIntent(param: ConfirmPaymentMethodParams)**: Confirms a payment intent. - **connectReader(params: ConnectReaderParams)**: Connects to a specific reader. - **createPaymentIntent(params: CreatePaymentIntentParams)**: Creates a new payment intent. - **createSetupIntent(params: CreateSetupIntentParams)**: Creates a new setup intent. - **discoverReaders(params: DiscoverReadersParams)**: Initiates the discovery of available readers. - **processPaymentIntent(param: ProcessPaymentIntentParams)**: Processes a payment intent. - **processRefund(params: RefundParams)**: Processes a refund. - **retrievePaymentIntent(clientSecret: string)**: Retrieves an existing payment intent. - **retrieveSetupIntent(clientSecret: string)**: Retrieves an existing setup intent. ``` -------------------------------- ### useStripeTerminal Source: https://stripe.dev/stripe-terminal-react-native/api-reference/index.html The useStripeTerminal hook provides access to the Stripe Terminal SDK instance within functional components that are descendants of StripeTerminalProvider. ```APIDOC ## useStripeTerminal ### Description A React hook to access the Stripe Terminal SDK instance provided by `StripeTerminalProvider`. ### Usage Call `useStripeTerminal()` within a functional component that is a child of `StripeTerminalProvider`. ### Returns - **StripeTerminalSdkType** - An object containing methods to interact with the Stripe Terminal SDK. ### Example ```jsx import { useStripeTerminal } from '@stripe/stripe-terminal-react-native'; function MyComponent() { const { discoverReaders, connectReader, collectPaymentMethod } = useStripeTerminal(); // Use the SDK methods here const handleDiscover = async () => { const readers = await discoverReaders({ // discovery parameters }); // ... }; return ( ); } ``` ``` -------------------------------- ### Type Alias: WechatPayDisplayQrCode Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/WechatPayDisplayQrCode.html Defines the properties available for the WechatPayDisplayQrCode object. ```APIDOC ## Type Alias: WechatPayDisplayQrCode ### Description Represents the data structure for displaying a WeChat Pay QR code. ### Properties - **data** (string) - Optional - The raw data for the QR code. - **hostedInstructionsUrl** (string) - Optional - URL to the hosted instructions page. - **imageDataUrl** (string) - Optional - Data URL for the QR code image. - **imageUrlPng** (string) - Optional - URL for the PNG version of the QR code image. - **imageUrlSvg** (string) - Optional - URL for the SVG version of the QR code image. ``` -------------------------------- ### Type Alias: TapZoneFront Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/TapZoneFront.html Defines the structure for the front tap zone configuration, including optional bias parameters. ```APIDOC ## Type Alias: TapZoneFront ### Description Represents the configuration for the front tap zone in the Stripe Terminal React Native SDK. ### Properties - **indicator** (string) - Required - Must be set to "front". - **xBias** (number) - Optional - The horizontal bias for the tap zone. - **yBias** (number) - Optional - The vertical bias for the tap zone. ``` -------------------------------- ### Reader Namespace Overview Source: https://stripe.dev/stripe-terminal-react-native/api-reference/modules/Reader.html Overview of the Reader namespace components, including platform support and available type definitions. ```APIDOC ## Reader Namespace ### Description The Reader namespace provides interfaces and type definitions for interacting with Stripe Terminal readers in a React Native environment. ### Platforms - **Android** - **IOS** ### Type Aliases - **Accessibility** - **BatteryLevel** - **BatteryStatus** - **ConnectionStatus** - **DeviceType** - **DisconnectReason** - **DiscoveryMethod** - **DisplayMessage** - **EstimatedUpdateTime** - **InputOptions** - **NetworkStatus** - **ReaderSettings** - **ReaderSettingsParameters** - **ReaderSupportParams** - **ReaderSupportResult** - **ReaderTextToSpeechStatus** - **SimulateUpdateType** - **SoftwareUpdate** - **Type** ``` -------------------------------- ### simulateReaderUpdate Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Simulates an update on the reader. ```APIDOC ## simulateReaderUpdate ### Description Simulates an update on the reader. ### Method POST ### Endpoint /v1/terminal/simulate_reader_update ### Parameters #### Request Body - **update** (SimulateUpdateType) - Required - The type of update to simulate. ### Request Example ```json { "update": { "type": "available" } } ``` ### Response #### Success Response (200) - **void** - Indicates a successful update simulation. #### Response Example ```json {} ``` ``` -------------------------------- ### START_READER_RECONNECT Constant Source: https://stripe.dev/stripe-terminal-react-native/api-reference/variables/START_READER_RECONNECT.html The START_READER_RECONNECT constant is used to indicate the action of reconnecting to a reader. ```APIDOC ## START_READER_RECONNECT ### Description This constant is of type `any` and is used within the Stripe Terminal React Native SDK, likely to signify the initiation of a reader reconnection process. ### Type `any` ``` -------------------------------- ### setSimulatedCard Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Simulates a card being presented to the reader. ```APIDOC ## setSimulatedCard ### Description Simulates a card being presented to the reader. ### Method POST ### Endpoint /v1/terminal/simulate_card ### Parameters #### Request Body - **cardNumber** (string) - Required - The card number to simulate. ### Request Example ```json { "cardNumber": "4242424242424242" } ``` ### Response #### Success Response (200) - **error** (StripeError) - An error object if the simulation failed, otherwise null. #### Response Example ```json { "error": null } ``` ``` -------------------------------- ### CreatePaymentIntentParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/CreatePaymentIntentParams.html Defines the parameters required to create a PaymentIntent, including amount, currency, and various optional configuration fields. ```APIDOC ## CreatePaymentIntentParams ### Description Defines the configuration object used to create a PaymentIntent in the Stripe Terminal React Native SDK. ### Parameters - **amount** (number) - Required - The amount to be charged. - **currency** (string) - Required - The three-letter ISO currency code. - **applicationFeeAmount** (number) - Optional - The amount of the application fee. - **captureMethod** ("automatic" | "manual") - Optional - How the payment should be captured. - **customer** (string) - Optional - The ID of the customer associated with the payment. - **description** (string) - Optional - An arbitrary string to be displayed on the customer's statement. - **metadata** (Record) - Optional - A set of key-value pairs for additional information. - **offlineBehavior** ("prefer_online" | "require_online" | "force_offline") - Optional - Defines behavior when offline. - **onBehalfOf** (string) - Optional - The account for which the funds are being collected. - **paymentMethodOptions** (PaymentMethodOptions) - Optional - Configuration for payment methods. - **receiptEmail** (string) - Optional - Email address for the receipt. - **setupFutureUsage** ("off_session" | "on_session") - Optional - Indicates if the payment method should be saved for future use. - **statementDescriptor** (string) - Optional - Text to appear on the statement. - **statementDescriptorSuffix** (string) - Optional - Suffix for the statement descriptor. - **transferDataDestination** (string) - Optional - The destination account for the transfer. - **transferGroup** (string) - Optional - A string that identifies the transfer group. ``` -------------------------------- ### useStripeTerminal Hook Source: https://stripe.dev/stripe-terminal-react-native/api-reference/functions/useStripeTerminal.html The `useStripeTerminal` hook provides access to all Stripe Terminal SDK methods and the current connection state. It can optionally accept `UserCallbacks` as props. ```APIDOC ## Function useStripeTerminal ### Description The `useStripeTerminal` hook provides access to all available SDK methods as well as the state of the current connection. ### Parameters * `Optional` props: UserCallbacks ### Returns An object containing the following methods and properties: - **cancelCollectData**: () => Promise<{ error?: StripeError }> - **cancelCollectInputs**: () => Promise<{ error?: StripeError }> - **cancelCollectPaymentMethod**: () => Promise<{ error?: StripeError }> - **cancelCollectSetupIntent**: () => Promise<{ error?: StripeError }> - **cancelConfirmPaymentIntent**: () => Promise<{ error?: StripeError }> - **cancelConfirmSetupIntent**: () => Promise<{ error?: StripeError }> - **cancelDiscovering**: () => Promise<{ error?: StripeError }> - **cancelEasyConnect**: () => Promise<{ error?: StripeError }> - **cancelInstallingUpdate**: () => Promise<{ error?: StripeError }> - **cancelPaymentIntent**: (params: CancelPaymentMethodParams) => Promise - **cancelProcessPaymentIntent**: () => Promise<{ error?: StripeError }> - **cancelProcessRefund**: () => Promise<{ error?: StripeError }> - **cancelProcessSetupIntent**: () => Promise<{ error?: StripeError }> - **cancelReaderReconnection**: () => Promise<{ error?: StripeError }> - **cancelSetupIntent**: (params: CancelSetupIntentMethodParams) => Promise - **clearCachedCredentials**: () => Promise<{ error?: StripeError }> - **clearReaderDisplay**: () => Promise - **collectData**: (params: CollectDataParams) => Promise - **collectInputs**: (params: ICollectInputsParameters) => Promise - **collectPaymentMethod**: (params: CollectPaymentMethodParams) => Promise - **collectSetupIntentPaymentMethod**: (params: CollectSetupIntentPaymentMethodParams) => Promise - **confirmPaymentIntent**: (param: ConfirmPaymentMethodParams) => Promise - **confirmSetupIntent**: (params: ConfirmSetupIntentMethodParams) => Promise - **connectedReader**: Reader.Type | null | undefined - **connectReader**: (params: ConnectReaderParams) => Promise - **createPaymentIntent**: (params: CreatePaymentIntentParams) => Promise - **createSetupIntent**: (params: CreateSetupIntentParams) => Promise - **disconnectReader**: () => Promise - **discoveredReaders**: Reader.Type[] - **discoverReaders**: (params: DiscoverReadersParams) => Promise<{ error?: StripeError }> - **easyConnect**: (params: EasyConnectParams) => Promise - **emitter**: EventEmitter | undefined - **getConnectedReader**: () => Promise - **getConnectionStatus**: () => Promise - **getIsInitialized**: () => boolean - **getLocations**: (params: GetLocationsParams) => Promise - **getNativeSdkVersion**: () => Promise - **getOfflineStatus**: () => Promise - **getPaymentStatus**: () => Promise - **getReaderSettings**: () => Promise - **initialize**: () => Promise - **installAvailableUpdate**: () => Promise<{ error?: StripeError }> - **isInitialized**: boolean - **loading**: boolean - **print**: (content: string) => Promise<{ error?: StripeError }> - **processPaymentIntent**: (param: ProcessPaymentIntentParams) => Promise - **processRefund**: (params: RefundParams) => Promise - **processSetupIntent**: (params: ProcessSetupIntentParams) => Promise - **rebootReader**: () => Promise - **retrievePaymentIntent**: (clientSecret: string) => Promise - **retrieveSetupIntent**: (clientSecret: string) => Promise - **setReaderDisplay**: (cart: Cart) => Promise<{ error?: StripeError }> - **setReaderSettings**: (params: ReaderSettingsParameters) => Promise - **setSimulatedCard**: (cardNumber: string) => Promise<{ error?: StripeError }> - **setSimulatedCollectInputsResult**: (simulatedCollectInputsBehavior: string) => Promise<{ error?: StripeError }> - **setSimulatedOfflineMode**: (simulatedOffline: boolean) => Promise<{ error?: StripeError }> - **setTapToPayUxConfiguration**: (params: TapToPayUxConfiguration) => Promise<{ error?: StripeError }> - **simulateReaderUpdate**: (update: SimulateUpdateType) => Promise<{ error?: StripeError }> - **supportsReadersOfType**: (params: ReaderSupportParams) => Promise ``` -------------------------------- ### InputOptions Type Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/Reader.InputOptions.html The InputOptions type defines the allowed methods for card insertion. ```APIDOC ## Type Alias InputOptions ### Description Defines the possible methods for card input when interacting with the Stripe Terminal. ### Type Union of string literals ### Possible Values - `"insertCard"`: Represents inserting a card into the reader. - `"swipeCard"`: Represents swiping a card through the reader. - `"tapCard"`: Represents tapping a card on the reader. ``` -------------------------------- ### Interface IInput Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/IInput.html Definition of the IInput interface properties for configuring input forms. ```APIDOC ## Interface IInput ### Description The IInput interface defines the configuration schema for input forms used in the Stripe Terminal React Native SDK. ### Properties - **description** (string | null) - Optional - A description for the input form. - **formType** (FormType) - Required - The type of form being displayed. - **required** (boolean | null) - Optional - Indicates if the input is mandatory. - **selectionButtons** (ISelectionButton[]) - Optional - A list of selection buttons to display. - **skipButtonText** (string | null) - Optional - Custom text for the skip button. - **submitButtonText** (string | null) - Optional - Custom text for the submit button. - **title** (string) - Required - The title of the input form. - **toggles** (IToggle[] | null) - Optional - A list of toggles to display. ``` -------------------------------- ### Type Alias: TapZoneDefault Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/TapZoneDefault.html Defines the structure for the default tap zone indicator. ```APIDOC ## Type Alias: TapZoneDefault ### Description Represents the default configuration for a tap zone indicator. ### Properties - **indicator** (string) - Required - Must be set to "default". ``` -------------------------------- ### ConnectUsbReaderParams Type Alias Source: https://stripe.dev/stripe-terminal-react-native/api-reference/types/ConnectUsbReaderParams.html Defines the parameters required for connecting a USB reader. ```APIDOC ## Type Alias ConnectUsbReaderParams ### Description Defines the parameters for connecting a USB reader to Stripe Terminal. ### Type Definition ```typescript type ConnectUsbReaderParams = { autoReconnectOnUnexpectedDisconnect?: boolean; discoveryMethod: "usb"; locationId: string; onPaymentMethodSelectionRequired?: PaymentMethodSelectionHandler; onQrCodeDisplayRequired?: QrCodeDisplayHandler; reader: Reader.Type; } ``` ### Properties #### `Optional` autoReconnectOnUnexpectedDisconnect - **Type**: `boolean` - **Description**: If true, the SDK will attempt to automatically reconnect to the reader if the connection is unexpectedly lost. #### discoveryMethod - **Type**: `"usb"` - **Description**: Specifies the discovery method, which must be 'usb' for USB readers. #### locationId - **Type**: `string` - **Description**: The unique identifier for the physical location where the reader is being used. #### `Optional` onPaymentMethodSelectionRequired - **Type**: `PaymentMethodSelectionHandler` - **Description**: A callback function that is invoked when the reader requires the user to select a payment method. #### `Optional` onQrCodeDisplayRequired - **Type**: `QrCodeDisplayHandler` - **Description**: A callback function that is invoked when the reader requires a QR code to be displayed (e.g., for certain payment flows). #### reader - **Type**: `Reader.Type` - **Description**: Represents the specific USB reader object to connect to. ``` -------------------------------- ### setReaderSettings Source: https://stripe.dev/stripe-terminal-react-native/api-reference/interfaces/StripeTerminalSdkType.html Configures the settings for the reader. ```APIDOC ## setReaderSettings ### Description Configures the settings for the reader. ### Method POST ### Endpoint /v1/terminal/reader_settings ### Parameters #### Request Body - **params** (ReaderSettingsParameters) - Required - An object containing the reader settings. ### Request Example ```json { "params": { "payment_method_options": { "card_present": { "capture_method": "manual" } } } } ``` ### Response #### Success Response (200) - **ReaderSettings** (object) - The updated reader settings. #### Response Example ```json { "payment_method_options": { "card_present": { "capture_method": "manual" } } } ``` ```