Manually opens an iframe for a given session ID.
openIframe(sessionId: string): void
This method requires iframeConfig to be set during SDK initialization via the parameters property.
Parameters
The session ID to display in the iframe.
Example
const payviox = new Payviox('your_api_token');
// Create session without automatic iframe
const sessionId = await payviox.createSession({
amount: 5000,
currency: 'USD',
customer: '[email protected]',
description: 'Order payment',
paymentMethodId: 'pm_card',
order_id: 'order_123',
items: [{ name: 'Product', quantity: 1, price: 5000 }]
});
// Configure and open iframe later
payviox.openIframe(sessionId);
In most cases, using iframeMode: true in createSession() is more convenient than calling this method manually.