Catalysis of the reaction: pyridoxamine 5'-phosphate + H2O + O2 = pyridoxal 5'-phosphate + NH4+ + hydrogen peroxide. This activity can also oxidize pyridoxine 5'-phosphate to pyridoxal 5'-phosphate + hydrogen peroxide.
pyridoxine (pyridoxamine)phosphate oxidase activity