Skip to content

Commit

Permalink
fix: include current seat count when creating stripe customer (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-chaturvedi authored Aug 5, 2024
1 parent e42e065 commit c0a1790
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/ee/billing/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
def create_stripe_customer(organisation, email):
stripe.api_key = settings.STRIPE["secret_key"]

seats = get_organisation_seats(organisation)

stripe_customer = stripe.Customer.create(
name=organisation.name,
email=email,
Expand All @@ -18,6 +20,7 @@ def create_stripe_customer(organisation, email):
items=[
{
"price": settings.STRIPE["prices"]["free"],
"quantity": seats,
}
],
)
Expand Down Expand Up @@ -52,7 +55,7 @@ def update_stripe_subscription_seats(organisation):
"quantity": new_seat_count,
}
],
proration_behavior='always_invoice'
proration_behavior="always_invoice",
)
return updated_subscription

Expand Down

0 comments on commit c0a1790

Please sign in to comment.