Web SDK: Migrating to v1.1
Migrating to Web SDK v1.1
Version 1.1.0 makes initialize(), mountCheckout(), and startCheckout() asynchronous and introduces continuePayment() as a required step for dynamic payment flows (3DS, PayPal redirects, and similar).
What changed
Yuno.initialize(),whitelabel.mountCheckout(), andwhitelabel.startCheckout()now return Promises and must be awaited.continuePayment()is now required whensdk_action_required: trueis returned from the payment API.- Separate 3DS setup service calls are no longer needed — 3DS setup is now integrated into payment creation.
Steps
1. Update the script tag
<script src="https://sdk-web.whitelabel.com/v1.1/main.js"></script>2. Await all SDK method calls
Before:
const whitelabel = Yuno.initialize(publicApiKey, config)
whitelabel.mountCheckout({ checkoutSession, elementSelector: '#root', countryCode: 'US' })
whitelabel.startCheckout({ checkoutSession, countryCode: 'US' })After:
const whitelabel = await Yuno.initialize(publicApiKey, config)
await whitelabel.mountCheckout({ checkoutSession, elementSelector: '#root', countryCode: 'US' })
await whitelabel.startCheckout({ checkoutSession, countryCode: 'US' })3. Implement continuePayment for dynamic flows
After creating a payment via your backend, check whether the SDK needs to continue the flow (e.g. 3DS challenge, PayPal redirect):
// After payment creation
if (paymentResponse.sdk_action_required) {
const result = await whitelabel.continuePayment({
checkoutSession,
showPaymentStatus: true,
yunoPaymentResult,
yunoError,
countryCode: 'US',
})
// result may contain a redirect object; handle appropriately
}If sdk_action_required is not true, no call to continuePayment is needed.
4. Remove separate 3DS setup calls
If your v1.0 integration called a separate 3DS setup service before payment creation, remove that call. In v1.1, 3DS data collection is handled automatically during payment creation.
Checklist
- Updated script tag to v1.1
- Added
awaittoYuno.initialize(),whitelabel.mountCheckout(), andwhitelabel.startCheckout() - Implemented
continuePayment()handling for dynamic flows - Confirmed
yunoPaymentResult()callback is properly configured - Removed any standalone 3DS setup service calls
Changelog › Migration guide › Web