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

# Environments and keys

> First, **register and sign in** to the Element Pay console.
>
> * Console (Sandbox): `https://console.elementpay.net`
> * Console (Production): `https://console.elementpay.net`

## Environments

* **Sandbox**: for development/testing, uses testnet tokens and may refund payments automatically.
* **Production**: for live transactions.

## Create an API key

1. In the **console**, create an API key (start with **Sandbox**).
2. Configure your **Webhook URL** and **Webhook Secret** on the key.
3. Copy your **Base URL** for the environment you’re targeting.

**Base URLs:**

* Sandbox: `https://sandbox.elementpay.net/api/v1`
* Production: `https://api.elementpay.net/api/v1`

## What an API key stores

* **Webhook URL + Secret** (used to sign webhook events)
* **Environment binding** (sandbox or production)

## Authentication

Send your key in every request:

```http theme={null}
X-API-Key: <key>
```

## Tips

Keep separate keys for sandbox vs production.

Rotate keys regularly and restrict who can view them.
