# Validate Wix Contacts and Orders

URL: https://email-validation.org/docs/guides/wix-contacts/
Updated: 2026-11-26

> Documentation index: https://email-validation.org/llms.txt

Check your Wix site's contacts (your site members included: every member is a contact) and store orders, and save
each address's status on the contact (four custom fields) and on the order (a comment on its timeline), so your email
campaigns and order reviews can leave out the addresses you should not mail. A command you run on your own computer
checks everything you already have as one bulk list, tells you what it will cost and asks before it spends anything;
a small relay you deploy to your own Cloudflare account, fed by a file in your site's Velo backend, checks new contacts
and orders as they arrive. It never deletes a contact or an order, and never changes a contact's own details or an
order. Download it: [email-validation-wix.zip](https://email-validation.org/downloads/wix/email-validation-wix.zip) holds `wix.mjs` (the
command), `relay.mjs` (the relay), `events.js` (the file for your site's backend) and the MIT licence.

This is not the [Wix Forms check](https://email-validation.org/docs/guides/wix/): that one checks the address typed into a Wix Forms form before
the form is sent, inside Wix. This one checks the contacts and orders your site already has, and the ones that arrive
any other way (checkout, member sign-up, imports, other apps), after they exist. A site can use either or both.

**Status: set up from this page.** You use your own keys, your own Cloudflare account and your site's Velo backend:
there is nothing to install in Wix.

## What you need

- Node 22.18 or later for the command. Nothing to install: it has no dependencies.
- An API key of ours from the [API keys page](https://email-validation.org/app/api-keys/): with the permission **Bulk lists** for the command (off
  by default: turn it on when you create the key; with **Read balance and usage** too, the command shows your balance
  before it asks), with **Validate addresses** for the relay (on by default). One key can have both.
- A Wix **API key** from Wix's API Keys Manager (`manage.wix.com/account/api-keys`), with access to this site only and
  the permissions **Read Contacts**, **Manage Contacts**, **Manage Contact Extended Fields**, **Read Orders** and
  **Manage Orders**. Wix shows the key once. Keep it like a password.
- Your **site id**: the part after `/dashboard/` in your site dashboard's address (you may paste the whole address).
- For the relay only: a Cloudflare account to run it in, Cloudflare's `wrangler` command (`npx wrangler`), and coding
  turned on in the Wix editor (Velo, **Dev Mode**).

With `--only contacts` the Wix key needs only the three contact permissions, with `--only orders` only the two order
ones. A key without Manage Contact Extended Fields stops before anything is spent; Wix has no write that changes
nothing, so a key without Manage Contacts or Manage Orders is refused at its first write, after the bulk list is
paid: run the same command again with a key that has the permission and it writes without paying again.

## Check every contact and order

```bash
cd email-validation-wix                                   # the unzipped folder
export EV_API_KEY=…  WIX_API_KEY=…  WIX_SITE_ID=<site id>
node wix.mjs --dry-run                                    # counts only: nothing created, uploaded, spent or written
node wix.mjs                                              # shows the credits and your balance, and asks
```

The command reads every contact and every placed order (paid, or an offline order you accepted; cancelled and
archived orders are left out), and checks those without a status for their current address. A contact and their
orders with the same address are one address of the list, and an order whose address a contact already has a status
for takes that status without a check. It then shows how many contacts, orders and distinct addresses it will check,
the most credits it can use and your balance, and asks; nothing is spent on a no. Each distinct address uses one
credit; `unknown` results, duplicates and malformed addresses are free.

- `--only contacts` or `--only orders` checks one kind.
- `--region eu` checks and keeps the list in the EU, with the same key.
- `--revalidate` checks every contact and order again, not only the new ones.
- `--yes` answers the question for an unattended run (without a terminal, the command needs it).
- `node wix.mjs --setup` only creates the four custom fields (the command also creates them on its first run, before
  anything is spent).

## What it saves

| Where | Name | Value |
|---|---|---|
| Contact custom field (text) | **Email validation status** | `valid`, `invalid`, `catch_all`, `unknown` or `disposable` ([statuses](https://email-validation.org/docs/statuses/)) |
| Contact custom field (text) | **Email validation reason** | why, for example `accepted` or `no_mailbox` |
| Contact custom field (text) | **Email validation checked at** | when the check ran, in UTC |
| Contact custom field (text) | **Email validation checked email** | the address that was checked |
| Order comment | first line `Email validation: <status> (<reason>)` | then the address checked and when; the order itself is not changed |

A contact whose checked email is still its address counts as checked, so the next run and the relay skip it. Custom
fields are site-wide (a site may have 100); if one of these names already exists with another type, the command stops
and says to rename it. An order's own fields stay as they are: Wix lets an outside caller add a comment to an order
without changing it, and the buyer's contact gets the four fields too when its address is the order's.

## Check new contacts and orders

The relay is a Cloudflare Worker in your own account. Deploy it from the unzipped folder:

```bash
npx wrangler deploy relay.mjs --name ev-wix-relay --compatibility-date 2026-10-01
npx wrangler secret put EV_API_KEY --name ev-wix-relay       # our API key
npx wrangler secret put WIX_API_KEY --name ev-wix-relay      # the Wix API key above
npx wrangler secret put WIX_SITE_ID --name ev-wix-relay      # your site id
openssl rand -hex 32                                         # a new token for the relay
npx wrangler secret put EV_RELAY_TOKEN --name ev-wix-relay   # paste that token
```

Add `--var EV_REGION:eu` to the deploy command to have addresses validated in the EU and their results stored there.

Then in your site:

1. In the editor, turn on coding (**Dev Mode**). In the Code panel's **Backend** section, open `events.js` (create it
   if it is not there).
2. Paste the downloaded `events.js` into it. If the file already has code, add these lines to it instead; a function
   name may appear only once in the file (if one of the three is already there, call `evForward` from it).
3. Set `EV_RELAY_URL` at the top to your relay's address, such as `https://ev-wix-relay.<your subdomain>.workers.dev/`.
4. In your site's dashboard, **Developer Tools → Secrets Manager**, store a secret named `EV_RELAY_TOKEN` holding the
   same token as the relay's.
5. **Publish** the site: Wix runs backend events only on the published site, not in preview.

When a contact is created or changed, or an order is approved, the file sends the relay only the record's id, with
the token. The relay refuses any request without that token, then reads the contact or the order from Wix with your
Wix key and checks the address Wix holds: it trusts nothing in the request but the id. It skips a record that already
has a status for its address, so its own write (which Wix reports as a contact change) never loops. The file never
sends an address or a key, never stops your site's other code and logs nothing.

The relay answers at once and does the work right after, so your site is not held up. Work that fails (no credits, a
refused key, Wix busy) is not retried: run the command now and then to catch up whatever the relay missed, such as a
large import.

## Run it again

Run the same command again after any stop (no credits, a closed laptop, Wix's rate limit, the bulk list still
running): it resumes the same bulk list and never pays twice (within the 30 days a list is kept). Run it from the same folder each time (or pass the same
`--state FILE`): the file it keeps there holds the bulk list it is working on, never an address or a key. When every
record is written, the file is removed and the next run checks only contacts and orders without a status (or with
`unknown`), such as new ones. `--new-job` starts a new bulk list instead of resuming the kept one, and pays again for
the addresses still without a status.

Exit codes: `0` done (or you answered no), `1` a write failed or the run stopped (run it again), `2` wrong arguments,
`75` the bulk list was still running when the command stopped waiting (run it again later; `--wait-minutes N` sets how
long it waits).

The command prints counts, record ids and job ids, never an address or a key; the relay logs nothing.

## What it cannot do

- **Hold up a checkout or a sign-up.** Wix tells your site about a new order or contact after it exists: the status
  is saved right after, and what to do with it (segments, automations, exports) is yours. To stop a Wix Forms form
  with a bad address, use the [Wix Forms check](https://email-validation.org/docs/guides/wix/).
- **Write to an order's own fields or tags.** The status is a comment on the order.
- **Count orders up front.** Wix's order search has no total; the count is the orders read.

Neither the command nor the relay has run against a real Wix site yet: they are tested against a site in memory that
answers as Wix's API documents.

## More on Wix contacts and orders

- [Wix contacts and orders integration](https://email-validation.org/integrations/wix-contacts/)
