first version of payment functionality