Skip to main content
A customer is whoever pays you: a workspace for a B2B product, or a person for a D2C product. The dashboard calls them Customers. The API and SDKs call them tenants. They are the same thing.

Customer, not user

Crovver does not know about the individual users inside a workspace. It only knows the billing unit. Your app decides which of its users belong to which customer.

Your ID for the customer

Every customer carries your ID for it, the externalTenantId, such as your workspace ID. You pass that ID on every call: to CrovverProvider as tenantId, to canAccess, to checkout and to credits. Crovver never asks you to store its own IDs.

Creating customers

B2B: create the customer from your backend when a workspace is created in your app. Then it exists with the right name and owner before it ever reaches checkout. If you skip this, the first checkout through the React SDK creates it from the provider’s tenantName, userId and metadata.userEmail.
D2C: the first checkout creates the customer from the signed-in user, keyed on the user’s ID. You can also create it ahead of time with createTenant and no externalTenantId.

The billing email

A customer’s email is where Crovver sends billing messages, and it is how the customer signs in to their billing page. Before the billing page shows invoices or lets anyone cancel, it emails a one-time sign-in link to that address. Set the email when the customer is created: pass ownerEmail to createTenant, or let the first checkout create the customer with the user’s email. You or your team can also set it on the customer in the dashboard. An email added later from the browser, to a customer that was created without one, is stored but not trusted for sign-in. Otherwise anyone holding your public key could attach their own address to a customer. For a customer that already exists without one, set the email in the dashboard, under Customers.
A customer with no billing email cannot open their billing page. Always pass the owner’s email when you create a customer.

Owner

The owner is the person in your app responsible for paying, identified by your user ID, externalUserId. For a D2C customer, the owner is the customer.

When a customer counts as subscribed

A customer is subscribed while it has a subscription in trial or active, or a canceled one still inside its paid period. useSubscription().isActive tells your frontend.