Skip to main content
Primer Checkout React Native SDK is currently in beta (v3.0.0-beta.1). The API is subject to change before the stable release.
Primer Checkout passes the payment result and the client session to your app as plain objects. This page describes their types and fields. Every type is exported from '@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 to usePrimerCheckout().error instead.
paymentOutcome is null before the first attempt and after you call clearPaymentOutcome() from usePrimerCheckout.
See Handle the payment result for the full flow.

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.
Check additionalInfoName before you read the fields of a specific type.

CheckoutDataPayment

ClientSession

The client session the native SDK loaded for your clientToken. 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 to onBeforePaymentCreate, 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