Open a session with cashier.open(...). The token from the create-session response is required.
| Field | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | Session ID from POST /v3/public/cashier/session. |
token | string | Yes | Cashier token from the same create-session response. Authorizes opening this session; the SDK attaches it to the Cashier URL. Treat it as opaque. |
containerId | string | No | ID of an element to mount the Cashier into. Omit for a modal. |
paymentAction | PaymentAction | No | Land directly on DEPOSIT or WITHDRAW. |
layout | 'single' | No | Single-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:
tokenis required (≥@omno-payment/checkout-js1.0.29). Opening without it is rejected.