Skip to content

Opening the Cashier

Open a session with cashier.open(...). The token from the create-session response is required.

FieldTypeRequiredDescription
sessionIdstringYesSession ID from POST /v3/public/cashier/session.
tokenstringYesCashier token from the same create-session response. Authorizes opening this session; the SDK attaches it to the Cashier URL. Treat it as opaque.
containerIdstringNoID of an element to mount the Cashier into. Omit for a modal.
paymentActionPaymentActionNoLand directly on DEPOSIT or WITHDRAW.
layout'single'NoSingle-column layout for a Single Payment.
import { PaymentAction } from "@omno-payment/checkout-js";

// Modal (default)
cashier.open({ sessionId, token });

// Inside your own container
cashier.open({ sessionId, token, containerId: "cashier-slot" });

// Land directly on deposit or withdrawal
cashier.open({ sessionId, token, paymentAction: PaymentAction.WITHDRAW });

// Single-column layout (Single Payment)
cashier.open({ sessionId, token, layout: "single" });

ℹ️ Note: token is required (≥ @omno-payment/checkout-js 1.0.29). Opening without it is rejected.

Build it →