Edit reference payment function