Use this recipe when a user wants to:
You help the user find an available domain, then collect registration details (cycle, privacy protection, contact info) directly in the chat. Once collected, you save the contact info, create a cart with the domain + addons, and provide a checkout link where the user only needs to complete payment.
UX guidelines: Keep the conversation natural. Do NOT expose internal implementation details to the user (e.g. don't say "I'm canceling the old cart", "saving to intent API", "adding line items"). Just tell them what matters: "Setting up your order..." then show the summary and checkout link.
Domain purchase does NOT require a site. Do NOT call ListWixSites unless the user specifically mentions a site or asks to connect the domain to one.
However, after finding an available domain (Step 1), you should ask the user if they want to connect it to a Wix site. This unlocks two benefits:
See Step 1b for the site check flow.
GET https://www.wixapis.com/domain-search/v2/check-domain-availabilityGET https://www.wixapis.com/domain-search/v2/suggest-domainsThese are public APIs that require no special authentication or scopes. Just make a plain GET request to the URL with query parameters. No extra headers, no account-level auth, no site-level auth. No tokens needed.
Important: Do NOT use GetSuggestedDomains tool for domain suggestions in this recipe. Use the SuggestDomains v2 endpoint above instead -- it accepts free-text queries and does not need a site ID.
Check if it's available using:
GET https://www.wixapis.com/domain-search/v2/check-domain-availability?domain={domain}
The domain parameter must include the TLD (e.g., mybusiness.com, not just mybusiness). If the user gives a name without a TLD, default to .com first.
Response when available:
Response when taken:
Use the Suggest Domains v2 API to find available alternatives:
GET https://www.wixapis.com/domain-search/v2/suggest-domains
IMPORTANT: Do NOT use the GetSuggestedDomains tool for this. Always use the v2 endpoint above.
This API accepts free-text queries -- it works with business descriptions, keywords, and brand concepts, not just domain names. For example: "pancakes business", "modern yoga studio", "photography portfolio".
Query Parameters:
| Parameter | Description | Example |
|---|---|---|
query | Keywords, business idea, or brand concept | pancakes business |
paging.limit | Number of suggestions (default: 10) | 10 |
tlds | Filter by specific TLDs (repeatable, no dots) | com, net |
Example -- alternatives for a taken domain:
Example -- brainstorming from a business idea:
Example -- filtered by TLDs:
Example Response:
When presenting suggestions:
.com for general business, .shop/.store for e-commerce, .me for personal branding)pagingMetadata.hasNext is true, more suggestions exist -- offer to show moreOnce the user picks a domain (or the original was available), proceed to Step 1b.
After the user has chosen a domain, ask: "Would you like to connect this domain to one of your Wix sites?"
If the user says yes (or if they mentioned a site earlier), call ListWixSites to get their sites.
The response includes each site's id and name. If the user has multiple sites, list them and ask which one they want to use.
Once a site is selected, remember the siteId (also called msid) -- you'll use it in the checkout link (Step 4d).
Based on the site's plan status, you can offer different guidance:
[Get domain free with a site plan](https://manage.wix.com/premium-domains/split-page?domainName={DOMAIN_NAME}) -- this page shows the bundle option.If the user says no or wants to skip, proceed without a site context.
Once the user picks a domain, collect the details needed for purchase.
Get available cycles and pricing for the chosen TLD:
Request (via ManageWixSite):
Body:
Replace .com with the actual TLD (include the leading dot).
Response contains products[0] with:
productId -- save this, you'll need it for the cartpricingDetails[] -- array of pricing per cyclePresent the pricing to the user as a table, for example:
| Period | Price |
|---|---|
| 1 year | $14.95 |
| 2 years | $27.90 |
| 3 years | $40.85 |
Ask the user which period they prefer. Default to 1 year if they don't have a preference.
If the API returns no products for this TLD, tell the user: "Wix doesn't support purchasing this TLD. Try a different extension like .com, .net, or .org."
Present the user with three options:
f8211619-d9f6-4312-9d03-f2958bbd08aa22a84545-4ac0-4490-a434-45a1ebc479fbb9d89ff0-f29b-4bfd-a3f0-6e34ae65120dAll three options use the addon product type ID b3d86a1d-9db3-4f69-bd54-c132808856b1.
First, check if the user already has contact info on file:
Request (via ManageWixSite):
Replace {domain} with the chosen domain (e.g. mybakery.com).
Response contains domainRegistrationIntent with existing contacts:
Generate a random UUID to use as a session ID (wsess). This links the contact info to the cart.
Request (via ManageWixSite):
Body:
Use the same contact info for registrant, admin, and tech contacts (standard practice for individual registrations).
Phone format: +{countryCode}.{number} (e.g. +1.5551234567, +972.544738293).
If the API returns a validation error:
Important: If the user selected a site in Step 1b, use CallWixSiteAPI (with the site's siteId) for ALL cart operations below. This creates the cart in the site's context so the checkout link with ?msid= works correctly. If no site was selected, use ManageWixSite (account-level).
Body: {}
This clears any leftover cart. If there's no active cart, this returns successfully anyway.
This creates a new cart if none exists and returns it.
Body:
Set cycle.cycleDuration.count to the number of years the user chose.
Add a second line item for the addon (based on the user's choice from Step 2b):
Use the same cycle duration for the addon as for the domain.
Once the cart is populated, give the user a checkout link:
[Click here to complete your purchase](https://manage.wix.com/cart/checkout?msid={siteId})[Click here to complete your purchase](https://manage.wix.com/cart/checkout)This opens the checkout page with the pre-filled cart. The user only needs to complete payment.
| Error Code | Description | Action |
|---|---|---|
DOMAINS_UNSUPPORTED_TLD | TLD not supported by Wix | Suggest alternatives using Suggest Domains API |
access_denied or 403 on domain search APIs | Auth issue | These are public APIs -- do not add extra auth headers |
| Offering API returns no products | TLD not supported by Wix | Tell user to try a different TLD (.com, .net, .org) |
| Intent API validation error | Missing/invalid contact fields | Show the error, ask user to correct, retry |
| Cart add-items fails | Product ID or format issue | Verify product ID came from offering API response |
https://manage.wix.com/cart/checkout?msid=abc-123