Google Subscriptions: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Check whether an account can purchase Business Email for a domain

Before sending a customer to checkout for Business Email, you can confirm that their account can purchase it for the domain, and find out how many seats they can buy. This avoids a checkout that fails later, for example because the domain already has a Business Email package.

To check whether an account can purchase Business Email for a domain:

  1. Call Is Eligible with the domain in domainName and the Business Email product type ID in productTypeId.
  2. If the response's result.eligible object is returned, the account can purchase Business Email for the domain. Use result.eligible.seats as the maximum number of seats to offer at checkout.
  3. If result.notEligible is returned instead, read result.notEligible.reasons and show the customer why they can't purchase Business Email for the domain. For example, domainNotOwnedByUser means the domain belongs to a different account.

Show a Google Workspace's users and storage usage

If your app shows an account's Business Email in its own interface, you can list the mailboxes on a domain and how much of the Google Workspace's storage they use.

To show a Google Workspace's users and storage usage:

  1. Call Query Premium Assets to find the account's Business Email asset for the domain. Save the asset's ID.
  2. Call Retrieve Users by Domain with the domain in domainName. Show each user's primaryEmail and name, and use admin to mark the administrators.
  3. Call Get Storage Usage, and specify the asset ID you saved in step 1 as googleWorkspacePremiumId.
  4. If usedMb and quotaMb are returned, show the storage used out of the pooled quota, and use asOfDate to show when the numbers are from. If they aren't returned, show that storage usage isn't available yet.

Set up the first administrator after a Business Email purchase

After a customer purchases Business Email, the Google Workspace needs an administrator before its mailboxes can be used. If your app handles the purchase, it can also collect the administrator's details and complete the setup.

To set up the first administrator after a Business Email purchase:

  1. Call Query Premium Assets to find the account's new Business Email asset for the domain. Save the asset's ID.
  2. Collect the administrator's user name, first name, last name, and password, and the customer's contact details: alternate email address, contact name, organization name, and country.
  3. Call Setup Administrator, and specify the asset ID you saved in step 1 as googleWorkspacePremiumId, along with the details you collected. Save the returned primaryEmail.
  4. Call List Users with the same googleWorkspacePremiumId, and confirm the administrator's primaryEmail appears in users.

Last updated: 6 October 2026

Did this help?