Installation ​
Dependencies and start order ​
Install the resource as np_commerce. The manifest requires oxmysql, np_payments, np_inventory and np_faction. Configure their database and account/inventory bridges first. Use ESX and np_inventory for the first deployment.
ensure oxmysql
ensure es_extended
ensure np_banking
ensure np_inventory
ensure np_faction
ensure np_payments
ensure np_admin
# Optional hosts and providers, before commerce when installed:
# ensure np_jobs
# ensure np_npchandler
# ensure np_phone
# ensure np_screens
# ensure np_logistics
ensure np_commerce
np_admin is used through a vendored bridge; grant the appropriate np_commerce.* nodes in your staff permission setup. Optional dependencies are checked at runtime, but an adapter file does not guarantee that your installed sibling exposes its expected APIs. See Integrations.
Build and database ​
cd np_commerce/web
npm ci
npm run build
The resource loads web/dist/index.html and registers web/dist/phone.html with np_phone. A source checkout needs this build before the resource starts. Keep the production build separate from the fixture-based mock build.
The server ships oxmysql startup migrations under server/core/schema/ and server/core/06_migrations.lua; sql/schema.sql is the reference schema. Back up an existing database before updating. Register commerce_receipt, commerce_loyalty and commerce_delivery_bag with your inventory using shared/items.lua; sql/items_esx.sql is provided for ESX items.
First venue ​
Create an np_faction business, grant its ranks the commerce feature nodes, and configure a business and venue as shown in Configuration. Add faction places for the register and stations. Set hours, menu and stock, then test a sale, refund, ticket handover and resource restart.
The local verification entry point is bash tests/run.sh; the web project also provides npm test and npm run build. These checks use stubs and browser fixtures. They do not establish live account settlement, inventory handover or compatibility with every sibling version.
Held transfers ​
If a provider moves money or items but the final database write fails, commerce holds the durable claim for reconciliation. Inspect commerce_operations, the payment reference, stock/till ledgers and the provider transaction before repairing a processing or needs_review record. Confirm what actually moved; replaying an ambiguous request can duplicate a transfer. Back up the database and record the repair in the audit log.