3U

POS SDK

Build point-of-sale applications for in-store retail.

POS Session

Every POS session is tied to a specific location and cashier.

Initialize POS
TypeScript
import { ThreeuPOS } from "threeu-sdk/pos";

const pos = new ThreeuPOS(process.env.THREEU_POS_TOKEN!, { brand: "brand-slug" });

const session = pos.session({
  locationId: "location_123",
  cashierId: "user_123"
});

Cart Operations

Create carts, add items, apply discounts, and checkout:

POS Cart Workflow
TypeScript
const cart = await session.cart.create();

await cart.addItem({ productId: "prod_123", quantity: 2 });
await cart.addItem({ productId: "prod_456", quantity: 1 });

await cart.applyDiscount({ type: "percentage", value: 10 });

const payment = await cart.checkout({ method: "card" });
console.log(payment.receiptId);