Generate and check coupon code