Skip to main content
Opens the payment page in an iframe for a given session ID.
Pass iframeConfig directly to open a session created by your backend — the recommended integration. If you omit it, the SDK reuses the iframeConfig from a previous createSession() call on the same instance.
Iframe mode requires your domain to be whitelisted in your Payviox dashboard settings.
An iframe doesn’t guarantee the customer stays on your page. Redirect-based providers (PayPal, Zen, Nicepay, Payssion, Pallapay, Crypto.com) can’t render inside an iframe, so picking one triggers a full-page navigation to the provider. To keep the customer on your page in all cases, restrict the session to a non-redirect method — for example paymentMethodId: 'stripe_credit'. See Iframe integration.

Parameters

string
required
The session ID to display in the iframe. Returned by POST /session or by createSession().
IframeConfig
Iframe configuration. Required unless a previous createSession() call on this instance already provided one.

Examples

Session created by the SDK

If you don’t need to do anything between session creation and display, iframeMode: true in createSession() opens the iframe for you.

Errors

Throws Iframe target is required when no iframeTarget is available — neither in the iframeConfig argument nor from a previous createSession() call.