Generate automatic discount codes for a service

Question:
Hi everyone, I’ve been recently trying to get a way to fully automate the process for booking some driving lessons and wanted to know if it was possible.

Product:
Wix Payments, automations

What are you trying to achieve:
Basically what I want to do is when a customer buys a specific products he gets a discount code (which has to be different for each customer and must reduce the cost to 0 so either a 100% discount or €60) which can only be used in my driving lessons booking service page and it must have a maximum amount of uses.

Example: My customers buy a product that includes 6 driving lessons (each of 1h) , after the checkout the customer gets an email with an automatically generated coupon to use on my booking page that reduces the cost to 0 in that way any client can program their driving lesson without having to pay again at the checkout.

What have you already tried:
I am not an expert when it comes to wix or programming so that’s why I ask here for help, I’ve tried with webhooks but with no success, most likely for my inability when it comes to technical stuff. I also tried wix automations but it didn’t look like the best idea since I couldn’t connect a specific product or service and couldn’t generate random coupons.

Additional information:
I am open to new ideas, just keep in mind my low programming skills (always if these can be considered as such) but even if it’s a bit complicated as long as I have a guide I can do it.

Yes, you can fully automate this process in Wix using Wix Automations, Coupons, and custom code (Wix Velo).

So it require coding and I will be glad to assist you with that?

Thanks for the answer. Yes I’d appreciate very much your help.