Quick start
Install the plugin, configure Vendure and make your first sale.
Try it first
The live demo is the till signed in to a simulated store in your browser, with nothing to install.
The hosted POS is live at https://app.vendurepos.com. The plugin is
published on npm as @vendurepos/plugin.
Start with a working Vendure 3.6+ project backed by Postgres (3.7.3 is the
tested version). Run store commands from that project's root.
No Vendure project yet? Vendure's guide Installing Vendure with @vendure/create
creates one with npx @vendure/create my-shop, and sets up Postgres for you if Docker Desktop is installed.
The plugin needs Node ^20.19 || >=22.12, as Plugin setup says.
Before a sale on a live store
If your store uses @vendure/email-plugin, swap its order-confirmation handler first: see Set up email. Each sale also runs in one database transaction, so read Check your own code if your store has its own order hooks, event handlers or strategies.
1. Install the plugin
npm install @vendurepos/plugin@0.3.02. Add TallyPosPlugin to your existing Vendure config
The plugin's code names say Tally, not VendurePOS: TallyPosPlugin, the TallyPosSell permission and the /tally/v1 routes, which take the till's TallyUI commands (VendurePOS is built on TallyUI).
Keep your other
plugins and settings. This plugin has no .init() options:
import { TallyPosPlugin } from '@vendurepos/plugin';
// Inside your existing VendureConfig:
plugins: [/* your existing plugins, */ TallyPosPlugin],It registers the order custom fields, price and stock strategies, payment
handler, and /tally/v1/commands and /tally/v1/info routes.
3. Generate and run the migration before starting the server
Keep
dbConnectionOptions.synchronize: false. With the plugin added, save this
as src/generate-migration.ts, next to src/vendure-config.ts:
import { generateMigration } from '@vendure/core';
import { config } from './vendure-config';
generateMigration(config, { name: 'AddVendurePos', outputDir: './src/migrations' })
.catch(error => { console.error(error); process.exitCode = 1; });Run it (tsx is the TypeScript runner VendurePOS's own dev store uses):
npx tsx src/generate-migration.tsReview the generated migration and include it in
config.dbConnectionOptions.migrations (or your existing migration glob).
Then save this as src/run-migrations.ts:
import { runMigrations } from '@vendure/core';
import { config } from './vendure-config';
runMigrations(config)
.catch(error => { console.error(error); process.exitCode = 1; });Run it:
npx tsx src/run-migrations.tsThe schema includes the command ledger, order/line custom fields and indexes, stock top-up recovery fields, and register/session/movement/closure tables. Generate against your store's current schema.
Other ways to run the migration
For projects scaffolded with @vendure/create, Vendure's CLI alternative is npx vendure migrate (generate and run interactively).
Instead of generating a migration, you can register the plugin's bundled migrations, which the README describes; see Plugin setup. Do not also run the bundled migrations for the same changes.
4. Enable bearer authentication
Merge this into authOptions, retaining
your credentials and other settings (and any other token methods you need):
tokenMethod: ['bearer', 'cookie'],Sign in with a Vendure administrator whose role in the till's channel has these permissions:
TallyPosSell, which opens the plugin's sale routes (CreateOrder, which is broader, also works)ReadCatalogReadSettingsReadCustomerCreateCustomerReadOrder, or the till sells but its order history is refused
Give each cashier their own administrator with only that role, not a shared login: see Give each cashier their own account.
For a key per till instead, see Optional: a device key for each till below.
5. Allow the POS origin through CORS
In a project made with @vendure/create, the allowed origins are the CORS_ORIGINS line in the project's .env
file, a comma-separated list. Add https://app.vendurepos.com:
CORS_ORIGINS=https://app.vendurepos.comFor testing, add the exact local POS origin after a comma, with no space, for example ,http://localhost:8081.
Then restart the server.
Left empty, it allows no origins unless APP_ENV is dev. A project without CORS_ORIGINS sets the origins in
apiOptions in vendure-config.ts: merge this in and keep any other allowed origins:
cors: {
origin: ['https://app.vendurepos.com', 'http://localhost:8081'],
credentials: true,
},Use an object, so Vendure exposes vendure-auth-token for bearer sign-in.
Origins contain no path; localhost and 127.0.0.1 are different origins.
If your store already allows vendurepos.vercel.app
A store that already allows https://vendurepos.vercel.app keeps it for as
long as anyone still opens the POS at that address.
6. Choose tax rounding for your pricing mode
These settings
are store-wide and also affect the web shop; the plugin does not choose them
for you. Keep DefaultTaxLineCalculationStrategy for line tax and the default
money strategy. Choose the order tax strategy as follows:
| Channel pricing | tax |
|---|---|
Tax-exclusive (prices) | new Order |
Tax-inclusive (prices) | new Default |
For a tax-exclusive store, merge this into your config:
import { DefaultTaxLineCalculationStrategy, OrderLevelTaxCalculationStrategy } from '@vendure/core';
taxOptions: {
taxLineCalculationStrategy: new DefaultTaxLineCalculationStrategy(),
orderTaxCalculationStrategy: new OrderLevelTaxCalculationStrategy(),
},For inclusive pricing, import DefaultOrderTaxCalculationStrategy from
@vendure/core and use it for orderTaxCalculationStrategy instead.
Why these pairings
The single-rate totals match with these pairings; multiple rates can still need
the plugin's rounding surcharge. A store mixing pricing modes must account
for the store-wide strategy. /tally/v1/info advertises the actual rounding.
7. Prepare the channel and stock, then restart Vendure
- Assign the products and stock locations to the channel you will use, with a usable default stock location.
- Check its currency,
pricesIncludeTax, default tax zone and enabled tax rates (including a zero rate where appropriate). - Keep the manual fulfilment handler enabled.
How POS sales take stock.
The plugin wraps your store's
catalogOptions.stockLocationStrategy, so POS sales take stock where it
allocates, across several locations if it splits a line; any quantity it
leaves unallocated comes from the channel's default stock location. Short
stock is topped up so the sale goes through, at the strategy's first location
or, when it cannot cover the sale, the default location. A custom stock
strategy must allocate each POS line in full by PaymentSettled, or the sale
is refused as a store configuration problem. A per-sale locationId is refused.
On server start the plugin creates or assigns the tally-pos payment method,
tally-in-store shipping method and walk-in customer to each channel. Keep
the POS payment method enabled and its handler/checkers intact. Restart after
adding a channel so it receives this setup.
8. Sign in and make a sale
Open https://app.vendurepos.com, then:
- Enter the store URL (for example
https://store.example.com; a trailing/admin-apiis accepted), your administrator email and password. - Enter the optional channel token to select a channel; leave it blank for the default channel.
- For scanning, enter the name of an existing single text
ProductVariantcustom field, such asbarcode; leaving it blank disables this field choice (how to add one). - Wait for the catalogue and settings, enter the counted opening float and open the register.
- Search for or scan a product and add it to the cart.
- Choose cash, or record a payment already taken on your external card terminal, and complete the tender. For cash, enter the amount received.
- Check the receipt and change; print the receipt through the browser if needed.
- Once the order has synced, check it in Vendure: see Check it worked below.
- To try offline sales, sync first, disconnect while the POS stays open, sell, then reconnect and let orders drain.
Check it worked
Once the till shows the order as synced, open the order in the Vendure Dashboard:
- the line prices are the ones the till charged;
- the payment is
tally-pos, settled; - the fulfilment is delivered;
- stock for each product went down;
- the order's
tallySaleAtcustom field is set.
9. Troubleshoot
- The till cannot reach the store (CORS)
Check the exact POS origin inCORS_ORIGINS, the object-valuedapiOptions.cors, and restart the server. Use HTTPS for a remote store. A store on your own machine can stay on plain http athttp://localhostorhttp://127.0.0.1; for a LAN store over plain http, see Troubleshooting. - HTTP 401
Verify'bearer'intokenMethod. - “Your session has ended. Sign in again to keep selling.” or “The store refused this sign-in. Sign in again below; orders are kept.”
Sign in again. Check the credentials and channel token if sign-in or settings reads still fail. - “This store's VendurePOS plugin is missing or out of date. Install or update it, then this till continues.”
The store must advertiseorder.createv4 and register v1; plugin 0.3.0 advertisesorder.create1–5, which includes v4. Install/update the plugin, apply its schema changes and restart Vendure; the till retries. - “Sales aren't reaching the online store. Keep selling: they're saved on this till and will send by themselves.”
Check that/tally/v1/infoand/tally/v1/commandsreach the plugin through the store's proxy. Keep queued orders while fixing the store.
Optional: a device key for each till
A till can sign in with its own Vendure API key (Vendure 3.6+): add 'api-key'
to the step 4 tokenMethod list, then create the key in the till's channel with
the Dashboard's New POS till key button. On plugin 0.3.0 the role it creates
(vendurepos-pos-till) has the step 4 permissions except ReadOrder, so add
ReadOrder to that role yourself. The plugin's
README
covers its role and the setting pnpm projects need. On the POS sign-in screen,
choose Device key, then paste the key and the till's channel token. The POS
shows the key's name as the till on its receipts. Signing out forgets the key on
that device; it does not revoke it. A till whose key is revoked asks for a new
one and keeps its cart.