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

# Integrations

> Configure Pterodactyl, UptimeRobot, Discord, billing providers, and domain lookup integrations.

# Integrations

Sonata includes optional integrations for real hosting workflows.

<Info>
  Integrations are optional. Sonata should still render without them, but pages that rely on live API data may show fallback states.
</Info>

## Pterodactyl Stock

API route:

```txt theme={null}
app/api/stock/route.ts
```

Environment variables:

```env theme={null}
PTERODACTYL_PANEL_URL=https://panel.example.com
PTERODACTYL_APP_KEY=ptla_xxxxxxxxxxxxxxxxx
```

Use an Application API key with read access to the required resources.

Recommended checks:

* Panel URL has no trailing slash unless the code expects it.
* API key is an Application API key, not a client API key.
* Location IDs match the locations used in product data.
* Production environment variables match local values.

Never expose the Pterodactyl application key to client-side code.

## UptimeRobot Status

API route:

```txt theme={null}
app/api/uptime/route.ts
```

Environment variable:

```env theme={null}
UPTIMEROBOT_API_KEY=ur_xxxxxxxxxxxxxxxxx
```

Use a Main API Key.

If status does not show correctly:

* Confirm monitors exist.
* Confirm the API key is active.
* Check API route logs.
* Check deployment environment variables.

## Discord Widget

Environment variable:

```env theme={null}
NEXT_PUBLIC_DISCORD_GUILD_ID=000000000000000000
```

Enable the server widget in Discord settings.

Discord setup:

1. Open Discord server settings.
2. Enable the server widget.
3. Copy the server ID.
4. Set `NEXT_PUBLIC_DISCORD_GUILD_ID`.
5. Restart the dev server.

## Billing

Main billing base URL:

```txt theme={null}
lib/config/site.ts
```

Look for:

```ts theme={null}
billing: {
  url: "https://billing.example.com",
  panel: "https://panel.example.com",
}
```

Product-specific billing URLs are stored in product data files.

Common billing providers:

* WHMCS.
* Paymenter.
* Blesta.
* WISECP.
* Custom storefront or checkout.

For game hosting, make sure selected cycle, location, and software values become query parameters your billing panel understands.

## Domain Lookup

Domain lookup uses public RDAP data.

API route:

```txt theme={null}
app/api/domain-check/route.ts
```

No API key is required for basic RDAP lookup.

## Integration Testing

Use this quick flow after changing integration settings:

1. Restart the dev server.
2. Open the status page.
3. Open a game hosting product page.
4. Check stock badges.
5. Search for a domain.
6. Click a billing link.
7. Check terminal logs for API errors.

## Anti-Piracy Placeholders

Sonata may include non-visual marketplace placeholders and markers for leak tracing.

Do not remove, rename, disable, or tamper with these markers unless you have written permission.
