Moodle only has very basic eCommerce facilities. There is only a PayPal plugin for purchasing complete courses.
I very much doubt what you are looking for exists. It would require some custom development. If you are going down that road, I would look at integrations with full eCommerce solutions (e.g. WooCommerce)