# Quick start

This assumes your backend has already created a session (see [Integration steps](/cashier/integrate)) and handed `sessionId` and `token` to your frontend.

```typescript
import CashierSDK, { CashierEmitEvent } from "@omno-payment/checkout-js";

// Use the checkout domain Omno assigned to your account (default below)
const cashier = new CashierSDK({ baseUrl: "https://checkout.omno.com" });

// UI reactions only — not authoritative for money movement
cashier.on(CashierEmitEvent.PAYMENT_SUCCESS, (data) => {
  console.log("Payment success", data);
});
cashier.on(CashierEmitEvent.PAYMENT_FAILED, (data) => {
  console.error("Payment failed", data);
});

// sessionId and token come from POST /v3/public/cashier/session
const sessionId = "25aee2fd-fd2a-4a1c-a127-df26206b2a30";
cashier.open({ sessionId, token });
```

> ℹ️ **Note:** Import `CashierEmitEvent` (and any other enums you use, such as `DeviceType` and `PaymentAction`) from the package. Referencing `CashierEmitEvent` without importing it throws a `ReferenceError`.


> ℹ️ **Note:** The `token` from the create-session response is **required** to open the session, and `baseUrl` is **required** on the constructor. See [Opening the Cashier](/cashier/sdk/open) and [Configuration](/cashier/sdk/configuration).


> ⚠️ **Warning:** SDK events are for UI updates only. Credit or debit balances only after a [webhook](/guides/concepts/webhooks) or a GET on the transaction confirms the final status.


## Build it →

- [Configuration](/cashier/sdk/configuration) · [Opening the Cashier](/cashier/sdk/open) · [Events](/cashier/sdk/events)