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

# Overview

> The base URL, request format and response format shared by every endpoint.

## Base URL

```
https://coinstack.net/api/v1
```

All requests use HTTPS.

## Requests

Send your API key in the `Authorization` header on every request. See [Authentication](https://docs.coinstack.net/api-reference/authentication.md).

Requests with a body send JSON and must include `Content-Type: application/json`.

```bash theme={null}
curl https://coinstack.net/api/v1/checkouts \
  -H "Authorization: Bearer $COINSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": "25.00", "currency": "USD"}'
```

## Responses

Every response is a JSON object with two fields.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | `true` if the request worked, `false` if it did not. |
| `response` | object or string | The result on success. A short error message on failure. |

A successful request returns HTTP `200`:

```json theme={null}
{
  "success": true,
  "response": {
    "checkout": {
      "checkout_id": "8f3b2c1e-5d47-4a9b-b6e0-2c7f1a9d4e53",
      "status": "pending"
    }
  }
}
```

A failed request returns a `4xx` or `5xx` status. See [Errors](https://docs.coinstack.net/api-reference/errors.md).

```json theme={null}
{
  "success": false,
  "response": "Invalid amount"
}
```

## Amounts

Amounts are strings, not numbers, so no precision is lost. There are two kinds.

| Kind | Example | Used for |
| - | - | - |
| Decimal | `"25.00000000"` | Money in a currency or in US dollars, such as a checkout's `amount`, `value` and `fee`. |
| Smallest unit | `"25000000"` | Token amounts on quotes and payments. Divide by 10 to the power of the token's `decimals` to get the display amount. |

`"25000000"` of USDC, which has 6 decimals, is 25 USDC. The number of decimal places in a decimal string can vary, so parse it with a decimal type instead of comparing strings.

## Times

Times are RFC 3339 strings in UTC, such as `2026-12-02T16:20:11.482913Z`.

## Pagination

List endpoints return the newest results first and accept two query parameters.

| Parameter | Description |
| - | - |
| `limit` | How many results to return, from 1 to 100. The default is 100. |
| `cursor` | The `cursor` value from the previous response. Leave it out for the first page. |

Each list response includes a `cursor`. Pass it back to get the next page. When it is `null`, there are no more results.

```bash theme={null}
curl "https://coinstack.net/api/v1/checkouts?limit=50&cursor=50" \
  -H "Authorization: Bearer $COINSTACK_API_KEY"
```

## Empty fields

Text fields that have no value are returned as an empty string, not left out. Time fields that have no value yet, such as `completed_at`, are `null`.


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