# OpenAPI 3.1 document

> The whole Anytime Capital Payments API as an OpenAPI 3.1 document: every endpoint, schema, permission and error, public, for code generators and AI tools.

Source: https://anytime-capital.com/docs/openapi · Markdown: https://anytime-capital.com/docs/openapi.md · All docs: https://anytime-capital.com/docs/llms-full.txt

Every endpoint of the API is described in one OpenAPI 3.1 document at `https://anytime-capital.com/api/v1/openapi.json`: its parameters, request bodies, responses, errors, the API key permission it needs and whether it takes an Idempotency-Key. It is public (no key), served with `Access-Control-Allow-Origin: *`, and built from the same tables as this reference, so the two always agree.

| Detail | Value |
| --- | --- |
| URL | [https://anytime-capital.com/api/v1/openapi.json](https://anytime-capital.com/api/v1/openapi.json) |
| Format | OpenAPI 3.1 (JSON Schema 2020-12), JSON |
| Version | `info.version` is `2026-10-24`; it changes when the contract does. See the [Changelog](https://anytime-capital.com/docs/changelog.md). |
| Operations | 53, each with an `operationId` such as `createPaymentLink` |
| Authentication | `bearerAuth`: `Authorization: Bearer ak_live_…` |
| `x-anytime-permission` | On each operation: the key permission it needs, such as `refunds:write` |
| `x-anytime-idempotent` | On each operation: whether it honours the `Idempotency-Key` header |

## Tags

| Tag | What it covers | Reference |
| --- | --- | --- |
| Payments | Card, wallet and bank payments. | [payments](https://anytime-capital.com/docs/payments.md) |
| Refunds | Refunds, including those waiting for an owner's approval. | [refunds](https://anytime-capital.com/docs/refunds.md) |
| Payment links | Hosted payment pages. | [payment-links](https://anytime-capital.com/docs/payment-links.md) |
| Invoices | Invoices emailed to customers and paid by card. | [invoices](https://anytime-capital.com/docs/invoices.md) |
| Customers | The business's saved customers. | [customers](https://anytime-capital.com/docs/customers.md) |
| Products | The product catalog. | [products](https://anytime-capital.com/docs/products.md) |
| Subscriptions | Subscription plans and subscribers. | [subscriptions](https://anytime-capital.com/docs/subscriptions.md), [meters](https://anytime-capital.com/docs/meters.md) |
| Discount codes | Codes customers enter at checkout. | [discount-codes](https://anytime-capital.com/docs/discount-codes.md) |
| Payouts | Payouts to the business's bank, and its balance. | [payouts-api](https://anytime-capital.com/docs/payouts-api.md) |
| Disputes | Disputes on the business's payments. | [disputes](https://anytime-capital.com/docs/disputes.md) |
| Webhook endpoints | Where events are sent (REST hooks). | [webhook-endpoints](https://anytime-capital.com/docs/webhook-endpoints.md) |
| Events | Every event from the last 30 days, for reconciliation and missed deliveries. | [events](https://anytime-capital.com/docs/events.md) |
| Test helpers | Test mode only (`ak_test_` keys): simulate events without real money. | [test-helpers](https://anytime-capital.com/docs/test-helpers.md) |
| Meta | About the API itself. | [openapi](https://anytime-capital.com/docs/openapi.md) |

## Use it

- **Typed TypeScript:** `npx openapi-typescript https://anytime-capital.com/api/v1/openapi.json -o anytime-capital.d.ts` gives you the request and response types to use with `fetch`.
- **API clients:** import the URL into Postman, Insomnia or Bruno to get every request ready to send; set the bearer token to your key. Or import the ready-made [Postman collection](https://anytime-capital.com/docs/postman.md), with example bodies and your key as a variable.
- **Other languages:** any generator that reads OpenAPI 3.1 can build a client from it. Check the generated code sends `Idempotency-Key` on writes.
- **AI tools:** give an assistant the URL alongside [llms-full.txt](https://anytime-capital.com/docs/llms-full.txt) so it writes calls against the real schemas. See the [AI agents hub](https://anytime-capital.com/docs/build-with-ai.md).

## Endpoint

### Get this OpenAPI document

`GET /api/v1/openapi.json`

Public: no API key needed.

The API described in OpenAPI 3.1. Public; no key needed. Served with `Access-Control-Allow-Origin: *` and cached for an hour, so browsers, API clients and code generators can load it directly.

**Request (curl)**

```bash
curl https://anytime-capital.com/api/v1/openapi.json
```

**Request (Node.js)**

```javascript
const res = await fetch("https://anytime-capital.com/api/v1/openapi.json");
const spec = await res.json();
```

**Request (Python)**

```python
import requests

res = requests.get(
    "https://anytime-capital.com/api/v1/openapi.json",
    timeout=30,
)
spec = res.json()
```

**Response** (200)

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Anytime Capital Payments API",
    "version": "2026-10-24",
    "…": "…"
  },
  "servers": [
    {
      "url": "https://anytime-capital.com/api/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/payments": {
      "get": {
        "operationId": "listPayments",
        "x-anytime-permission": "payments:read",
        "…": "…"
      }
    },
    "…": "…"
  },
  "components": {
    "…": "…"
  }
}
```

---

Anytime Capital is a fintech company, not a bank. Payment processing, banking and payout services are provided by Anytime Capital's licensed partners. Rates shown are for US card payments; international cards, currency conversion and disputes may carry additional fees shown in your dashboard before you accept a payment.
