'@primer-io/react-native' as a type, for example import type { PaymentOutcome } from '@primer-io/react-native'. The code blocks below show the shape of each type, not code to copy.
PaymentOutcome
The outcome of the most recent payment attempt. Initialization failures go tousePrimerCheckout().error instead.
paymentOutcome is null before the first attempt and after you call clearPaymentOutcome() from usePrimerCheckout.
CheckoutData
Data about the payment that the native SDK sends with a result.onCheckoutComplete receives it when a payment is created.
CheckoutAdditionalInfo
CheckoutAdditionalInfo and MultibancoCheckoutAdditionalInfo are exported as types. The same types are passed to onCheckoutPending and onCheckoutAdditionalInfo in settings.headlessUniversalCheckoutCallbacks.
additionalInfoName before you read the fields of a specific type.
CheckoutDataPayment
ClientSession
The client session the native SDK loaded for yourclientToken. Read it from usePrimerCheckout().clientSession. It is null until the native SDK first sends the session, and it updates when the session changes, for example after a billing address is set. Always handle null.
Every field is optional, because each depends on how you created the client session.
To format
totalAmount, use formatCurrency from usePrimerLocalization. See Client session for how to create the session on your server.
LineItem
Order
Customer
Address
Usage
CheckoutPaymentMethodData
Passed toonBeforePaymentCreate, the prop of PrimerCheckoutProvider, before the payment is created.
See also
usePrimerCheckout
paymentOutcome, clientSession and clearPaymentOutcome()Handle the payment result
Route your UI on the payment result
PrimerError
The error in a failed outcome
PrimerCheckoutProvider
The callbacks that receive checkout data