Create Coupon Programmatically in Magento 2 is the process of first create a Sales rule with basic details, next get rule id and apply rule id to the generate the new coupon.
Create Sales Rule using Magento\SalesRule\Api\Data\RuleInterfaceFactory and Coupon using Magento\SalesRule\Api\Data\CouponInterface.
