import { Primer, PrimerSettings } from "@primer-io/react-native";
// ...
const onUniversalCheckoutButtonTapped = async () => {
const settings: PrimerSettings = {
/* options */
};
await Primer.configure(settings);
};
Parameters
Hide Parameters
Hide Parameters
Use
PrimerSettings to provide different options based on your use case.Hide Properties
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
This option sets the deeplink schema used when redirecting back from 3rd party applications to your app.
Show Properties
Show Properties
This option sets the deeplink schema used when redirecting back from 3rd party applications to your app.
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
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 Properties
Show Properties
Show Properties
Show child attributes
Show child attributes
Show Properties
Show Properties
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.4- will use ApiVersion 2.4
V2.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
Show Parameters
Show Parameters
You MUST call one of the methods of the handler if
onBeforePaymentCreate is implemented.Show Parameters
Show Parameters
Hide Properties
Hide Properties
Show 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 Variations
paymentHandling to MANUAL, implementing this is mandatory.Show Parameters
Show Parameters
Hide Properties
Hide Properties
Show Properties
Show Properties
PAYPAL, GOOGLE_PAY)Hide Properties
Hide Properties
APPLE_PAYCARD_OFF_SESSION_PAYMENTGOOGLE_PAYKLARNA_CUSTOMER_TOKENOFF_SESSION_PAYMENTPAYMENT_CARDPAYPAL_BILLING_AGREEMENTPAYPAL_ORDER
Show Properties
Show Properties
Possible values:
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().-
Create a payment request passing the
paymentMethodTokento your backend -
If the payment is successful, call
handler.handleSuccess()in order to display a success screen -
If the payment is unsuccessful, call
handler.handleFailure(errorMessage)to display an error or failure message -
Payments API may return a new
clientTokenfor additional steps (in therequiredActionson the response). In this case, callhandler.continueWithNewClientToken(clientToken)to continue with the payment flow
Show Parameters
Show Parameters
PrimerPaymentHandling is set to MANUALShow Properties
Show Properties
Show variations
Show variations
PrimerPaymentHandling is set to AUTOShow Parameters
Show Parameters
Show variations
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
Show Properties
Hide Properties
Hide Properties
Show 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 Variations
Show Properties
Show Properties
Show Attributes
Show Attributes
Show Parameters
Show Parameters
PrimerPaymentHandling is set to MANUALShow Properties
Show Properties
Show variations
Show variations
PrimerPaymentHandling is set to AUTOShow Parameters
Show Parameters
Show variations
Show variations
PrimerCheckoutData if the error occurs after the payment creation.Show Properties
Show Properties
Hide Properties
Hide Properties
Show 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 Variations
Show Parameters
Show Parameters
Hide Properties
Hide Properties
Show 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 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
Show Parameters
Show Parameters
You MUST call one of the methods of the handler if
onBeforePaymentCreate is implemented.