Primer
The function showPaymentMethod(paymentMethodType: string, intent: PrimerSessionIntent, clientToken: string): Promise<void>
gets removed. Use the relevant function on the Headless Universal Checkout
configure(settings?: PrimerSettings): Promise<void>
: Optionally call this function to configure the SDK before presenting it.<aside> ⚠️ If no settings are provided, they SDK will get initialized with its default settings.
</aside>
showUniversalCheckout(clientToken: string): Promise<void>
: Call this function with the client token you have received from your BE in order to present the Universal Checkout.showVaultManager(clientToken: string): Promise<void>
: Call this function with the client token you have received from your BE in order to present the Vault Manager.~~showPaymentMethod(paymentMethodType: string, intent: PrimerSessionIntent, clientToken: string): Promise<void>
: Call this function with the client token you have received from your BE in order to directly present a payment method. Set the intent to~~ CHECKOUT
or VAULT
.dismiss()
: Call this function to dismiss the Primer SDK.HeadlessUniversalCheckout
startWithClientToken(clientToken: string, settings: PrimerSettings): Promise<PaymentMethod[]>
disposeHeadlessUniversalCheckout()
PrimerSettings
paymentHandling?
: can be AUTO
and MANUAL
, defaults to AUTO
.
AUTO
: Utilizes the simplified DX (default flow)MANUAL
: Create and handle payments manuallylocaleData?: [PrimerLocaleData](<https://primerio.notion.site/800de3a4a0ce4e07be05d7bf8c0755e4>)
paymentOptions?: [PrimerPaymentMethodOptions](<https://primerio.notion.site/800de3a4a0ce4e07be05d7bf8c0755e4>)
uiOptions?: [PrimerUIOptions](<https://primerio.notion.site/800de3a4a0ce4e07be05d7bf8c0755e4>)
debugOptions?: [PrimerDebugOptions](<https://primerio.notion.site/800de3a4a0ce4e07be05d7bf8c0755e4>)
-Primer callbacks haven’t been modified, they were just moved within the primerCallbacks
in the settings object.
primerCallbacks?
onBeforeClientSessionUpdate?: () => void
onClientSessionUpdate?: (clientSession: PrimerClientSession) => void
onBeforePaymentCreate?: (checkoutPaymentMethodData: PrimerCheckoutPaymentMethodData, handler: PrimerPaymentCreationHandler) => void
onCheckoutComplete?: (checkoutData: PrimerCheckoutData) => void
onTokenizeSuccess?: (paymentMethodTokenData: PrimerPaymentMethodTokenData, handler: PrimerTokenizationHandler) => void
onResumeSuccess?: (resumeToken: string, handler: PrimerResumeHandler) => void
onResumePending?: (additionalInfo: PrimerCheckoutAdditionalInfo) => void
onCheckoutReceivedAdditionalInfo?: (additionalInfo: PrimerCheckoutAdditionalInfo) => void
onError?: (error: PrimerError, checkoutData: PrimerCheckoutData | null, handler: PrimerErrorHandler | undefined) => void
onDismiss?: () => void
headlessUniversalCheckoutCallbacks?
onAvailablePaymentMethodsLoad?: (availablePaymentMethods: any[]) => void
onTokenizationStart?: (paymentMethodType: string) => void
onTokenizationSuccess?: (paymentMethodTokenData: PrimerPaymentMethodTokenData, handler: PrimerHeadlessUniversalCheckoutResumeHandler) => void
onCheckoutResume?: (resumeToken: string, handler: PrimerHeadlessUniversalCheckoutResumeHandler) => void
onCheckoutPending?: (additionalInfo: PrimerCheckoutAdditionalInfo) => void
onCheckoutAdditionalInfo?: (additionalInfo: PrimerCheckoutAdditionalInfo) => void
onError?: (error: PrimerError, checkoutData: PrimerCheckoutData | null) => void
onCheckoutComplete?: (checkoutData: PrimerCheckoutData) => void
onBeforeClientSessionUpdate?: () => void
onClientSessionUpdate?: (clientSession: PrimerClientSession) => void
onBeforePaymentCreate?: (checkoutPaymentMethodData: PrimerCheckoutPaymentMethodData, handler: PrimerPaymentCreationHandler) => void
onPreparationStart?: (paymentMethodType: string) => void
onPaymentMethodShow?: (paymentMethodType: string) => void