I was facing this very issue a year or so back and found no 'native' answers. I did a bit of reading and found aMember which has an integration with Moodle and does all you want... and a heck of a lot more besides.
aMember is a member management system and completely removes the need to manage users from within Moodle - you can set up custom registration forms and grant access to any course (as a piece of content) for any amount of time, set up recurring billing and so on. It isn't free, but it is not expensive either... but you'll need quite a good understanding of your server folder structure and how things work in order to install it correctly. You would benefit from having a friendly developer on your team, but having said that I've set it up now a couple of times for different clients and it works pretty well.
You specifically asked about discount codes and so on - the answer is a very clear 'yes'... it does this very easily.
I would have preferred a more moodle-ish solution, but in the absence of anything this is a pretty good alternative.
I hope this helps!