Docs BETA
/

Configuration

Configure your vendOS defaults


When starting up your vendOS instance you can configure some parameters. Below you have a list of those and an example containing all possible options.

Example

const vendos = require('vendos')

const OS = new vendos({
  fieldCommand: {
    background: '#000000',
    manualRestock: true
  },
  machine: {
    doorTimeout: 20,
    vendAttempts: 5
  },
  data: {
    full: 'overwrite'
  },
  payment: {
    valina: {
      currency: 'GBP',
      port: 9000
    },
    nayax: {
      currency: 'EUR'
    }
  }
})

FieldCommand

PropTypeDefaultDescription
backgroundstring#000000Background colour of the frame.
manualRestockboolean#000000If set, the channel status' won't be reset automatically when the machine door opens and closes; and a button will need to be pressed to do this.

Machine

PropTypeDefaultDescription
doorTimeoutinteger20Seconds until the vend door automatically locks closed.
vendAttemptsinteger80Amount of vend attempts until the vend fails. This can also be overwritten by each individual vend method.

Data

PropTypeDefaultDescription
fullstringdeclineProtocol if the local storage is full. Accepted options are:
decline - The promise will be caught.
overwrite - The oldest stored data will be overwritten.

Payment

Valina

PropTypeDefaultDescription
currencystringEURCurrency code that the card will be charged in. The terminal must be set to the same.
portinteger9000Port to look for the Valina on the local network. The terminal must be set to the same.

Nayax

PropTypeDefaultDescription
currencystringEURCurrency code that the card will be charged in. The terminal must be set to the same.