Troubleshooting
This page describes common problems in a Unified Checkout integration and how to resolve them. For the complete list of client-side error codes, see Error Handling. For server-side HTTP status codes and reason values, see Reason Codes.
The Session Is Expired or Invalid
Problem: VAS.UnifiedCheckout(sessionJWT) rejects with a CAPTURE_CONTEXT_EXPIRED or CAPTURE_CONTEXT_INVALID error, and the payment UI never loads.
Cause: CAPTURE_CONTEXT_EXPIRED occurs when the capture context JSON Web Token (JWT) was generated too long before the customer's browser initializes the SDK. CAPTURE_CONTEXT_INVALID occurs when the JWT has a bad signature or is malformed, often because it was truncated, modified, or generated against the wrong environment (test instead of production, or the reverse).
Resolution: Generate a new session immediately before the customer starts checkout rather than caching a capture context across page loads. Pass the JWT to the browser exactly as your server received it from the Sessions API, without modification. Confirm that the Sessions API request and the SDK script tag point at the same environment.
The Payment UI Does Not Mount
Problem: checkout.mount() or trigger.mount() throws an error, or the payment UI never appears in the page.
Cause: Mount failures usually trace back to the container element or the network. These reason codes cover the common causes:
| Reason code | Likely cause |
|---|---|
SHOW_LOAD_INVALID_CONTAINER | The container parameter passed to mount() is not a valid CSS selector string or HTMLElement. |
SHOW_LOAD_CONTAINER_SELECTOR | The CSS selector you passed to mount() does not match any element in the DOM at the time mount() is called. |
SHOW_LOAD_SIDEBAR_OPTIONS | The container parameter is not valid for sidebar mode, for example a paymentSelection/paymentScreen object was passed when only a single sidebar selector was expected. |
SHOW_LOAD_ERROR | A problem occurred loading the payment iframe, often a Content Security Policy (CSP) restriction or a network failure. |
SHOW_TOKEN_TIMEOUT / SHOW_TOKEN_XHR_ERROR | Token creation timed out or failed over the network during mount. |
SHOW_PAYMENT_TIMEOUT | A payment method timed out during initialization. |
SHOW_PAYMENT_UNAVAILABLE | No payment types could be presented to the customer, often because the browser or device does not support any of the configured payment methods. |
Resolution: Call mount() only after the target container exists in the DOM. Confirm the container selector matches an element on the page before you call mount(), and confirm your CSP allows the Unified Checkout iframe origin. Check the customer's network connectivity for timeout and network-related reason codes.
Origin and Content Security Policy Mismatches
Problem: The SDK fails to initialize, or mount() fails, even though the capture context and container selector both look correct.
Cause: The targetOrigins array in your session request must include the exact origin that hosts the SDK. If the page origin does not appear in targetOrigins, or your CSP blocks the Unified Checkout script or iframe origin, initialization or mount fails.
Resolution: Confirm that targetOrigins in your Sessions API request includes every origin from which the SDK is loaded, including port numbers if your environment uses a non-default port. If your page enforces a CSP, add the Unified Checkout script and iframe origins to your script-src and frame-src directives.
Session Initializes with an UNUSED_TARGET_ORIGINS Error
Problem: VAS.UnifiedCheckout(sessionJWT) rejects with an UNUSED_TARGET_ORIGINS error.
Cause: One or more entries in the targetOrigins array do not match the current page origin. The error details array lists the specific origins that were not used.
Resolution: Remove unused origins from targetOrigins, or confirm that the page loading the SDK is served from one of the listed origins. Regenerate the session after correcting targetOrigins.
Next Steps
- Test Your Setup — validate error handling before you move to production.
- Error Handling — the complete client-side error code reference.
- Reason Codes — server-side HTTP status codes and reason values.
Thanks for your feedback!
Last published: September 29, 2026