How do i connect class packs to the calendar?

Question:
How do i allow customers to buy a pack of 3, 5 or 10 classes then allow those customers to use the packs to book calender classes. Is this possible on wix?

Product:
Service and or Product

What are you trying to achieve:
We run a fitness cafe, we want to allow customers to buy a block of classes then use those classes to book on the calendar for there workouts, so we know how many sessions each person has done. I.e someone who has brought 5 classes cannot book a 6th one

What have you already tried:
I have made a calendar, a membership service page which connects different membership packages to the calendar and also 3 products for the 3 different class packs (3,5 and 10). It’s all mingled together and very confusing

Additional information:
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]

Wix subscriptions app Pricing Plans.