Overview
This guide covers common errors encountered when integrating the Yuno Web SDK (@yuno-payments/sdk-web), including initialization failures, mounting issues, and runtime errors.
Initialization Errors
SDK_INIT_FAILED: Invalid public API key
SDK_INIT_FAILED: Invalid public API key
Cause: The
publicApiKey passed to Yuno.initialize() is invalid, empty, or belongs to a different environment.Solution:- Verify the key in Dashboard > Settings > API Keys
- Ensure you are using the correct environment key (sandbox vs. production)
- Check for leading/trailing whitespace in the key string
SDK_INIT_FAILED: Invalid checkout session
SDK_INIT_FAILED: Invalid checkout session
Cause: The
checkoutSession ID is expired, invalid, or was created with different API keys.Solution:- Create a fresh checkout session server-side before calling
startCheckout() - Ensure the session was created with the same API keys
- Checkout sessions expire after 24 hours; generate a new one if needed
An invalid session ID may cause a React DOM error (
NotFoundError: Failed to execute 'removeChild' on 'Node') rather than a user-friendly message. This is a known SDK behavior.publicApiKey=[object Object] is not valid
publicApiKey=[object Object] is not valid
Cause: An object was passed to
Yuno.initialize() instead of a string.Solution: Pass the public API key as a string argument, not inside a configuration object:Mounting Errors
MOUNT_ERROR: Element not found
MOUNT_ERROR: Element not found
Cause: The
elementSelector does not match any element in the DOM at the time of mounting.Solution:- Verify the selector matches an existing element:
document.querySelector('#yuno-checkout') - Ensure the element exists in the DOM before calling
mount(not inside a conditional render that has not rendered yet) - For React/Vue/Angular, mount inside
useEffect,onMounted, orngAfterViewInit
MOUNT_ERROR: Already mounted
MOUNT_ERROR: Already mounted
Cause: Attempting to mount the checkout multiple times without unmounting first.Solution: Call
yuno.unmount() before re-mounting, or guard against duplicate mounts:Runtime Errors
PAYMENT_ERROR: Token generation failed
PAYMENT_ERROR: Token generation failed
Cause: Secure Fields could not generate a one-time token due to invalid card data or network issues.Solution:
- Ensure all required Secure Fields are mounted and filled (card number, expiry, CVV)
- Validate field states via the
onFieldChangecallback before callinggenerateToken() - Check browser console for network errors
CORS errors in browser console
CORS errors in browser console
Cause: Cross-Origin Resource Sharing policy blocking SDK requests.Solution:
- Verify your domain is registered in Dashboard > Settings > Allowed Origins
- Add both
http://localhost:PORT(development) and your production domain - Do not use
file://protocol; serve your page from an HTTP server
3DS challenge not displaying
3DS challenge not displaying
Cause:
continuePayment() not called after payment creation, or popup blockers interfering.Solution:- Always call
yuno.continuePayment()after your server creates the payment - Ensure the call happens in response to a user action (not in a background timer)
- Check for popup/iframe blockers in the browser
- Verify the payment response contains
status: 'REQUIRES_ACTION'
Version-Specific Issues
| SDK Version | Known Issue | Workaround |
|---|---|---|
| All versions | Yuno.initialize() requires string argument | Pass public API key as string: Yuno.initialize('key') |
| All versions | mountCheckout() required after startCheckout() | Always call both methods in sequence |
Debugging Tips
Inspect network requests
Open DevTools > Network tab, filter by “y.uno” to see all SDK API calls and their responses.
Verify SDK version