/plugin namespace on the public app/API origin. The game server always initiates the connection and exposes no inbound port.
Authentication
The namespace handshake sends:plugin key with orders:write. The key is shop-bound, serverId must belong to that shop, and the key owner must still have shop access. Any invalid connection gets the same unauthorized error without revealing which check failed.
Protocol v1 events
The backend replays all outstanding deliveries on every connection and pushes after payment or status changes. Duplicate
order:deliver events are expected: execution authority comes from the atomic claim and local journal, not from merely receiving an event.
Safety states
paidordispute→processing: only one instance wins the conditional database transition.- The plugin writes and fsyncs
EXECUTINGbefore the first command. - After the final command it writes and fsyncs
AWAITING_ACK. order:completechanges the order tocompleted; only its ACK removes the local entry.- A restart with
AWAITING_ACKretries only the ACK. A restart withEXECUTINGnever replays commands and starts manual review.
Do not delete the journal to “unstick” an order. Check the actual player/server state and resolve it in the panel.
retry clears the server-side claim and allows a new push; complete accepts the delivery without replaying commands.Command formatting
The API formats product commands before returning the claim winner’s fresh snapshot:
Math expressions use a restricted parser and are never evaluated as code.
quantityTiers, the command variant, and package bonuses are resolved by the API. The plugin additionally rejects any command whose first word appears in blockedCommands.
If a product requires the player online, an instance executes only after seeing the exact nickname on an allowed server. A locally parked delivery is checked through order:verify so an order cancelled or refunded in the meantime cannot run from a stale event.