> ## Documentation Index
> Fetch the complete documentation index at: https://developers.entri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sell Events

> Entri Sell webhook events (domain.purchased, domain.registered, domain.registration_timeout, domain.purchase.dns_setup.failed, purchase.error, purchase.user_aborted, purchase.confirmation.expired) and browser callback events (onSuccess, onEntriClose).

This page documents the webhook events and payload fields relevant to Entri Sell. For the payload envelope and signature verification, see [Webhooks Overview](/webhooks-overview).

## Webhook event types

* `"domain.purchased"`: Indicates that the domain *order* creation has been completed.
* `"domain.registered"`: The registrar has registered a purchased domain. Sent once per domain, whether or not `disableConnect` is set. See [Registration events](#registration-events).
* `"domain.registration_timeout"`: Entri could not confirm the registration of a purchased domain within 48 hours of the purchase. Sent once per domain. See [Registration events](#registration-events).
* `"domain.purchase.dns_setup.failed"`: The registrar rejected the DNS records Entri tried to set up for a purchased domain. Sent once per domain. See [DNS setup failure](#dns-setup-failure).
* `"domain.transfer.in.initiated"`: Only applicable for **Entri Sell Enterprise**. An inbound domain transfer has been initiated by the user.
* `"domain.transfer.in.started"`: Only applicable for **Entri Sell Enterprise**. The inbound domain transfer has been accepted and is now in progress at the registry level.
* `"domain.transfer.in.ack"`: Only applicable for **Entri Sell Enterprise**. The inbound domain transfer has been acknowledged by the registry.
* `"domain.transfer.in.failed"`: Only applicable for **Entri Sell Enterprise**. The inbound domain transfer has failed.
* `"domain.transfer.out.initiated"`: Only applicable for **Entri Sell Enterprise**. An outbound domain transfer away from Entri has been initiated.
* `"purchase.error"`: Indicates an error during the domain purchase process.
* `"purchase.user_aborted"`: Only applicable for **IONOS**. The user closed the IONOS checkout. This can happen after the purchase already completed, so if you also received `domain.purchased` for the same domain, the domain was purchased. Carries the same payload as `purchase.error`.
* `"purchase.confirmation.expired"`: The purchase confirmation has expired (abandoned flow).

## Registration events

Placing an order is not the same as owning a working domain. After the order goes through, the registrar still has to register the domain, and it can hold or reject an order, for example after a fraud review or when the account is blocked. `domain.purchased` tells you the order exists. `domain.registered` and `domain.registration_timeout` tell you how the registration ended, so you can let your user know before they find out that the domain does not work.

<Note>
  Registration events are currently sent for GoDaddy and IONOS purchases. They are not sent for Squarespace purchases yet.
</Note>

### Event sequence

For each purchase, the events arrive in this order:

1. `domain.purchased`: once per order. `purchased_domains` lists every domain in the order.
2. `domain.registered`: once per purchased domain, as soon as Entri confirms that the domain is registered and resolving in DNS. This is usually within minutes, and can take longer while the registrar reviews the order.
3. `domain.added`: once per purchased domain, after Entri applies the DNS records from your configuration. See [Connect events](/connect/events#webhook-event-types).

`domain.registered` does not wait for the DNS records to be applied, so it normally arrives before `domain.added`. It is sent with `disableConnect` set to `true` or `false`. With `disableConnect: true` Entri configures no records for you, so use `domain.registered` as the signal that the domain is ready for your own DNS setup. `domain.added` works as before and should not be read as a registration confirmation.

### Registration timeout

Entri checks a purchased domain's registration for 48 hours after the purchase. The window is fixed and cannot be configured. If the registration still cannot be confirmed by then, Entri sends `domain.registration_timeout` and stops checking the domain. No `domain.registered` or `domain.added` follows for that domain, and a domain gets either `domain.registered` or `domain.registration_timeout`, never both.

A timeout usually means the registrar did not complete the order. Let your user know that the domain is not active yet, and contact Entri support with the `id` of the `domain.purchased` webhook so we can check with the registrar.

### Receiving registration events

Both events are selected per application, like every other event (see [Choosing which events you receive](/webhooks-overview#choosing-which-events-you-receive)). If you already chose your Sell events, turn on `domain.registered` and `domain.registration_timeout` under **Application → Webhooks** to start receiving them.

### Sample payload

```json theme={"system"}
{
  "id": "0b8a6b8e-2a4f-5d7e-9c3a-6f1e2d4c5b7a",
  "type": "domain.registered",
  "domain": "example.com",
  "subdomain": "www",
  "user_id": "your-provided-user-id",
  "provider": "ionos",
  "setup_type": "automatic",
  "purchased_domains": ["example.com"],
  "propagation_status": "exempt",
  "dkim_status": "exempt",
  "secure_status": "exempt",
  "power_status": "exempt",
  "dmarc_updated": "exempt",
  "redirection_status": "exempt",
  "data": {
    "records_propagated": [],
    "records_non_propagated": []
  }
}
```

`domain.registration_timeout` has the same shape with `"type": "domain.registration_timeout"`. In both events, `domain` and `purchased_domains` name the single domain the event is about, even when the order contained several domains. The `id` is unique to the domain and the event type, so a redelivered event keeps its `id`. The status fields are always `exempt` because these events are not about DNS records.

## DNS setup failure

After a purchased domain is registered, Entri applies the DNS records from your configuration. If the registrar rejects those records, Entri sends `domain.purchase.dns_setup.failed` instead of `domain.added`. This happens when the records do not fit what the registrar accepts, for example a `CNAME` record on the root domain (`@`). Retrying the same records does not help.

The domain itself is registered; only its DNS setup failed. Check the records in your configuration, and contact Entri support with the `id` of the `domain.purchased` webhook if you need help.

`domain.purchase.dns_setup.failed` is sent once per purchased domain, for GoDaddy and IONOS purchases. Turn it on under **Application → Webhooks** to receive it. It has the same shape as the [registration events sample payload](#sample-payload), with `"type": "domain.purchase.dns_setup.failed"`.

## Payload fields

* **`purchased_domains`**: An array of domains that were purchased during the transaction. This field is only relevant for Entri Sell. Example:

  ```json theme={"system"}
  ["domain1.com", "domain2.com", "domainN.com"]
  ```

* **`free_domain`**: Indicates whether the domain was obtained through a free domain flow. Possible values:
  * `true`: The domain was free.
  * `false`: The domain was not free.

## Status fields

The `domain.purchased` event and its follow-up propagation events carry the same status fields as Connect webhooks (`propagation_status`, `dkim_status`, `redirection_status`, `setup_type`). See [Connect events](/connect/events#status-fields) for their values. Three of them report the add-on products configured on the purchased domain:

* **`secure_status`**: The status of SSL certificate provisioning through [Entri Secure](/secure/overview). Possible values:
  * `"pending"`: The DNS records required by Entri Secure have not propagated yet, so the certificate has not been issued.
  * `"success"`: The records propagated and the SSL certificate was provisioned.
  * `"failed"`: The records did not propagate within 72 hours. Sent together with the `domain.propagation.timeout` event.
  * `"exempt"`: Entri Secure is not enabled for the application or does not apply to this flow. This is always the value on `purchase.error` and `purchase.confirmation.expired` events.

* **`power_status`**: The status of the advanced features configuration through [Entri Power](/power/overview). Possible values:
  * `"pending"`: The DNS records required by Entri Power have not propagated yet.
  * `"success"`: The records propagated and Entri Power is configured for the domain.
  * `"failed"`: The records did not propagate within 72 hours. Sent together with the `domain.propagation.timeout` event.
  * `"exempt"`: Entri Power is not enabled for the application or does not apply to this flow. This is always the value on `purchase.error` and `purchase.confirmation.expired` events.

* **`monitor_status`**: The status of the domain's enrollment in [Entri Monitor](/monitor/overview). Only present when the flow has records to monitor, which happens when the [`monitor`](/monitor/configuration) config option is `true` and Monitor is enabled for your account. Unlike `secure_status` and `power_status`, this field is never `"exempt"`: it is simply omitted from the payload when Monitor does not apply. Possible values:
  * `"pending"`: The monitored records have not propagated yet, so the domain is not enrolled in Monitor.
  * `"success"`: The records propagated and the domain is now monitored.
  * `"failed"`: The records did not propagate within 72 hours. Sent together with the `domain.propagation.timeout` event.

<Note>
  The product-specific `domain.secure.*` and `domain.power.*` events reuse the same field names with a different vocabulary, `"active"` or `"inactive"`, to report whether the product is currently running on the domain. See [Secure events](/secure/events#status-fields) and [Power events](/power/events#status-fields).
</Note>

## Browser callback events

The Entri Sell modal emits browser events you can listen for to react when a purchase completes or the modal is closed. Each is a `window` event whose `event.detail` carries the payload described below.

### `onSuccess` Callback Event

Fired when the user reaches the **Congratulations** screen after a successful purchase. Use it to capture a definitive success signal and the `jobId` that identifies the flow.

<Note>
  The IONOS, Squarespace, and GoDaddy Sell flows all fire `onSuccess`.
</Note>

#### Sample usage:

```JavaScript JavaScript theme={"system"}
function handleOnSuccess(event) {
  console.log('onSuccess', event.detail);
}
window.addEventListener('onSuccess', handleOnSuccess, false);
```

#### Sample `event.detail` object response:

```JSON JSON theme={"system"}
{
  "domain": "example.com",
  "success": true,
  "setupType": "purchase",
  "provider": "squarespace",
  "freeDomain": false,
  "jobId": "2132b20f-e522-42fc-9604-5a53b1f13a4b"
}
```

#### Event details object description

| Name | Type | Description |
| - | - | - |
| domain | string | The purchased domain. When multiple domains are purchased, they are returned as a comma-separated string. |
| success | boolean | Always `true` for this event. |
| setupType | string | Always `purchase` for Sell flows. |
| provider | string | The Sell registrar handling the purchase: `ionos`, `squarespace`, or `godaddy`. |
| freeDomain | boolean | `true` when the purchase used an Entri Sell free-domain flow; otherwise `false`. |
| jobId | string | The unique identifier for the Sell flow. It is also included in the related webhooks. |

<Note>
  The `onSuccess` event is the recommended source to capture the `jobId` for subsequent server-side operations (e.g., retrieving the last webhook or [checking the flow status](/sell/sdk#check-flow-status)).
</Note>

### `onEntriClose` Callback Event

Fired as soon as the modal is closed, with the latest status of the flow.

#### Sample usage:

```JavaScript JavaScript theme={"system"}
function handleOnEntriClose(event) {
  console.log('onEntriClose', event.detail);
}
window.addEventListener('onEntriClose', handleOnEntriClose, false);
```

#### Sample `event.detail` object response:

```JSON JSON theme={"system"}
{
  "domain": "example.com",
  "success": true,
  "lastStatus": "FINISHED_SUCCESSFULLY",
  "provider": "squarespace",
  "setupType": "purchase"
}
```

#### Event details object description

| Name | Type | Description |
| - | - | - |
| domain | string | The domain the user entered. May be an empty string if the user closed the modal before selecting a domain. |
| success | boolean | `true` if the purchase completed before the modal closed; otherwise `false`. |
| lastStatus | string | `FINISHED_SUCCESSFULLY` when the purchase completed successfully. Omitted when the modal is closed without completing a purchase. |
| provider | string | The Sell registrar handling the purchase: `ionos`, `squarespace`, or `godaddy`. |
| setupType | string | Always `purchase` for Sell flows. |

<Note>
  The `onEntriClose` payload does not include `freeDomain`. To know whether a completed purchase used a free-domain flow, read `freeDomain` from the `onSuccess` event. When the modal is closed without a completed purchase, `success` is `false` and `lastStatus` is omitted.
</Note>
