How can I pass in a quantity value while creating a subscription?
Craft CMS (3.1.21)
Craft Commerce (2.1.2)
Stripe for Craft Commerce (1.2.0)
Problem: My website allows users to subscribe to meal plans. For example, a user can subscribe to receive 5 vegetarian meals per week. Another user may also subscribe to recieve 10 meals per week. Currently, I must create two subscritpion plans on Stripe and on Craft (i.e Vegetarian-5 and Vegetarian-10). Stripe's API offers the ability to create a single plan that charges per quantity (i.e I want to create one Vegetarian Plan and charge $10 per meal).
I wrote a plugin that uses createSubscription() from craft\commerce\services. However, ideally I want to send a quantity value but after reviewing Craft's logic for this function, I am unable to figure out a way to pass in a quantity value. However, I could easily bypass Craft and use the Stripe's API to do this (setting subscription quantity through stripe API) but that feels like the wrong solution.