Skip to main content
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

sessionId
string
required
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: 'user@example.com',
  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.