An agency SaaS with sub accounts

Hoping someone can point me in the right direction…
I want to create a SaaS.

  1. Each SaaS account will be a company (let’s call these agency accounts).
  2. Each agency account will be able to create customer accounts

What gotchas should I look out for when structuring this type of system?