What is the best practice for creating a fixed amount coupon programmatically in a custom module?
I want to calculate a value and then create a coupon code for that fixed amount it programmatically.
Thanks
Check out answer here:
Also check the tutorial from within the answer.