add managed payments function