new Primer()
call. Instead, you need to use Primer.showUniversalCheckout()
or Primer.showVaultManager()
.Another set of changes that you need to take into account is when the package is loaded from npm:loadPrimer()
call is now removed from the latest SDK. When the user approaches checkout, if you need to preload Primer Universal Checkout SDK, use preloadPrimer()
instead. Under the hood, loadPrimer()
is automatically called by Primer.showUniversalCheckout()
so you do not need to call loadPrimer()
explicitly anymore.Primer.showUniversalCheckout()
will automatically load it.onTokenizeSuccess
and onResumeSuccess
. Not anymore.The functions onTokenizeSuccess
and onResumeSuccess
are no longer required to be used. This essentially means that you do not need to make any API calls for creating and resuming payments.Those can be edited out of your integration code.No complex integrations to maintain anymore!With the new SDK, you can simply listen to the PAYMENT.STATUS
webhook and the callback onCheckoutComplete
to process successful and even more secure payments as compared to the earlier versions.paymentHandling: "MANUAL"
. See Manual Payment Creation Guide for details.onTokenizeSuccess
and onResumeSuccess
had to return specific data to trigger various scenarios. This proved to be quite error-prone and not self-explanatory.handler
argument that contains the functions to continue.threeDSecure
option is now completely removed from the Universal Checkout. Earlier, this option was provided to trigger 3DS at the time of tokenization.Earlier v1.x.x | Latest v2 SDK |
---|---|
purchaseInfo and orderDetails (in the SDK) | Pass the order details through the client-session API call. |
customerDetails (in the SDK) | Pass the customer information through the client-session API call. |
customerId (in the SDK) | Specify the customerId through the client-session API call. |
countryCode (in the SDK) | Pass order.countryCode through the client-session API call. |
businessDetails (in the SDK) | Only needed for tax calculation using TaxJar. Removed. In the future, business details… |
setClientToken(newClientToken)
API call.Earlier v1.x.x | Latest v2 SDK |
---|---|
setPurchaseInfo and setOrderDetails (in the SDK) | Update the order in the client session, then call setClientToken(...) . |
setCustomerDetails (in the SDK) | Update the customer in the client session, then call setClientToken(...) . |
setBusinessDetails (in the SDK) | This has been completely removed |
allowedPaymentMethods
was used to filter and display the payment methods as required by a specific merchant integration. This is no longer necessary and has been completely removed in the latest SDK v2.The recently introduced Checkout section in the Dashboard enables display of merchant-specific payment methods, based on the conditions defined by them.onClientSessionActions
.Now, with the latest SDK v2, as the customer interacts with the UI, Universal Checkout takes care of setting up “client session actions” via onClientsessionActions()
.onClientSessionUpdate
onClientSessionUpdateStart
onClientSessionActions
. These callbacks are now replaced by the client session update call.onAmountChange
onAmountChanging
onAmountChangeError
Client session actions
in order to enable you to update the client session according to the merchant checkout requirements. This is now completely managed automatically by the Primer Universal Web SDK v2.The latest SDK can now collect various customer data such as the billing address
, customer contact
details and update the client session by itself. It no longer requires any explicit developer initiated actions or function calls to update these details while integrating with Primer.submit()
to implement a custom submit button. For details, see Universal Checkout Submit button usage guide.submitButton.visible
is now renamed to submitButton.useBuiltInButton
.card.css
.Now, you can instead use the style
option to customize the style 🎨 for the entire Universal Checkout SDK and align with the merchant branding in a more cohesive and unified way!For more details, refer to the Primer Universal Checkout Web SDK Styling Guide.card.cardholderName.visible
available in the previous version of Primer Checkout SDK has been removed altogether. You can continue to configure this setting through the Dashboard in the forthcoming release. Stay tuned!
In the meantime, if you need to show or hide the cardholder name field, please get in touch with us.
CheckoutOptions
The TypeScript CheckoutOptions
is now renamed to UniversalCheckoutOptions
.
tokenize()
and validate()
are no longer available in Universal Checkout SDK v2.
primer.render()
function. Make sure you clean that up!