Closed alexung closed 11 months ago
@alexung I had a similar situation where I wanted to charge a per seat price ($5/user/month). I was able to accomplish it by updating the quantity of the plan. In my scenario I have subscriptions on the Company instead of User:
def update_subscription_quantity(quantity)
stripe_plan_id = company.subscription.plan.stripe_id
stripe_customer = Stripe::Customer.retrieve(company.subscription.stripe_id)
stripe_customer.update_subscription(stripe_plan_id, quantity: quantity)
end
@neeaagh - Does this charge users accordingly if they purchase a "seat" half-way through a billing cycle?
@ACPK In @neeaagh's example, he's just using the native Stripe functionality for adding quantities of a subscription. As a result, it's going to use Stripe's proration logic. (I don't remember off the top of my head what it will do in this situation.)
Hi folks,
First off, thanks for your work on Koudoku -- the engine looks fantastic.
Secondly, would like to ask about how to use a multiplier for each subscription model -- what I mean is that consumers would be charged 1 price / 1 subscription / month and if they were to buy more subscriptions to the same product then it would multiply the price accordingly.
For instance, if a single monthly subscription to product X is $1 / month, then I would like users to be able to purchase multiple subscriptions to this same product, (if they purchase 3, then they're essentially paying $3 / month).
Is this possible? And if not, do you know of alternatives in the rails community that might suit this need?
Thanks!