The client_secret of the associated PaymentIntent.
An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been attached to the Payment Intent.
An optional object that contains options for this payment method.
A promise that resolves to an object containing either a paymentIntent
field, or an error
field.
Handles any nextAction required to authenticate the PaymentIntent. Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom
The client secret associated with the PaymentIntent.
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.
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.
The client secret associated with the SetupIntent.
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.
Call this method in your app whenever you receive a URL for a Stripe callback. For convenience, you can pass all URLs you receive to this method first, and check the return value to easily determine whether it is a callback URL that Stripe will handle or if your app should process it normally. This is iOS-only, and will always return false on Android.
You must call this method when the user logs out from your app. This will ensure that any persisted authentication state in the PaymentSheet, such as authentication cookies, is also cleared during logout.
Use collectBankAccountToken in the Add a Financial Connections Account to a US Custom Connect account flow. When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.
The client_secret of the Financial Connections Session.
A promise that resolves to an object containing either session
and token
fields, or an error field.
Use collectFinancialConnectionsAccounts in the Collect an account to build data-powered products flow. When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.
The client_secret of the Financial Connections Session.
A promise that resolves to an object containing either a session
field, or an error field.
Check if the app & device support adding this card to the native wallet.
An object containing fields for primaryAccountIdentifier
, cardLastFour
, and testEnv
.
A promise resolving to an object of type CanAddCardToWalletResult. Check the canAddCard
field, if it's true, you should show the <AddToWalletButton />
Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.
A boolean indicating whether or not the native wallet is supported.
Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe SetupIntent.
The client secret of the SetupIntent.
an object describing the Apple Pay and Google Pay configurations.
An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both setupIntent
and paymentMethod
fields.
Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe PaymentIntent.
The client secret of the PaymentIntent.
an object describing the Apple Pay and Google Pay configurations.
An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both paymentIntent
and paymentMethod
fields.
iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.
A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.
Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe PaymentMethod.
an object describing the Apple Pay and Google Pay configurations.
An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a paymentMethod
field.
an object describing the Apple Pay and Google Pay configurations.
An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a token
field.
iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.
an object describing the Apple Pay configuration, with the following fields:
An object with an optional 'error' field, which is only populated if something went wrong.
iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards. This method transfers control to the Wallet app on iPhone or to the Settings app on iPad. For devices that don’t support Apple Pay, this method does nothing.
useConfirmPayment hook
useConfirmSetupIntent hook
React hook for accessing functions on the Financial Connections sheet.
Retuns the collectBankAccountToken
and collectFinancialConnectionsAccounts
functions, and a loading
boolean that you can use
to display loading state (like showing a spinner).
usePaymentSheet hook
usePlatformPay hook. Access all Apple and Google Pay functionality with this hook.
useStripe hook
Add to wallet button
Props
JSX.Element
Props
JSX.Element
BECS Debit form component
Props
JSX.Element
PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.
Props
JSX.Element
StripeContainer Component
Props
JSX.Element
StripeProvider Component
Props
JSX.Element
The Customer Sheet is a prebuilt UI component that lets your customers manage their saved payment methods.
A component wrapper around the Customer Sheet functions. Upon passing true
to the visible
prop,
Customer Sheet will call initialize
and present
, and the result(s) will be passed through to the
onResult callback.
Props
JSX.Element
Initialize an instance of Customer Sheet with your desired configuration.
Launches the Customer Sheet UI.
You can use this to obtain the selected payment method without presenting the CustomerSheet.
This will return an error if you have not called .initialize
Card Field Component
Card Form Component
Props
Stripe Provider Component Props
The customer's full name.
The customer's address.
The customer's phone number.
Whether or not the checkbox is initally selected. Defaults to false. Note: The checkbox is displayed below the other fields when additionalFields.checkboxLabel is set.
The color styling to use for PaymentSheet UI. Defaults to 'automatic'. iOS only.
Configuration for the look and feel of the UI.
Optional but recommended for cards, required for other payment methods. The SetupIntent client secret that will be used to confirm a new payment method. If this is missing, you will only be able to add cards without authentication steps.
The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id
A short-lived token that allows the SDK to access a Customer's payment methods.
Your customer-facing business name. The default value is the name of your app.
Optional configuration for setting the header text of the Payment Method selection screen
CustomerSheet pre-populates fields with the values provided. If billingDetailsCollectionConfiguration.attachDefaultsToPaymentMethod
is true
, these values will be attached to the payment method even if they are not collected by the CustomerSheet UI.
Describes how billing details should be collected. All values default to AUTOMATIC
. If NEVER
is used for a required field for the Payment Method, you must provide an appropriate value as part of defaultBillingDetails
.
A URL that redirects back to your app that CustomerSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2
Optional configuration to display a custom message when a saved payment method is removed. iOS only.
Whether to show Apple Pay as an option. Defaults to false.
Whether to show Google Pay as an option. Defaults to false.
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.
Optional override. It is generally recommended to rely on the default behavior, but- provide a CustomerAdapter here if you would prefer retrieving and updating your Stripe customer object via your own backend instead. WARNING: When implementing your own CustomerAdapter, ensure your application complies with all applicable laws and regulations, including data privacy and consumer protection.
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.
Controls how the modal is presented (after animation). iOS only. Defaults to popover
. See https://developer.apple.com/documentation/uikit/uimodalpresentationstyle for more info.
Controls how the modal animates. iOS only.
Time (in milliseconds) before the Customer Sheet will automatically dismiss.
The users selected payment option, if one exists.
The Stripe PaymentMethod associated with the paymentOption, if it exists.
The error that occurred.
The token reference ID.
Last four digits of the FPAN
Last four digits of the DPAN
The name of the issuer.
The GooglePayCardTokenStatus.
Deprecated. Use fpanLastFour or dpanLastFour.
The primary_account_identifier
value from the issued card. Can be an empty string.
Last 4 digits of the card number. Required for Android.
iOS only. Set this to true
until shipping through TestFlight || App Store. If false, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios
iOS only. Set this to true
if: your user has an Apple Watch device currently paired, and you want to check that device for the presence of the specified card.
Android only, defaults to true
. Set this to false
if you'd like to allow users without NFC-enabled devices to add cards to the wallet. NFC is required for paying in stores.
Generated using TypeDoc
Confirm and, if necessary, authenticate a PaymentIntent.