You don't really need an app for this. You can use the discount engine present in your shop (if you have Professional or above plans); generate a random code, with the appropriate amount, make it one-time use only, and then give it to your customer.
Should solve your issue. It may not work exactly how you want, but you should take a look at it as a possible solution, if you haven't already.