import { Primer, PrimerSettings } from "@primer-io/react-native";
// ...
const onUniversalCheckoutButtonTapped = async () => {
const settings: PrimerSettings = {
/* options */
};
await Primer.configure(settings);
};
Hide Parameters
PrimerSettings
to provide different options based on your use case.Hide Properties
'MANUAL'
or 'AUTO'
Force the SDK locale. By default, the locale will be set to the device’s locale.Show Properties
Show Properties
Show Properties
Show Properties
false
. Set to true
to let Apple Pay capture the customer’s billing address.false
. The default value is true
.true
, only merchant-allowed card networks can be used when paying with Apple Pay. If set to false
any network can be used provided the device supports Apple Pay.Merchant-allowed networks are provided using orderedAllowedCardNetworks
when creating the client session.Deprecated
since v.2.14.0.Show Properties
true
, this specifies that Google Pay can only be used for payments if the user’s Google Pay wallet already contains allowed payment methods.Show Properties
Show Properties
Show Properties
Show child attributes
Show Properties
Show Properties
false
to hide the loading screen before the Universal Checkout or the Vault Manager. Defaults to true
.false
to hide the screen after a successful payment, or tokenization on the vault flow. Defaults to true
.false
to hide the error screen when an error occurs. Defaults to true
.gestures
: The dialog can be dismissed by tapping outside or by swiping down.closeButton
: A close button is provided, allowing users to dismiss the dialog manually.true
, responses from the server will be cached on the client side, allowing for faster subsequent
access to the same data within the cache duration. When set to false
, every request to the server will be
processed without utilizing any client-side cache, ensuring that the client always receives the most up-to-date data.2.3
- will use ApiVersion 2.32.4
- will use ApiVersion 2.4V2.4
will be used by default.handler
must be used to then abort or continue with payment creation.
Primer will continue with payment creation if onBeforePaymentCreate
is not implemented.Show Parameters
Show Parameters
onBeforePaymentCreate
is implemented.Show Parameters
Hide Properties
Show Properties
payment-failed
which is an error from the PSP side, or cancelled-by-customer
which means the failure initiated on the customer side. I.e. cancelling a 3DS flow.Show Variations
paymentHandling
to MANUAL
, implementing this is mandatory.Show Parameters
Hide Properties
Show Properties
PAYPAL
, GOOGLE_PAY
)Hide Properties
APPLE_PAY
CARD_OFF_SESSION_PAYMENT
GOOGLE_PAY
KLARNA_CUSTOMER_TOKEN
OFF_SESSION_PAYMENT
PAYMENT_CARD
PAYPAL_BILLING_AGREEMENT
PAYPAL_ORDER
Show Properties
AUTH_SUCCESS
: The authentication was successful.AUTH_FAILED
: The authentication process failed.SKIPPED
: The authentication was skipped.CHALLENGE
: A challenge was issued during the authentication process.true
: A challenge was issued.false
: No challenge was issued.paymentMethodToken
in onTokenizeSuccess()
.paymentMethodToken
to your backend
handler.handleSuccess()
in order to display a success screen
handler.handleFailure(errorMessage)
to display an error or failure message
clientToken
for additional steps (in the requiredActions
on the response). In this case, call handler.continueWithNewClientToken(clientToken)
to continue with the payment flow
Show Parameters
PrimerPaymentHandling
is set to MANUAL
Show Properties
Show variations
PrimerPaymentHandling
is set to AUTO
Show Parameters
Show variations
PrimerCheckoutData
if the error occurs after the payment creation.override
this method, you must call the errorHandler
to finalize the flow.Show Properties
Hide Properties
Show Properties
payment-failed
which is an error from the PSP side, or cancelled-by-customer
which means the failure initiated on the customer side. I.e. cancelling a 3DS flow.Show Variations
Show Properties
Show Attributes
Show Parameters
PrimerPaymentHandling
is set to MANUAL
Show Properties
Show variations
PrimerPaymentHandling
is set to AUTO
Show Parameters
Show variations
PrimerCheckoutData
if the error occurs after the payment creation.Show Properties
Hide Properties
Show Properties
payment-failed
which is an error from the PSP side, or cancelled-by-customer
which means the failure initiated on the customer side. I.e. cancelling a 3DS flow.Show Variations
Show Parameters
Hide Properties
Show Properties
payment-failed
which is an error from the PSP side, or cancelled-by-customer
which means the failure initiated on the customer side. I.e. cancelling a 3DS flow.Show Variations
handler
must be used to then abort or continue with payment creation.
Primer will continue with payment creation if onBeforePaymentCreate
is not implemented.Show Parameters
Show Parameters
onBeforePaymentCreate
is implemented.