# Resolve a custom checkout domain

> GET /v0/checkout/domains/{host}. Which merchant a verified custom checkout domain (`pay.merchant.com`) belongs to. The hosted page calls it for any host that is not its own, and serves only that merchant's invoices there. 404 for anything that is not a verified checkout domain, including one still w


`GET /v0/checkout/domains/{host}`

Which merchant a verified custom checkout domain (`pay.merchant.com`) belongs to. The hosted page calls it for any host that is not its own, and serves only that merchant's invoices there. 404 for anything that is not a verified checkout domain, including one still waiting on DNS.

## Authentication

The invoice's client secret, in the `x-client-secret` header. It reaches this one invoice's public endpoints and nothing else, and expires with the invoice.

## Parameters

| Parameter | In | Required | Notes |
|---|---|---|---|
| `host` | path | yes |  |

## Responses

| Status | Means |
|---|---|
| `200` | A verified checkout domain |


## Request



```bash title="curl"
curl https://api.intents.fi/v0/checkout/domains/<host> \
  -H 'x-client-secret: $CLIENT_SECRET'
```

```ts title="TypeScript"
const response = await fetch("https://api.intents.fi/v0/checkout/domains/<host>", {
  method: "GET",
  headers: {
    "x-client-secret": clientSecret,
  },
});

if (!response.ok) {
  const { error } = await response.json();
  throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();
```

```python title="Python"
import httpx

response = httpx.get(
    "https://api.intents.fi/v0/checkout/domains/<host>",
    headers={"x-client-secret": client_secret},
)
response.raise_for_status()
data = response.json()
```



## Errors

```json
{ "error": { "code": "INVOICE_EXPIRED", "message": "This invoice has expired" } }
```

Switch on `code`, not on the message: every code has a page under [Error codes](/docs/errors/). Base URL `https://api.intents.fi`; the whole reference is on [one page](/docs/api).

---

Source: https://intents.fi/docs/api/get-checkout-domains-host · The whole corpus: https://intents.fi/docs/llms-full.txt
