The chemical reactions and pathways involving saponins, glycosides of plants in which the aglycan (sapogenin) group is a terpene or steroid and the sugar group is a glucose, a galactose, a pentose, a methylpentose or an oligosaccharide. Saponins are powerful surfactant agents and membrane active; they are, hence, toxic to animals on injection.