PrimerSettings is the SDK configuration object. Pass it as the settings prop of PrimerCheckoutProvider.
Definition
Import the type withimport type { PrimerSettings } from '@primer-io/react-native'. The block below shows the shape of the type, not code to copy.
apiVersion is exported as PrimerApiVersion.
Usage
paymentMethodOptions
See Native setup for the app-side setup that URL schemes, Apple Pay, Google Pay, Klarna and Stripe ACH need.
Apple Pay options
applePayOptions is read on iOS only.
RequiredContactField is 'name' | 'emailAddress' | 'phoneNumber' | 'postalAddress'.
Google Pay options
googlePayOptions is read on Android only.
uiOptions
Primer Checkout reads these keys fromuiOptions.
The sheet closes only when your
onRequestDismiss handler sets visible to false. When you turn a result screen off, keep the result yourself when it arrives, because the sheet clears paymentOutcome before it calls onRequestDismiss. To show your own result screens, see Status screens.headlessUniversalCheckoutCallbacks
Event callbacks from the native SDK.onCheckoutComplete, onError and onBeforePaymentCreate are also props of PrimerCheckoutProvider. When you set a callback both as a prop and here, both run, the prop first, with the same arguments.
onTokenizationStart, onPreparationStart, onPaymentMethodShow, onBeforeClientSessionUpdate, onCheckoutResume and onCheckoutPending are forwarded from the native SDK when you set them.
See also
PrimerCheckoutProvider
The provider that takes these settings
Native setup
URL schemes, Apple Pay, Google Pay and optional dependencies
PrimerError
Errors and where they arrive
PrimerThemeOverride
Theme the checkout and set the appearance mode