Promo Code or Gift Card

Is there any add-ons for generate promo code for customers then they add when they are going to checkout
$49 is abit much
How long would it take you or a developer to create such a feature? And to keep it updated version to version.
It's great add-on with lot programming and it's very good price.