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

# Quickstart

> Set up your API key and make your first request.

This guide starts with a balance read, so you can check your connection and authentication before creating a payment.

**1. Get access**

Request a business account through [ledig.io](https://www.ledig.io/contact) and complete onboarding. Contact [support@ledig.io](mailto:support@ledig.io) for sandbox access.

**2. Create an API key**

Ask your business administrator to create an API key in the dashboard. For this example, the key needs the `balances:read` permission or read-only access. Save the secret when it is shown; you cannot view it again.

**3. Choose Sandbox**

Set the API URL:

```bash theme={null}
export LEDIG_API_BASE_URL="https://api-sandbox.ledig.io"
```

Add `LEDIG_API_KEY` and `LEDIG_API_SECRET` to your application's server-side secret configuration. Use your sandbox credentials.

**4. Check the connection**

The health endpoint does not require authentication:

```bash theme={null}
: "${LEDIG_API_BASE_URL:?Choose your API URL first}"
curl --fail-with-body "${LEDIG_API_BASE_URL%/}/v1/health"
```

A successful response is:

```json theme={null}
{ "status": "ok" }
```

**5. Read your USD balance**

Use the [Node.js or Python authentication example](https://docs.ledig.io/auth/authentication.md#examples) to call `GET /v1/balances/USD`. It calculates a fresh signature and sends the required headers for you.

The balance fields in a successful response look like this. These are fictional amounts:

```json theme={null}
{
  "currency": "USD",
  "available": "1250.00",
  "reserved": "100.00"
}
```

`available` is the amount you can use. `reserved` is set aside for payments in progress. See [Balances](https://docs.ledig.io/guides/balances.md) for the full response and balance behaviour.

**6. Build your payment flow**

Follow [Funding](https://docs.ledig.io/guides/funding.md) to receive money or [Quotes](https://docs.ledig.io/guides/quotes.md) to convert currencies and send payments. Test the flows your application needs before switching to [Live](https://docs.ledig.io/introduction.md#environments).

If a request fails, use [Errors and troubleshooting](https://docs.ledig.io/errors/errors-and-troubleshooting.md). If a payment request times out, follow the [retry rules](https://docs.ledig.io/guides/idempotency.md) to avoid creating a duplicate.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.