Google Subscription API: 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.

Offer the right next step for an expired Business Email

When a customer's Business Email expires or stops working, the right next step depends on its state at Google and at Wix. For example, a subscription that Wix still manages can be renewed, while one that moved to another provider must first be authorized for transfer. Resolving the action before the customer pays avoids a purchase that's refunded later.

To offer the right next step for an expired Business Email:

  1. When the customer chooses to restore their Business Email, call Resolve Business Email Action with the domain in domainName.
  2. Show the customer the next step that matches the returned action. Each action's description in the reference says what to offer. For example, BUSINESS_EMAIL_ACTION_RENEW means renewing the existing plan, while BUSINESS_EMAIL_ACTION_FIX_PAYMENT means updating the payment method instead of buying again.
  3. Use reason to explain the next step to the customer, or to log why it was proposed.
  4. If the call fails, fall back to your existing flow rather than blocking the customer.

Last updated: 20 October 2026

Did this help?