Mandatory codes are pay codes that your accounting software must receive to record your current or previous pay runs successfully. These codes are common to any business. If not correctly configured, the journal entries submission between Moonworkers and your accounting software will fail.
For example, a part of an employee's salary integrates both employer and employee National Insurance Contributions. Therefore, your accounting software expects to receive a code associated with this amount, so it knows in which account to save it.
Optional codes are payroll information that is specifics to your business.
For example, sales commission schemes or employee bonuses may not apply to all employees and businesses. Therefore, they are optional.