Move discount API into service