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

> ## Agent Instructions
> The CoinStack API base URL is https://coinstack.net/api/v1. Authenticate with an API key sent as 'Authorization: Bearer sk_...' from a server, never from a browser. Every response is a JSON object with 'success' and 'response'. Amounts are strings; token amounts on quotes and payments are in the token's smallest unit. Fulfil an order when its checkout status is 'completed', not when the customer returns to success_url. Verify the CoinStack-Signature header on every webhook using the raw request body. The OpenAPI file is at https://docs.coinstack.net/openapi.json.

# Authentication

> Authenticate requests with an API key.

The API uses API keys. Send your key as a Bearer token on every request.

```bash theme={null}
curl https://coinstack.net/api/v1/checkouts \
  -H "Authorization: Bearer sk_your_api_key"
```

## Create a key

1. Sign in to the [dashboard](https://coinstack.net/dashboard) and open **Developers**.
2. Select **New API key**.
3. Give the key a name and choose its access.
4. Copy the key. It is shown only once.

Keys start with `sk_`. An account can have up to 10 keys. Only owners and admins of a merchant account can create or delete them.

## Access

A key has one of two access levels.

| Access | What it can do |
| - | - |
| Read and write | Everything in this reference. |
| Read only | List and get checkouts, payments and tokens. |

A read-only key gets a `403` with `Invalid permissions` on every other endpoint, including all webhook and event endpoints.

## Keep keys safe

* Use keys only from your server. Do not put a key in a web page, a mobile app or a public repository.
* Use a separate key for each system, so you can delete one without affecting the others.
* If a key may have leaked, delete it in the dashboard and create a new one. A deleted key stops working straight away.

## Errors

| Status | Message | Meaning |
| - | - | - |
| `401` | `Invalid authentication` | The `Authorization` header is missing, or the key is wrong or deleted. |
| `403` | `Invalid permissions` | The key is read only and the endpoint needs write access. |


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