### handleNextActionForSetup(setupIntentClientSecret: string, returnURL?: string): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/handleNextActionForSetup.html Handles any nextAction required to authenticate the SetupIntent. Call this method if you are confirming the SetupIntent on your backend and get a status of requires_action. ```APIDOC ## Function handleNextActionForSetup ### Description Handles any nextAction required to authenticate the SetupIntent. Call this method if you are confirming the SetupIntent on your backend and get a status of requires_action. ### Signature handleNextActionForSetup( setupIntentClientSecret: string, returnURL?: string, ): Promise ### Parameters - **setupIntentClientSecret** (string) - Required - The client secret associated with the SetupIntent. - **returnURL** (string) - Optional - An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation. ### Returns Promise ``` -------------------------------- ### initPaymentSheet Source: https://stripe.dev/stripe-react-native/api-reference/functions/initPaymentSheet.html Documentation for the initPaymentSheet function, which initializes the PaymentSheet with setup parameters and returns a promise with the initialization result. ```APIDOC ## initPaymentSheet(params: PaymentSheet.SetupParams): Promise ### Description Initializes the PaymentSheet with the provided setup parameters. This function must be called before presenting the payment sheet. ### Method Function ### Signature `initPaymentSheet(params: PaymentSheet.SetupParams): Promise` ### Parameters - **params** (PaymentSheet.SetupParams) - Required - The setup parameters for the PaymentSheet. ### Returns - **Promise** - A promise that resolves to the result of the initialization. ``` -------------------------------- ### openPlatformPaySetup() Source: https://stripe.dev/stripe-react-native/api-reference/functions/openPlatformPaySetup.html Opens the platform's payment setup interface for adding credit cards. iOS only; no-op on Android and on devices without Apple Pay support. ```APIDOC ## openPlatformPaySetup() ### Description Opens the platform's payment setup interface for adding credit cards. This method transfers control to the Wallet app on iPhone or to the Settings app on iPad. On Android or devices without Apple Pay support, this method does nothing. ### Method Function ### Signature `openPlatformPaySetup(): Promise` ### Parameters None ### Returns - `Promise` - A promise that resolves when the operation completes. ### Platform Specifics - **iOS**: Moves the user to the Wallet app (iPhone) or Settings app (iPad) to add credit cards. - **Android**: No-op (does nothing). - **Unsupported devices**: No-op (does nothing). ### Example ```typescript import { openPlatformPaySetup } from '@stripe/stripe-react-native'; await openPlatformPaySetup(); ``` ``` -------------------------------- ### PaymentSheet.SetupParamsBase Source: https://stripe.dev/stripe-react-native/api-reference/types/PaymentSheet.SetupParamsBase.html Configuration parameters for PaymentSheet setup flow, including custom payment method configuration, card scanner behavior, and terms display settings. ```APIDOC ## PaymentSheet.SetupParamsBase ### Description Configuration parameters for PaymentSheet setup flow, including custom payment method configuration, card scanner behavior, and terms display settings. ### Properties #### `customPaymentMethodConfiguration` (Optional) - Type: `PaymentSheet.CustomPaymentMethodConfiguration` - Description: Configuration for custom payment methods in PaymentSheet. #### `opensCardScannerAutomatically` (Optional) - Type: `boolean` - Description: By default, PaymentSheet offers a card scan button within the new card entry form. When set to `true`, the card entry form will initialize with the card scanner already open. Defaults to `false`. #### `termsDisplay` (Optional) - Type: `{ [key: string]: PaymentSheet.TermsDisplay }` - Description: A map of payment method types to their terms display configuration. Controls whether legal agreements (e.g. card mandate disclaimers) are shown for each payment method type. Keys are snake_case payment method type strings (e.g. "card", "us_bank_account"). See https://docs.stripe.com/api/payment_methods/object#payment_method_object-type for the full list of values. Values are `TermsDisplay.AUTOMATIC` or `TermsDisplay.NEVER`. If not set, defaults to `TermsDisplay.AUTOMATIC` for all payment method types. Example: `{ card: TermsDisplay.NEVER }` to hide the card mandate disclaimer. ### Note This is a private preview API and will have no effect unless your Stripe account is enrolled in the private preview. ``` -------------------------------- ### PaymentSheet.SetupParamsBase Source: https://stripe.dev/stripe-react-native/api-reference/types/PaymentSheet.SetupParamsBase.html This snippet documents the PaymentSheet.SetupParamsBase type, which is used to configure the PaymentSheet for setup intents. It lists all the properties that can be set to customize the PaymentSheet's behavior and appearance. ```APIDOC ## PaymentSheet.SetupParamsBase ### Description Configuration parameters for setting up the PaymentSheet for setup intents. This type defines the properties you can use to customize the PaymentSheet's behavior and appearance. ### Type Declaration #### Properties - **merchantDisplayName** (string) - Required - Your customer-facing business name. On Android, this is required and cannot be an empty string. - **customerId** (string) - Optional - The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id - **customFlow** (boolean) - Optional - When set to true, separates out the payment method selection & confirmation steps. If true, you must call `confirmPaymentSheetPayment` on your own. Defaults to false. - **applePay** (PaymentSheet.ApplePayParams) - Optional - iOS only. Enable Apple Pay in the Payment Sheet by passing an ApplePayParams object. - **googlePay** (PaymentSheet.GooglePayParams) - Optional - Android only. Enable Google Pay in the Payment Sheet by passing a GooglePayParams object. - **link** (PaymentSheet.LinkParams) - Optional - Configuration for Link. - **style** (UserInterfaceStyle) - Optional - The color styling to use for PaymentSheet UI. Defaults to 'automatic'. - **returnURL** (string) - Optional - A URL that redirects back to your app that PaymentSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2. - **billingDetailsCollectionConfiguration** (PaymentSheet.BillingDetailsCollectionConfiguration) - Optional - Configuration for how billing details are collected during checkout. - **defaultBillingDetails** (BillingDetails) - Optional - PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. - **defaultShippingDetails** (AddressDetails) - Optional - The shipping information for the customer. If set, PaymentSheet will pre-populate the form fields with the values provided. This is used to display a "Billing address is same as shipping" checkbox if `defaultBillingDetails` is not provided. If `name` and `line1` are populated, it's also attached to the PaymentIntent during payment. - **allowsDelayedPaymentMethods** (boolean) - Optional - If true, allows payment methods that do not move money at the end of the checkout. Defaults to false. Some payment methods can't guarantee you will receive funds from your customer at the end of the checkout because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks for notifications on whether a payment has succeeded or not. - **appearance** (PaymentSheet.AppearanceParams) - Optional - Customizes the appearance of PaymentSheet. - **primaryButtonLabel** (string) - Optional - The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. - **removeSavedPaymentMethodMessage** (string) - Optional - Optional configuration to display a custom message when a saved payment method is removed. iOS only. - **preferredNetworks** (CardBrand[]) - Optional - The list of preferred networks that should be used to process payments made with a co-branded card. This value will only be used if your user hasn't selected a network themselves. - **paymentMethodOrder** (String[]) - Optional - By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer. You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types. See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods. Example: ["card", "external_paypal", "klarna"]. Note: If you omit payment methods from this list, they'll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored. - **allowsRemovalOfLastSavedPaymentMethod** (boolean) - Optional - This is an experimental feature that may be removed at any time. Defaults to true. If true, the customer can delete all saved payment methods. If false, the customer can't delete if they only have one saved payment method remaining. - **paymentMethodLayout** (PaymentSheet.PaymentMethodLayout) - Optional - Defines the layout orientations available for displaying payment methods in PaymentSheet. Note: Defaults to `Automatic` if not set. - **cardBrandAcceptance** (PaymentSheet.CardBrandAcceptance) - Optional - By default, PaymentSheet will accept all supported cards by Stripe. You can specify card brands PaymentSheet should block or allow payment for by providing an array of those card brands. Note: This is only a client-side solution. Note: Card brand filtering is not currently supported in Link. - **cardFundingFiltering** (PaymentSheet.CardFundingFiltering) - Optional - Configuration for filtering cards by funding type. ``` -------------------------------- ### PlatformPayButton usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/PlatformPayButton.html Renders the platform-specific wallet pay button (Apple Pay on iOS, Google Pay on Android). The example sets the onPress handler, button type, appearance, border radius, disabled state, and style. ```jsx ``` -------------------------------- ### ConnectPayouts usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectPayouts.html Use this component to render payout information for a connected account. It accepts CommonComponentProps and returns an Element. The example shows a basic usage with a style prop. ```jsx ``` -------------------------------- ### AddToWalletButton implementation Source: https://stripe.dev/stripe-react-native/api-reference/functions/AddToWalletButton.html An example of how to implement the AddToWalletButton component with required props like cardDetails, ephemeralKey, and an onComplete callback. ```jsx { Alert.alert( error ? error.code : 'Success', error ? error.message : 'Card was successfully added to the wallet.' ); }} /> ``` -------------------------------- ### ConfirmSetupIntentResult Source: https://stripe.dev/stripe-react-native/api-reference/types/ConfirmSetupIntentResult.html Type alias for the result of confirming a setup intent. It is a union of a success case with a setupIntent property and an error case with an error property. ```APIDOC ## Type Alias ConfirmSetupIntentResult ### Description Represents the result of a setup intent confirmation. It is a discriminated union that either contains a successful `setupIntent` or an `error`. ### Definition ```typescript ConfirmSetupIntentResult: | { setupIntent: SetupIntent.Result; error?: undefined } | { setupIntent?: undefined; error: StripeError } ``` ### Properties - **setupIntent** (`SetupIntent.Result`) - Present on success. The result of the setup intent. - **error** (`StripeError`) - Present on failure. The error that occurred during confirmation. ``` -------------------------------- ### ConnectAccountOnboarding usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectAccountOnboarding.html Renders the ConnectAccountOnboarding modal with a title, exit handler, step change handler, and collection options. The onExit callback is required and typically navigates back. The onStepChange callback receives a step change object. The collectionOptions specify which fields to collect and whether to include future requirements. ```tsx navigation.goBack()} onStepChange={({ step }) => console.log('Current step:', step)} collectionOptions={{ fields: 'currently_due', futureRequirements: 'include' }} /> ``` -------------------------------- ### StripeProvider usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/StripeProvider.html Wraps the app with StripeProvider, passing a publishable key, merchant identifier, and 3D Secure parameters. The threeDSecureParams object sets the background color to "#FFF" and a timeout of 5 seconds. ```jsx ``` -------------------------------- ### useConfirmSetupIntent Source: https://stripe.dev/stripe-react-native/api-reference/functions/useConfirmSetupIntent.html Documentation for the useConfirmSetupIntent hook, including its signature, parameters, and return type. ```APIDOC ## useConfirmSetupIntent ### Description A React hook that provides a `confirmSetupIntent` function to confirm a SetupIntent with the provided client secret and payment method data, along with a `loading` boolean indicating whether the confirmation is in progress. ### Signature ```typescript useConfirmSetupIntent(): { confirmSetupIntent: ( paymentIntentClientSecret: string, data: PaymentIntent.ConfirmParams, options?: PaymentMethod.CreateOptions, ) => Promise; loading: boolean; } ``` ### Parameters - **paymentIntentClientSecret** (string) - Required - The client secret of the SetupIntent to confirm. - **data** (PaymentIntent.ConfirmParams) - Required - The confirmation parameters for the SetupIntent. - **options** (PaymentMethod.CreateOptions) - Optional - Additional options for creating the payment method. ### Returns - **confirmSetupIntent** (function) - A function that confirms the SetupIntent and returns a Promise resolving to a `ConfirmSetupIntentResult`. - **loading** (boolean) - Indicates whether the confirmation request is in progress. ``` -------------------------------- ### ConnectPayouts Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectPayouts.html Documentation for the ConnectPayouts component function, including its signature, parameters, return type, and a usage example. ```APIDOC ## ConnectPayouts ### Description Displays payout information for the connected account. Shows payout history, schedules, and details. ### Signature `ConnectPayouts(__namedParameters: CommonComponentProps): Element` ### Parameters - **__namedParameters** (CommonComponentProps) - Required - Props for the component. ### Returns - **Element** - The rendered component. ### Example ```jsx ``` ``` -------------------------------- ### confirmSetupIntent Source: https://stripe.dev/stripe-react-native/api-reference/functions/confirmSetupIntent.html Documentation for the confirmSetupIntent function, including its signature, parameters, and return type. ```APIDOC ## confirmSetupIntent ### Description Confirms a SetupIntent with the provided client secret and parameters, returning a result object. ### Method Function ### Signature ```typescript confirmSetupIntent( paymentIntentClientSecret: string, params: PaymentIntent.ConfirmParams, options?: PaymentMethod.CreateOptions, ): Promise ``` ### Parameters - **paymentIntentClientSecret** (string) - Required - The client secret of the SetupIntent to confirm. - **params** (PaymentIntent.ConfirmParams) - Required - Parameters for confirming the SetupIntent. - **options** (PaymentMethod.CreateOptions) - Optional - Additional options for creating the payment method. Defaults to `{}`. ### Returns - **Promise** - A promise that resolves to the result of the confirmation. ``` -------------------------------- ### confirmLinkControllerSetupIntent(clientSecret: string): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/confirmLinkControllerSetupIntent.html Confirms a SetupIntent using the payment method from the most recent presentLinkController call. Must be called after a successful presentLinkController. Provide a fresh SetupIntent client secret for each confirmation; reusing a consumed secret will fail. ```APIDOC ## confirmLinkControllerSetupIntent ### Description Confirms a SetupIntent using the payment method from the most recent `presentLinkController` call. Must be called after a successful `presentLinkController`. Provide a fresh SetupIntent client secret for each confirmation; reusing a consumed secret will fail. ### Private Preview This API is in private preview and may change without notice. It will have no effect unless your Stripe account is enrolled in the private preview. ### Method Function ### Signature `confirmLinkControllerSetupIntent(clientSecret: string): Promise` ### Parameters - **clientSecret** (string) - Required - The client secret of the SetupIntent to confirm. ### Returns - **Promise** - A promise that resolves to the result of the confirmation. ``` -------------------------------- ### setupIntentClientSecretForCustomerAttach() Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/CustomerAdapter.html Creates a SetupIntent configured to attach a new payment method to a customer and returns its client secret. The method is optional to implement in the adapter. ```APIDOC ## setupIntentClientSecretForCustomerAttach() ### Description Creates a SetupIntent configured to attach a new payment method to a customer, then returns the client secret for the created SetupIntent. ### Method setupIntentClientSecretForCustomerAttach() ### Returns - Promise - A promise resolving to the client secret string. ``` -------------------------------- ### AuBECSDebitForm usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/AuBECSDebitForm.html Renders the AuBECSDebitForm component with companyName, onComplete callback, and style. The onComplete receives the value from the form. ```tsx onComplete(value)} style={{ width: '100%', height: 500 }} /> ``` -------------------------------- ### ConnectAccountOnboarding Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectAccountOnboarding.html Renders a full-screen modal for Connect account onboarding. Accepts configuration options and callbacks, and returns a React Element. ```APIDOC ## ConnectAccountOnboarding ### Description A full-screen modal component for Connect account onboarding. Guides connected accounts through the process of providing required information. ### Signature ```typescript ConnectAccountOnboarding( __namedParameters: { title?: string; onExit: () => void; onStepChange?: (stepChange: StepChange) => void; recipientTermsOfServiceUrl?: string; fullTermsOfServiceUrl?: string; privacyPolicyUrl?: string; collectionOptions?: CollectionOptions; } & Omit, ): Element ``` ### Parameters #### __namedParameters - **title** (string) - Optional - The title of the modal. - **onExit** (() => void) - Required - Callback invoked when the user exits the onboarding flow. - **onStepChange** ((stepChange: StepChange) => void) - Optional - Callback invoked when the current step changes. - **recipientTermsOfServiceUrl** (string) - Optional - URL to the recipient terms of service. - **fullTermsOfServiceUrl** (string) - Optional - URL to the full terms of service. - **privacyPolicyUrl** (string) - Optional - URL to the privacy policy. - **collectionOptions** (CollectionOptions) - Optional - Options for collecting information. - **style** (omitted) - Not used; inherited from CommonComponentProps but omitted. ### Returns - **Element** - The rendered React element. ### Platform Differences - **iOS**: Uses native modal with UIKit navigation bar. - **Android**: Uses React Native Modal with custom navigation bar. ### Example ```jsx navigation.goBack()} onStepChange={({ step }) => console.log('Current step:', step)} collectionOptions={{ fields: 'currently_due', futureRequirements: 'include' }} /> ``` ``` -------------------------------- ### retrieveSetupIntent(clientSecret: string): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/retrieveSetupIntent.html Retrieves a SetupIntent using the provided client secret. Returns a promise that resolves to a RetrieveSetupIntentResult. ```APIDOC ## retrieveSetupIntent(clientSecret: string): Promise ### Description Retrieves a SetupIntent using the provided client secret. Returns a promise that resolves to a RetrieveSetupIntentResult. ### Parameters - **clientSecret** (string) - Required - The client secret of the SetupIntent to retrieve. ### Returns - **Promise** - A promise that resolves to the result of the retrieval. ``` -------------------------------- ### confirmPlatformPaySetupIntent(clientSecret, params) Source: https://stripe.dev/stripe-react-native/api-reference/functions/confirmPlatformPaySetupIntent.html Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) to confirm a Stripe SetupIntent. Accepts the client secret of the SetupIntent and an object describing the Apple Pay and Google Pay configurations. ```APIDOC ## Function confirmPlatformPaySetupIntent ### Description Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe SetupIntent. ### Signature ```typescript confirmPlatformPaySetupIntent( clientSecret: string, params: PlatformPay.ConfirmParams, ): Promise ``` ### Parameters - **clientSecret** (string) - Required - The client secret of the SetupIntent. - **params** (PlatformPay.ConfirmParams) - Required - An object describing the Apple Pay and Google Pay configurations. ### Returns Promise An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields. ``` -------------------------------- ### provideSetupIntentClientSecret() Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/ClientSecretProvider.html Provides the SetupIntent client secret used when attaching a payment method to a customer. ```APIDOC ## provideSetupIntentClientSecret() ### Description Provides the `SetupIntent` client secret that is used when attaching a payment method to a customer. ### Method provideSetupIntentClientSecret ### Returns Promise ``` -------------------------------- ### useStripe() Source: https://stripe.dev/stripe-react-native/api-reference/functions/useStripe.html Documentation for the useStripe hook and its returned methods. ```APIDOC ## useStripe() ### Description Returns an object containing methods to interact with the Stripe SDK in a React Native application. This hook provides access to payment, setup, and payment sheet operations. ### Method useStripe ### Endpoint useStripe() ### Parameters None ### Returns - **retrievePaymentIntent** (function) - Retrieves a PaymentIntent with the given client secret. - Parameters: - clientSecret (string) - Required - The client secret of the PaymentIntent. - Returns: Promise - **retrieveSetupIntent** (function) - Retrieves a SetupIntent with the given client secret. - Parameters: - clientSecret (string) - Required - The client secret of the SetupIntent. - Returns: Promise - **confirmPayment** (function) - Confirms a PaymentIntent with the provided client secret and optional data. - Parameters: - paymentIntentClientSecret (string) - Required - The client secret of the PaymentIntent. - data (PaymentIntent.ConfirmParams) - Optional - Additional confirmation parameters. - options (PaymentMethod.CreateOptions) - Optional - Options for creating the payment method. - Returns: Promise - **createPaymentMethod** (function) - Creates a PaymentMethod with the provided data. - Parameters: - data (PaymentMethod.CreateParams) - Required - Parameters for creating the payment method. - options (PaymentMethod.CreateOptions) - Optional - Options for creating the payment method. - Returns: Promise - **handleNextAction** (function) - Handles the next action required for a PaymentIntent. - Parameters: - paymentIntentClientSecret (string) - Required - The client secret of the PaymentIntent. - returnURL (string) - Optional - The URL to return to after handling the action. - Returns: Promise - **handleNextActionForSetup** (function) - Handles the next action required for a SetupIntent. - Parameters: - setupIntentClientSecret (string) - Required - The client secret of the SetupIntent. - returnURL (string) - Optional - The URL to return to after handling the action. - Returns: Promise - **confirmSetupIntent** (function) - Confirms a SetupIntent with the provided client secret and data. - Parameters: - paymentIntentClientSecret (string) - Required - The client secret of the SetupIntent. - data (PaymentIntent.ConfirmParams) - Required - Confirmation parameters. - options (PaymentMethod.CreateOptions) - Optional - Options for creating the payment method. - Returns: Promise - **createTokenForCVCUpdate** (function) - Creates a token for updating the CVC of a card. - Parameters: - cvc (string) - Required - The CVC value. - Returns: Promise - **handleURLCallback** (function) - Handles a URL callback from a payment redirect. - Parameters: - url (string) - Required - The URL to handle. - Returns: Promise - **confirmPaymentSheetPayment** (function) - Confirms a payment sheet payment. - Returns: Promise - **presentPaymentSheet** (function) - Presents the payment sheet. - Parameters: - options (PaymentSheet.PresentOptions) - Optional - Options for presenting the payment sheet. - Returns: Promise - **initPaymentSheet** (function) - Initializes the payment sheet with the provided parameters. - Parameters: - params (PaymentSheet.SetupParams) - Required - Setup parameters for the payment sheet. - Returns: Promise - **createToken** (function) - Creates a token with the provided parameters. - Parameters: - params (Token.CreateParams) - Required - Parameters for creating the token. - Returns: Promise - **collectBankAccountForPayment** (function) - Collects bank account details for a PaymentIntent. - Parameters: - clientSecret (string) - Required - The client secret of the PaymentIntent. - params (PaymentMethod.CollectBankAccountParams) - Required - Parameters for collecting the bank account. - Returns: Promise - **collectBankAccountForSetup** (function) - Collects bank account details for a SetupIntent. - Parameters: - clientSecret (string) - Required - The client secret of the SetupIntent. - params (PaymentMethod.CollectBankAccountParams) - Required - Parameters for collecting the bank account. - Returns: Promise - **verifyMicrodepositsForPayment** (function) - Verifies microdeposits for a PaymentIntent. - Parameters: - clientSecret (string) - Required - The client secret of the PaymentIntent. - params (VerifyMicrodepositsParams) - Required - Parameters for verification. - Returns: Promise - **verifyMicrodepositsForSetup** (function) - Verifies microdeposits for a SetupIntent. - Parameters: - clientSecret (string) - Required - The client secret of the SetupIntent. - params (VerifyMicrodepositsParams) - Required - Parameters for verification. - Returns: Promise - **canAddCardToWallet** (function) - Checks if a card can be added to a wallet. - Parameters: - params (CanAddCardToWalletParams) - Required - Parameters for the check. - Returns: Promise - **collectBankAccountToken** (function) - Collects a bank account token. - Parameters: - clientSecret (string) - Required - The client secret. - params (CollectBankAccountTokenParams) - Optional - Parameters for collecting the token. - Returns: Promise - **collectFinancialConnectionsAccounts** (function) - Collects financial connections accounts. - Parameters: - clientSecret (string) - Required - The client secret. - params (CollectFinancialConnectionsAccountsParams) - Optional - Parameters for collecting accounts. - Returns: Promise - **resetPaymentSheetCustomer** (function) - Resets the payment sheet customer. - Returns: Promise - **isPlatformPaySupported** (function) - Checks if platform pay is supported. - Parameters: - params (object) - Optional - An object with an optional googlePay property. - googlePay (IsGooglePaySupportedParams) - Optional - Parameters for Google Pay support check. - Returns: Promise - **confirmPlatformPaySetupIntent** (function) - Confirms a platform pay setup intent. - Parameters: - clientSecret (string) - Required - The client secret. - params (PlatformPay.ConfirmParams) - Required - Confirmation parameters. - Returns: Promise - **confirmPlatformPayPayment** (function) - Confirms a platform pay payment. - Parameters: - clientSecret (string) - Required - The client secret. - params (PlatformPay.ConfirmParams) - Required - Confirmation parameters. - Returns: Promise - **dismissPlatformPay** (function) - Dismisses the platform pay sheet. - Returns: Promise - **createPlatformPayPaymentMethod** (function) - Creates a platform pay payment method. - Parameters: - params (PaymentMethodParams) - Required - Parameters for creating the payment method. - Returns: Promise - **createPlatformPayToken** (function) - Creates a platform pay token. - Parameters: - params (PaymentMethodParams) - Required - Parameters for creating the token. - Returns: Promise - **updatePlatformPaySheet** (function) - Updates the platform pay sheet. - Parameters: - params (object) - Required - An object with an applePay property. - applePay (object) - Required - Apple Pay update parameters. - cartItems (PlatformPay.CartSummaryItem[]) - Required - Cart summary items. - shippingMethods (ShippingMethod[]) - Required - Shipping methods. - errors (ApplePaySheetError[]) - Required - Errors. - Returns: Promise<{ error?: StripeError }> - **openPlatformPaySetup** (function) - Opens the platform pay setup. - Returns: Promise - **createRadarSession** (function) - Creates a Radar session. - Returns: Promise ### Example ```javascript const stripe = useStripe(); const { error } = await stripe.confirmPayment('client_secret'); ``` ``` -------------------------------- ### ConnectPaymentDetails usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectPaymentDetails.html Renders ConnectPaymentDetails with a payment ID and an onClose handler that hides the details view. The style prop is used to make the component fill available space. ```tsx setShowDetails(false)} style={{ flex: 1 }} /> ``` -------------------------------- ### initLinkController(params: LinkController.Configuration): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/initLinkController.html Initializes the LinkController with the provided configuration. Must be called before presentLinkController. This API is in private preview and may change without notice. ```APIDOC ## initLinkController(params: LinkController.Configuration): Promise ### Description Initializes the LinkController with the provided configuration. Must be called before presentLinkController. This API is in private preview and may change without notice. ### Method Function ### Signature initLinkController(params: LinkController.Configuration): Promise ### Parameters - **params** (LinkController.Configuration) - Required - The configuration for the LinkController. ### Returns Promise ``` -------------------------------- ### CardField component example Source: https://stripe.dev/stripe-react-native/api-reference/functions/CardField.html Basic usage of the CardField component. Disables the postal code field, logs card details on change, and sets the card state. The style prop sets the component height to 50. ```jsx { console.log('card details', cardDetails); setCard(cardDetails); }} style={{height: 50}} /> ``` -------------------------------- ### ConnectPayments usage example Source: https://stripe.dev/stripe-react-native/api-reference/functions/ConnectPayments.html Use this component to render a payment list for a connected account. The defaultFilters prop can filter by status and date; here it shows successful and pending payments after January 1, 2024. The style prop applies flex: 1 to fill available space. ```tsx ``` -------------------------------- ### initStripe(params: InitStripeParams): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/initStripe.html Initializes the Stripe React Native SDK with the provided parameters. This function must be called before using any other Stripe SDK methods. ```APIDOC ## initStripe(params: InitStripeParams): Promise ### Description Initializes the Stripe React Native SDK with the provided parameters. This function must be called before using any other Stripe SDK methods. ### Parameters - **params** (InitStripeParams) - Required - The initialization parameters for the Stripe SDK. ### Returns - **Promise** - A promise that resolves when initialization is complete. ### Example ```typescript import { initStripe } from '@stripe/stripe-react-native'; await initStripe({ publishableKey: 'pk_test_...', // other parameters }); ``` ``` -------------------------------- ### PaymentMethodMessagingElement example with appearance and configuration Source: https://stripe.dev/stripe-react-native/api-reference/functions/PaymentMethodMessagingElement.html Use this snippet to render a PaymentMethodMessagingElement with custom appearance (style, textColor, infoIconColor, font) and configuration (currencyCode, amount, countryCode). The onStateChange event logs the event when the element loads. Note: This feature is in Public Preview and may have breaking changes. ```jsx { console.log('PMME loaded with result:', event); } /> ``` -------------------------------- ### collectBankAccountForSetup(clientSecret: string, params: PaymentMethod.CollectBankAccountParams): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/collectBankAccountForSetup.html Collects a bank account for a SetupIntent using the provided client secret and parameters. Returns a promise that resolves to a CollectBankAccountForSetupResult. ```APIDOC ## Function collectBankAccountForSetup ### Description Collects a bank account for a SetupIntent using the provided client secret and parameters. ### Signature ```typescript collectBankAccountForSetup( clientSecret: string, params: PaymentMethod.CollectBankAccountParams ): Promise ``` ### Parameters - **clientSecret** (string) - Required - The client secret of the SetupIntent. - **params** (PaymentMethod.CollectBankAccountParams) - Required - Parameters for collecting the bank account. ### Returns - **Promise** - A promise that resolves to the result of the bank account collection. ``` -------------------------------- ### UseOptions Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/Checkout.UseOptions.html Options for loading and managing Checkout with useCheckout. ```APIDOC ## Interface UseOptions ### Description Options for loading and managing Checkout with `useCheckout`. ### Properties #### `Optional` enabled - **Type**: `boolean` - **Default**: `true` - **Description**: When `false`, the status remains `idle`. #### getConfiguration - **Type**: `() => Promise` - **Description**: Fetches a fresh Checkout Session client secret and its configuration. Called when enabled on mount and again by `reload()`. ``` -------------------------------- ### CustomerSheet.initialize Source: https://stripe.dev/stripe-react-native/api-reference/variables/CustomerSheet.html Initializes the CustomerSheet with the provided parameters. Returns a promise that resolves with an error if initialization fails. ```APIDOC ## initialize ### Description Initializes the CustomerSheet with the provided parameters. ### Method initialize ### Parameters #### Params - **params** (CustomerSheetInitParams) - Required - The initialization parameters. ### Returns Promise<{ error?: StripeError }> ### Response #### Success Response - **error** (StripeError) - Optional - An error object if initialization failed. #### Response Example { "error": { "code": "string", "message": "string" } } ``` -------------------------------- ### reload() Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/Checkout.UseResult.html Fetches fresh configuration and replaces the current native controller. ```APIDOC ## reload() ### Description Fetches fresh configuration and replaces the current native controller. ### Method reload ### Signature reload(): Promise ### Returns Promise ``` -------------------------------- ### Initialize Connect with loadConnectAndInitialize Source: https://stripe.dev/stripe-react-native/api-reference/functions/loadConnectAndInitialize.html Initializes a Connect instance with a publishable key, a client secret fetcher, and appearance customization. The fetchClientSecret callback must return the client secret from your backend endpoint. The returned instance is passed to ConnectComponentsProvider. ```javascript const connectInstance = loadConnectAndInitialize({ publishableKey: 'pk_test_123', fetchClientSecret: async () => { const response = await fetch('/account_session'); const { client_secret } = await response.json(); return client_secret; }, appearance: { variables: { colorPrimary: '#635BFF' } } }); ``` -------------------------------- ### configure Source: https://stripe.dev/stripe-react-native/api-reference/functions/useOnramp.html Creates a CryptoOnrampCoordinator to facilitate authentication, identity verification, payment collection, and checkouts. ```APIDOC ## configure ### Description Creates a `CryptoOnrampCoordinator` to facilitate authentication, identity verification, payment collection, and checkouts. ### Method configure ### Signature `configure: (config: Onramp.Configuration) => Promise<{ error?: CryptoOnrampError }>` ### Parameters - **config** (Onramp.Configuration) - Required - Configuration for the onramp session. ### Response - **error** (CryptoOnrampError) - Optional - Error object if the operation fails. ``` -------------------------------- ### CreateOptions Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/Checkout.CreateOptions.html Configuration object used to create a Checkout session. ```APIDOC ## CreateOptions ### Description Configuration used to create a Checkout session in the Stripe React Native SDK. ### Properties - **clientSecret** (string) - Required - The Checkout Session client secret. - **returnURL** (string) - Required - A URL that redirects back to your app after payment authentication. - **defaults** (Defaults) - Optional - Customer information already known by your app. - **merchantDisplayName** (string) - Optional - Customer-facing business name. - **style** (UserInterfaceStyle) - Optional - Overrides the light or dark appearance. - **paymentElement** (PaymentElementConfiguration) - Optional - Configuration for the Checkout-owned Payment Element. ### Example ```typescript interface CreateOptions { clientSecret: string; returnURL: string; defaults?: Defaults; merchantDisplayName?: string; style?: UserInterfaceStyle; paymentElement?: PaymentElementConfiguration; } ``` ``` -------------------------------- ### presentLinkController() Source: https://stripe.dev/stripe-react-native/api-reference/functions/presentLinkController.html Presents the Link flow. Must be called after initLinkController. Handles the full end-to-end flow: consumer lookup, authentication or signup, wallet display, and payment method creation. ```APIDOC ## presentLinkController() ### Description Presents the Link flow. Must be called after `initLinkController`. Handles the full end-to-end flow: consumer lookup, authentication or signup, wallet display, and payment method creation. ### Method presentLinkController ### Endpoint presentLinkController() ### Parameters None ### Request Example ```typescript const result = await presentLinkController(); ``` ### Response #### Success Response - **result** (Promise) - Resolves to a PresentResult object. #### Response Example ```typescript const result: PresentResult = await presentLinkController(); ``` ### Notes - This API is in private preview and may change without notice. - It will have no effect unless your Stripe account is enrolled in the private preview. ``` -------------------------------- ### createPlatformPayPaymentMethod(params: PaymentMethodParams): Promise Source: https://stripe.dev/stripe-react-native/api-reference/functions/createPlatformPayPaymentMethod.html Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe PaymentMethod. ```APIDOC ## createPlatformPayPaymentMethod(params: PaymentMethodParams): Promise ### Description Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe PaymentMethod. ### Parameters - **params** (PaymentMethodParams) - Required - An object describing the Apple Pay and Google Pay configurations. ### Returns - **Promise** - An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field. ``` -------------------------------- ### applyPromotionCode Source: https://stripe.dev/stripe-react-native/api-reference/interfaces/CheckoutController.html Applies a promotion code after trimming leading and trailing whitespace. ```APIDOC ## applyPromotionCode(promotionCode: string): Promise ### Description Applies a promotion code after trimming leading and trailing whitespace. ### Method applyPromotionCode ### Parameters - **promotionCode** (string) - Required - The promotion code to apply. ### Returns Promise ``` -------------------------------- ### CustomerSheet.present Source: https://stripe.dev/stripe-react-native/api-reference/variables/CustomerSheet.html Presents the CustomerSheet to the user. Optionally accepts parameters and returns a CustomerSheetResult. ```APIDOC ## present ### Description Presents the CustomerSheet to the user. ### Method present ### Parameters #### Params - **params** (CustomerSheetPresentParams) - Optional - The presentation parameters. ### Returns Promise ### Response #### Success Response - **CustomerSheetResult** - The result of the presentation. #### Response Example { "type": "string", "paymentOption": {} } ```