freeCancellationDate
and freeCancellationTimeZone
are optional, but they must either both be provided or both be omitted.merchantDomain
option for Apple Pay when rendered within an iframe. This optional string parameter allows setting the top window domain for proper Apple Pay functionality in iframe contexts. See our documentation for more info.DLOCAL_PIX
ALMA
PAY_NL_RIVERTY
onPaymentMethodAction
callback. Now PAYMENT_METHOD_SELECTED
and PAYMENT_METHOD_UNSELECTED
events are triggered.legacy
via options.apiVersion
. For more information see our SDK reference, Api Reference and Migration Guides.OR_BIBED_15
error where the payment popup failed to open due to a network request. The popup is now triggered immediately upon clicking the Google Pay button, ensuring compliance with browser restrictions on user-initiated popups. As a result, any updates to the client session must now be refreshed manually in the SDK by calling refreshClientSession
.undefined is not an object
) occurring with Apple Pay transactions.showUniversalCheckout
options. This resolves issues where TypeScript users encountered type errors when configuring StripeACH payments. apiVersion
:
apiVersion
to “2.4”.
onPaymentMethodAction
wasn’t being triggered when closing a payment popup. In some specific instances, when a popup delegated payment method was closed before it fully completed its loading sequence, the SDK would fail to dispatch the relevant callbacks. This prevented merchants from constructing reliable logic for handling payment method actions.OR_BIBED_15
error from happening on the Firefox browser.buttonOptions
property, enabling a more localized and relevant checkout experience based on your customers’ region and Klarna’s available payment methods. This feature is available for both direct Klarna integrations and through Adyen.en_US
if the provided locale is not supported.amount
property in the create client session requestclientSessionCachingEnabled
is set to true
has been fixed.id
properties to the Payment Method buttons.
createHeadless
method. Please update your implementation by moving the options from the previous headless.configure
method, which is now deprecated. Check the updated documentation for more details.Note: This is a necessary update if you want to set the clientSessionCachingEnabled
flag to true
.Client Session caching
It is now possible to cache the ClientSession configuration client-side, which can speed up certain flows in the SDK. This can be enabled via the clientSessionCachingEnabled flag, both Headless and Drop-in. Before enabling the flag to true
it’s recommended to reach out to Primer support for additional verification since there are edge cases where it is not advised.paymentFlow
is set to PREFER_VAULT
.AssetsManager.getPaymentMethod
. Previously, the paymentMethodName
parameter would return the recommended button text for a payment method, which could be null for many payment methods.
We have deprecated this parameter and added two new ones:buttonText
: This is the recommended button text, e.g., “Pay with Google Pay.” However, it may be null for certain Payment Methods.displayName
: This is the payment method name. E.g., “Google Pay”. This should be available for all payment methods.From now on, please use these new parameters based on your use case. For more information, see our docs.FormWithRedirectPaymentMethodManager
that provides access to the configuration and methods necessary to:FormWithRedirectPaymentMethodManager
.sessionStorage.setItem
and navigator.sendBeacon
when the browser does not support them, or they are disallowed by the user, or when they fail for any other reason
color-scheme
actions.order.create
from PayPal’s JS SDK) that PayPal is deprecating in June 2024.
This version upgrades a PayPal payment method order creation using Orders v2 APIs and PayPal JavaScript SDK
orderId
in the client session would be passed to PayPal as the custom\_id
. Now you have to pass paypal_custom_id
in the metadata.
onPaymentMethodAction
events
cvvInput.metadata.error
cvvRequired
errorCode is still exposed in cvvInput.metadata.errorCode
property
npm
package to run correctly in the browserallowedCardNetworks
configuration option.onResumeSuccess
to be called with an undefined resume token when forceRedirect
is set to true
cvvRequired
error if the user has not yet interacted with it
PrimerHeadlessCheckout.createVaultManager()
which returns an instance of HeadlessVaultManager
. It provides the following features:cvvRequired
error if the user has not interacted with it.
forceRedirect
is still supported.
onCheckoutFail
to not be called when the payment ends up with a PENDING status and no required action. This could happen in the case of Atome when the user clicks “Back to merchant”
form.inputLabelsVisible
to also hide surcharge labels
paypal.paymentFlow
is set to PREFER_VAULT
crypto not defined
or navigation not defined)
refreshClientSession
refreshClientSession()
is called
refreshClientSession()
: the UI can fail to display the card fields
malformed client token
bug when the user selects a redirect-based payment method
zh-CN
th
ms
zh-HK
zh-TW
Chinese card details
checkout.refreshClientSession()
onAvailablePaymentMethodsLoad
is now working properly
window is undefined
error)
onAvailablePaymentMethodsLoad
is not working properly on this release. This has been addressed on v2.26.1.The validation of arguments passed to the main Primer functions is not working. This will be addressed in a new release. This has been addressed on v2.26.1buttonSizeMode
to the Google Pay options to define if the button should take the full size of the container, or if it should be static.fill
and static
buttonType
values short
and long
.
buttonType
to set what should be displayed on the Google Pay button.buy
(default)
book
checkout
donate
order
pay
plain
subscribe
Google Pay Buttons
CRC
, COP
and HUF
onAvailablePaymentMethodTypes
only returned a list of payment method strings. This made it difficult for developers to know how to implement each payment method.The new callback introduces the concept of managerType
: each payment method has a managerType
that describes which payment method manager to instantiate.This enables you to implement a whole payment method category in one go!AssetsManager
that enables you to retrieve the logo and main colors attached to each payment method.start
function. This function automatically:state
field.onPaymentCreationStart
callbackonPaymentCreationStart
callback to get notified before the checkout attempts to perform the following actions:
Payment methods
onPaymentMethodAction
callback to not be called.
Klarna
onCheckoutFail
will now be called.
Bancontact
style
object which disables the checkout from autofocusing the first available payment method or card input field.onErrorMessageShow
and onErrorMessageHide
callbacks which notifies you of when to display your custom error message when using the manual payment flow.setClientoken(clientToken)
, there’s now a simpler alternative:2.10.1
if you’re availing Primer to your customers.v2.5.0
of the Web SDKcustomer.billingAddress
and customer.shippingAddress
fields.2.9.0
if you’re servicing customers with Klarna in the United States, Australia or Canada to avoid any validation errors from Klarna2.8.1
AliPay+ & WeChat Pay
onPaymentMethodAction
callback.Paytrail & Payshop
onCheckoutFail
Before, an error would be logged in the console if no payment methods were loaded, but now you can adapt your UI in the case that no payment methods could be retrieved for the given checkout session.onCheckoutFail
callback in the web SDKs readme for more information on how you can best handle checkout failure.Submit Button
submitButton.amountVisible: true
as a checkout option:Submit on Enter
Select a bank
productType
can now be specified for each lineItem
:cs
et
hr
ja
lt
pt-BR
vi
Submit
es-AR
locale
checkout option when initialising the checkout. Take a look at the web SDKs README for more details.showUniversalCheckout
to return an instance of VaultManager
. showUniversalCheckout
now returns type UniversalCheckout
.lineItems
is provided in the client session, the item breakdown will be passed to the PayPal
orderId
is provided in the client session, PayPal’s custom\_id
will be passed to PayPal
Primer.showUniversalCheckout
, you’re configuring, initializing and availing the checkout to your customers in just one step.The boilerplate might have been reduced, but all the great functionality of the checkout has been maintained 💪onTokenizeSuccess
and onResumeSuccess
callbacks:2.0.0
no manual payment handling is required! Payment creation is now, as mentioned above, :chef-kiss: - seamless.Feel free to rip out the above mentioned callbacks when migrating to version 2.0.0
and enjoy the feeling of utter relaxation as all your payment handling is now done by Universal Checkout 💆For the nerds ❤️