Skip to main content
Choose how the checkout appears to your customers. Each mode has different trade-offs for user experience and implementation complexity. During checkout, the customer enters their card on our processor’s secure hosted payment page. Checkout currently runs as a full page: in the customer’s current window (redirect), a popup, or a new tab. Iframe embedding is in progress (see Iframe Mode).

Quick Comparison

Iframe embedding is coming soon. Until it’s available, a session created with embedMode: "iframe" runs as a full-page redirect, and the response includes an EMBED DOWNGRADE message in warnings. To keep customers on your site today, use popup or new tab mode.
Popup and new tab modes are self-serve. Pass parentOrigin in your session create request. No registration or approval process is needed.

Redirect Mode (Default)

What Happens

  1. Customer clicks “Pay” on your site
  2. Their browser leaves your website and goes to the Ozura checkout page
  3. After payment, they’re redirected back to your successUrl, cancelUrl, or errorUrl

When to Use

  • Mobile apps (popups often blocked on mobile)
  • Simple websites without JavaScript
  • Email payment links
  • When you want the simplest possible integration

Implementation

Step 1: Create Session (SERVER CODE)
Step 2: Redirect the Customer (BROWSER CODE)
No registration needed. parentOrigin is required for popup mode. Set it to the exact origin of the page that opens the popup, for example https://yoursite.com (https://, host, and port if any; no path). Checkout sends its result messages only to that origin, so a mismatch means your page never receives them.

What Happens

  1. Customer clicks “Pay” on your site
  2. A popup window opens with the checkout
  3. In the popup, the customer enters their details and continues to the secure payment page to enter their card
  4. When they finish, checkout sends a postMessage event to your page (PAYMENT_SUCCESS or CHECKOUT_CANCELLED) and closes the popup
  5. Your page updates without a reload

When to Use

  • Desktop websites where you want customers to stay on your page
  • Single-page applications (SPAs)
  • When you want to update your page without a full reload

Implementation

Step 1: Create Session with embedMode: "popup"
Step 2: Open Popup and Listen for Result Open the popup directly from the customer’s click. Browsers block popups opened any other way (for example after an await or a timer).
Keep your successUrl and cancelUrl working. If the popup can’t send its message back (for example the customer closed your original page, or the browser cut the link between the two windows), checkout sends the customer to your successUrl or cancelUrl inside the popup instead.
PAYMENT_SUCCESS is a browser message, not proof of payment. Verify the payment server-side before fulfilling the order.

Iframe Mode (Coming Soon)

Embedding checkout in an iframe on your own page is in progress and not available yet. Until then, if you create a session with embedMode: "iframe", checkout still creates the session but runs it as a full-page redirect. The response tells you so:
The warning describes how checkout behaves today. To keep customers on your site in the meantime, use popup mode or new tab mode.

New Tab Mode

What Happens

  1. A new browser tab opens with the checkout
  2. Your original site stays open in the first tab
  3. The customer completes payment in the new tab
  4. What happens next depends on parentOrigin:
    • With parentOrigin: checkout sends the same postMessage events as popup mode to your original tab, then closes the new tab.
    • Without parentOrigin: the new tab goes to your successUrl or cancelUrl, and your original tab receives no events.

When to Use

  • When popups are blocked (some browsers block popups but allow new tabs)
  • When you want your site to stay open while customer pays

Implementation

To receive events in your original tab, create the session with parentOrigin and add the same message listener shown in popup mode. Don’t open the tab with noopener: it removes the link checkout uses to send the events back.

PostMessage Events Reference

In popup mode, and new tab mode with parentOrigin, checkout sends these events to your page. They come from the checkout domain you created the session on (https://checkout.ozura.com, or https://sandbox-checkout.ozura.com in sandbox) and are sent only to your parentOrigin.
Declined cards don’t send an event. The customer can retry with another card on the payment page. If they give up and come back, you receive CHECKOUT_CANCELLED.
When the event reaches your page, checkout closes the popup or tab. If it can’t send the event, checkout instead sends the customer to your successUrl (with transaction details as query parameters) or cancelUrl in that window.

Which Mode Should I Use?