Section 34 of the Basic Conditions of Employment Act prohibits deductions from remuneration unless the employee agreed in writing to that specific deduction, or the deduction is required or permitted by law, a collective agreement, a court order or an arbitration award. PAYE, UIF and a garnishee order fall into the permitted category. A blanket clause in a contract saying the employer may deduct whatever it sees fit does not.
Deductions for loss or damage have their own conditions, and this is where most unlawful deductions happen. The loss must have occurred in the course of employment and be due to the employee's fault, the employer must follow a fair procedure allowing the employee to show why the deduction should not be made, the total may not exceed the actual loss, and it may not exceed a quarter of the employee's remuneration in any single payment.
Deducting for a till shortfall, a broken item or a customer who did not pay, without that process, is unlawful even where the underlying loss is genuine.
If it has happened to you, the payslip is your evidence, which is one more reason the Act requires every deduction to be listed separately. Complaints go to the Department of Employment and Labour.