Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

garethdaine's avatar

Teams & Team Billing

Hey Folks,

So, I'm currently building an app that requires teams. This is how it works:

  • A user can sign up to a plan
  • That user can then create teams (based on the plan and set limits).
  • They invite a user (via email) to join their team.
  • That user can sign up via the invitation link.
  • The user signs up and joins the team.

The problem I'm facing is, when a user is invited to a team, I want them to be able to subscribe without having to select a paid plan. I understand there are free plans for both users and teams, but I don't want a free plan available, except when a user is invited to a team, as they'll use the functionality and resources of the paid plan the team has been created on.

I hope that makes sense. Is this possible?

Thanks

0 likes
6 replies
EventFellows's avatar

What have you tried and what does not work? Generally I'd say that should be possible (without having tried this exact scenario).

garethdaine's avatar

Well, I've enabled team billing and team plans.

I've added team plans to my Spark service provider, but they never show on the registration screen.

Also, I've signed up as a user, invited a teammate, but when the team mate arrives at registration, it says 'found team invitation', but still requests the user to join a plan and pay.

So, I just need to 1, know if it's possible and 2, what the process is for achieving it , as there is nothing in the documentation.

I'm not sure Spark teams cover this use case at present.

I believe that they work similar to GitHub teams, in that you can have a free account, and join other people's teams and use their resources, but you can't just sign up as a team member.

The problem here is that my app does not have a free account, but I don't want people to have to pay to use it when they are on a team.

Essentially what I'm trying to do here is have multiple users per plan.

So...

  1. Basic Plan: 1 User
  2. Business Plan: 3 Users
  3. Agency Plan: 5 Users

So, actually, it would be nice to have users per plan, and then allows those users to create teams within the account.

Does that make sense? Cheers.

EventFellows's avatar

I guess the easiest way is to just have a free plan (as a means for users to create an account on your plan = database entry for the user).

It is entirely up to you what abilities you grant a user based on their plan. So, in your case you could just treat a user with a free plan exactly the same as a guest user who is not signed in (exept that he can access the team he is part of and change his email etc.).

Alternatively you could build something yourself using the ->archived() function for the plans.

It could go along these lines.

  • have a freePlan (don't worry, I got your requirement of not having it)
  • have as many paid plans as you want with a trial period
  • apply the ->archived() method to the freePlan only on the condition that the user does NOT belong to someone else's team (so freePlan is only availabe to users that belong to someone else's team, for everybody else it is closed/ not available)
  • use the event UserSubscribed to shift users to the freePlan if they signup on some else's team.

I know, it sounds complicated, but it does work, too.

Please or to participate in this conversation.