Generate and validate coupon codes.