Catalyzes the carboxylation of beta-amyrin at the C-28 position to form oleanolic acid. Involved in an early step in the hemolytic saponin biosynthetic pathway (PubMed:21821776, PubMed:22039103, PubMed:23378447). Catalyzes the carboxylation of alpha-amyrin and lupeol at the C-28 position to form ursolic acid and betulinic acid respectively (PubMed:22039103). beta-amyrin + 3 O2 + 3 reduced [NADPH--hemoprotein reductase] = 4 H(+) + 4 H2O + oleanolate + 3 oxidized [NADPH--hemoprotein reductase] Expressed in roots, nodules and flowers. Severe reduction in root and shoot size. Belongs to the cytochrome P450 family.