> ## 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.

# API reference

> Find endpoints, request examples, response fields and errors.

Use the payments API to receive funds, check balances, convert currencies and send payments. Choose an endpoint from the sidebar to see the fields it accepts and the responses your application should handle.

## Environment and authentication

Choose your API URL:

| Environment | API URL |
| - | - |
| Sandbox | `https://api-sandbox.ledig.io` |
| Live | `https://api.ledig.io` |

Send requests from your server using an API key for that environment. The [authentication examples](https://docs.ledig.io/auth/authentication.md#examples) show how to calculate the signature and timestamp for each request.

Some endpoints also accept a bearer token, as shown in their authorization section. Use one authentication method per request.

## Read an endpoint

| Section | What it tells you |
| - | - |
| Method and path | The URL to call and whether to use `GET`, `POST` or another method. |
| Required scope | The permission your API key needs. |
| Authorization | The authentication headers to send. |
| Request | The path, query and body fields you can send. |
| Response | The fields returned, with fictional examples. |
| Errors | The errors your application should handle. |

Amounts are usually decimal strings, such as `"1250.00"`. Use decimal arithmetic for financial calculations. Keep IDs and pagination cursors exactly as returned.

## Recommended flow

1. Read `GET /v1/currencies` to find supported currencies and networks.
2. Set up [funding](https://docs.ledig.io/guides/funding.md) and check your [balances](https://docs.ledig.io/guides/balances.md).
3. Save a [recipient](https://docs.ledig.io/guides/recipients.md), or confirm the ID of the Ledig business you want to pay.
4. Check the available [payment methods, fees](https://docs.ledig.io/guides/quotes.md#discover-payment-methods-and-fees) and [limits](https://docs.ledig.io/guides/limits.md).
5. Create a [quote](https://docs.ledig.io/guides/quotes.md), review its rate and fees, then confirm it with a [transfer](https://docs.ledig.io/guides/transfers.md).
6. Track the transfer and read your [transaction history](https://docs.ledig.io/guides/transactions.md).

If you manage other businesses, start with [Managed businesses](https://docs.ledig.io/guides/managed-businesses.md) for onboarding and selecting the business you are acting for.

## Handling responses

Use the [error guide](https://docs.ledig.io/errors/errors-and-troubleshooting.md) to handle failures and the [retry guide](https://docs.ledig.io/guides/idempotency.md) to recover from a lost response. Read [Webhooks](https://docs.ledig.io/hooks/webhooks.md) for event notifications.

For help with an integration, contact [support@ledig.io](mailto:support@ledig.io).


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