> For the complete documentation index, see [llms.txt](https://savefee.gitbook.io/savefee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savefee.gitbook.io/savefee/onboarding.md).

# Onboarding

Three things stand between you and your first energy order. None of them require an API call - they all happen in the SaveFee dashboard.

1. [Create your account](#1-create-your-account)
2. [Get your API key](#2-get-your-api-key)
3. [Fund your account](#3-fund-your-account)

Allow about five minutes in total.

***

## 1. Create your account

Go to [savefee.io](https://savefee.io) and select **Sign in**.

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2Fbfk9mf58cZRO5KzWyaYt%2Fimage.png?alt=media&#x26;token=8c0a47b1-8220-46d1-8328-c94d23d57b01" alt=""><figcaption></figcaption></figure>

You can sign in two ways:

| Method          | Notes                                                                                                                  |
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Google**      | Fastest. Nothing to install.                                                                                           |
| **TRON wallet** | TronLink, TokenPocket, and other common wallets are supported. You sign a challenge to prove ownership of the address. |

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2FHl2PQD70l74QmfPV77Fy%2Fimage.png?alt=media&#x26;token=6589a5de-e78b-44de-9722-7474b81e491c" alt=""><figcaption></figcaption></figure>

There is no separate registration step. **Signing in for the first time creates your account.**

{% hint style="info" %}
Your choice here becomes your identity. If you sign in with a wallet, that address is your account - keep access to it. If you sign in with Google, that Google account is your login.
{% endhint %}

***

## 2. Get your API key

Open the **API** tab and select **+ Create new API key**.

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2FDKO5VQMoVNG7wMgYkNcP%2Fimage.png?alt=media&#x26;token=88928b38-38f2-430d-8e98-15271c9efea3" alt=""><figcaption></figcaption></figure>

Fill in the form:

| Field            | Required | What it does                                                                                     |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------ |
| **Key name**     | yes      | A label so you can recognise the key later. Use something specific — `billing-prod`, not `key1`. |
| **IP allowlist** | no       | Restricts the key to the addresses you list. Requests from anywhere else are refused with `403`. |
| **Callback URL** | no       | Where webhooks are delivered. Must be a public `https://` URL.                                   |

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2Fblrg9SEmBoUMT1sJKHEQ%2Fimage.png?alt=media&#x26;token=a1795d9c-a1d7-4d71-8f4c-cb23d8621512" alt=""><figcaption></figcaption></figure>

Select **Create key**. You may be asked to sign again with your wallet to confirm — this is an extra security step for sensitive actions. Google sign-in generally does not prompt for it.

### Save both secrets now

The **Key created** screen shows two values:

| Value                          | Used for                           |
| ------------------------------ | ---------------------------------- |
| **API key** (`sf_live_…`)      | The bearer token on every request. |
| **Webhook secret** (`whsec_…`) | Verifying webhook signatures.      |

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2Fg0dgjr1OoURZgT0Afo7J%2Fimage.png?alt=media&#x26;token=240dcc5e-5a06-45cb-8358-17b421653d31" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**Both are shown once and never again.** There is no way to retrieve either value later — not from the dashboard, not from the API. Copy them into your Secret Manager before you leave this screen.

If you lose them, your only option is to revoke the key and create a new one.
{% endhint %}

Treat the API key like a password. Anyone holding it can spend your balance, so keep it server-side, out of source control, and out of any client-side bundle.

### Restricting a key to your servers

The **IP allowlist** pins a key to a list of addresses, so it only works from your infrastructure. Requests from any other address are refused with `403`. The check uses the connection's real source address, so forwarding headers cannot be used to get around it.

{% hint style="warning" %}
**Pin your public egress address**, the address the internet sees your servers as — not the private address the machine reports locally. The simplest way to find it is to make an outbound request from the server itself and see what address it arrives from.

Keep a record of what you pinned. It makes a later `403` quick to diagnose.
{% endhint %}

Use the allowlist when your servers have a stable egress address. If your addresses rotate, leave it unset and rely on keeping the key secret. To remove an allowlist later, set it to `null`.

### Changing a key later

Select **Edit** on an existing key to open **Edit API key**. From there, you can change the IP allowlist, and add a callback URL if you did not set one at creation.

***

## 3. Fund your account

Your balance is prepaid. Every order is charged against it immediately, and an order is rejected with `402` when the balance does not cover it.

Open the **Account** tab and select **Deposit**.

<figure><img src="https://3474159782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHzS0vE1i9Q8SmThTeqvM%2Fuploads%2Fk2EzYTBbGk99AXQNEOpg%2Fimage.png?alt=media&#x26;token=59eeb139-354f-4480-85ff-156e51b08e21" alt=""><figcaption></figcaption></figure>

Copy the **deposit address** and send TRX to it from your wallet.

{% hint style="danger" %}
**Send at least 10 TRX.**

A transfer below the minimum is not credited to your balance automatically. Check the minimum shown on the deposit screen before sending, and never use a token dust amount as a "test" transfer.
{% endhint %}

This is the only deposit address your integration uses, and it is the only one you should ever send to. It is stable, so you can store it and reuse it for future top-ups. You can also read it from the API at any time:

```bash
curl https://api.savefee.io/v1/balance \
  -H "Authorization: Bearer $SAVEFEE_API_KEY"
```

```json
{
  "availableSun": 50000000,
  "depositAddress": "T…"
}
```

### How much to deposit

An order costs the unit price times the amount of energy you buy, so your cheapest order is the smallest one (50,000 ENERGY) and your most expensive is the largest (200,000 ENERGY). Renting energy this way typically costs **65–70% less** than burning TRX for the same transaction.

Prices are not fixed, so read the live figures from `GET /v1/public/pricing` and deposit enough to cover the orders you expect to place before your next top-up. See **Limits and enums**.

***

## Where to find things afterwards

Two more places in the dashboard are worth knowing about:

| Tab                | Shows                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------- |
| **History**        | Every energy order you have placed.                                                               |
| **Webhook events** | Every webhook delivery, with its outcome. The first place to look when a callback did not arrive. |

***

## Next

You now have a key and a balance. Go to the **Quickstart** to place your first order.
