KosmoKrator

productivity

Ko-fi Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Ko-fi KosmoKrator integration.

7 functions 7 read 0 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.ko_fi.*. Use lua_read_doc("integrations.ko-fi") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Ko-fi — Lua API Reference

list_supporters

List all supporters who have donated or subscribed to your Ko-fi page.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
limitintegernoNumber of results per page (default: 25)

Examples

local result = app.integrations["ko-fi"].list_supporters()

for _, supporter in ipairs(result.supporters) do
  print(supporter.name .. " — " .. supporter.email)
end

Paginated results

local result = app.integrations["ko-fi"].list_supporters({
  page = 2,
  limit = 10
})

print("Total supporters on page: " .. result.totalCount)

get_supporter

Get detailed information about a single Ko-fi supporter.

Parameters

NameTypeRequiredDescription
emailstringyesThe email address of the supporter to retrieve

Example

local result = app.integrations["ko-fi"].get_supporter({
  email = "[email protected]"
})

print(result.name)
print(result.total_donated)
print(result.status)

list_transactions

List all transactions including donations, subscriptions, and shop orders.

Parameters

NameTypeRequiredDescription
typestringnoFilter by type: donation, subscription, or shop_order
pageintegernoPage number for pagination (default: 1)
limitintegernoNumber of results per page (default: 25)

Examples

All recent transactions

local result = app.integrations["ko-fi"].list_transactions()

for _, tx in ipairs(result.transactions) do
  print(tx.type .. " — $" .. tx.amount .. " — " .. tx.supporter_name)
end

Filter by type

local result = app.integrations["ko-fi"].list_transactions({
  type = "donation"
})

print("Donation count: " .. result.totalCount)

list_commissions

List all commission requests on your Ko-fi page.

Parameters

NameTypeRequiredDescription
statusstringnoFilter by status: pending, accepted, completed, or declined
pageintegernoPage number for pagination (default: 1)
limitintegernoNumber of results per page (default: 25)

Examples

All commissions

local result = app.integrations["ko-fi"].list_commissions()

for _, commission in ipairs(result.commissions) do
  print(commission.title .. " — " .. commission.status .. " — $" .. commission.price)
end

Pending commissions only

local result = app.integrations["ko-fi"].list_commissions({
  status = "pending"
})

get_commission

Get details for a single commission.

Parameters

NameTypeRequiredDescription
commission_idstringyesThe ID of the commission to retrieve

Example

local result = app.integrations["ko-fi"].get_commission({
  commission_id = "COM123"
})

print(result.title)
print(result.description)
print(result.status)
print(result.requester_name)

list_shop_items

List all items in your Ko-fi shop.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
limitintegernoNumber of results per page (default: 25)

Examples

local result = app.integrations["ko-fi"].list_shop_items()

for _, item in ipairs(result.items) do
  print(item.name .. " — $" .. item.price)
end

get_current_user

Get the profile of the currently authenticated Ko-fi user.

Parameters

None.

Example

local result = app.integrations["ko-fi"].get_current_user()

print("Connected as: " .. result.name)
print("Email: " .. result.email)

Multi-Account Usage

If you have multiple Ko-fi accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations["ko-fi"].function_name({...})

-- Explicit default (portable across setups)
app.integrations["ko-fi"].default.function_name({...})

-- Named accounts
app.integrations["ko-fi"].main_page.function_name({...})
app.integrations["ko-fi"].side_project.function_name({...})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Ko-fi — Lua API Reference

## list_supporters

List all supporters who have donated or subscribed to your Ko-fi page.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |

### Examples

```lua
local result = app.integrations["ko-fi"].list_supporters()

for _, supporter in ipairs(result.supporters) do
  print(supporter.name .. " — " .. supporter.email)
end
```

#### Paginated results

```lua
local result = app.integrations["ko-fi"].list_supporters({
  page = 2,
  limit = 10
})

print("Total supporters on page: " .. result.totalCount)
```

---

## get_supporter

Get detailed information about a single Ko-fi supporter.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string | yes | The email address of the supporter to retrieve |

### Example

```lua
local result = app.integrations["ko-fi"].get_supporter({
  email = "[email protected]"
})

print(result.name)
print(result.total_donated)
print(result.status)
```

---

## list_transactions

List all transactions including donations, subscriptions, and shop orders.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | no | Filter by type: `donation`, `subscription`, or `shop_order` |
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |

### Examples

#### All recent transactions

```lua
local result = app.integrations["ko-fi"].list_transactions()

for _, tx in ipairs(result.transactions) do
  print(tx.type .. " — $" .. tx.amount .. " — " .. tx.supporter_name)
end
```

#### Filter by type

```lua
local result = app.integrations["ko-fi"].list_transactions({
  type = "donation"
})

print("Donation count: " .. result.totalCount)
```

---

## list_commissions

List all commission requests on your Ko-fi page.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `status` | string | no | Filter by status: `pending`, `accepted`, `completed`, or `declined` |
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |

### Examples

#### All commissions

```lua
local result = app.integrations["ko-fi"].list_commissions()

for _, commission in ipairs(result.commissions) do
  print(commission.title .. " — " .. commission.status .. " — $" .. commission.price)
end
```

#### Pending commissions only

```lua
local result = app.integrations["ko-fi"].list_commissions({
  status = "pending"
})
```

---

## get_commission

Get details for a single commission.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `commission_id` | string | yes | The ID of the commission to retrieve |

### Example

```lua
local result = app.integrations["ko-fi"].get_commission({
  commission_id = "COM123"
})

print(result.title)
print(result.description)
print(result.status)
print(result.requester_name)
```

---

## list_shop_items

List all items in your Ko-fi shop.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |

### Examples

```lua
local result = app.integrations["ko-fi"].list_shop_items()

for _, item in ipairs(result.items) do
  print(item.name .. " — $" .. item.price)
end
```

---

## get_current_user

Get the profile of the currently authenticated Ko-fi user.

### Parameters

None.

### Example

```lua
local result = app.integrations["ko-fi"].get_current_user()

print("Connected as: " .. result.name)
print("Email: " .. result.email)
```

---

## Multi-Account Usage

If you have multiple Ko-fi accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations["ko-fi"].function_name({...})

-- Explicit default (portable across setups)
app.integrations["ko-fi"].default.function_name({...})

-- Named accounts
app.integrations["ko-fi"].main_page.function_name({...})
app.integrations["ko-fi"].side_project.function_name({...})
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.ko_fi.ko-fi_list_supporters({
  page = 1,
  limit = 1
})
print(result)

Functions

ko-fi_list_supporters

List all supporters who have donated or subscribed to your Ko-fi page. Returns supporter names, emails, and contribution history.

Operation
Read read
Full name
ko-fi.ko-fi_list_supporters
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of results per page (default: 25).

ko-fi_get_supporter

Get detailed information about a single Ko-fi supporter by their email address. Returns full supporter profile including contribution history and status.

Operation
Read read
Full name
ko-fi.ko-fi_get_supporter
ParameterTypeRequiredDescription
email string yes The email address of the supporter to retrieve.

ko-fi_list_transactions

List all transactions on your Ko-fi page including donations, subscriptions, and shop orders. Returns transaction details with amounts and dates.

Operation
Read read
Full name
ko-fi.ko-fi_list_transactions
ParameterTypeRequiredDescription
type string no Filter by transaction type: donation, subscription, or shop_order.
page integer no Page number for pagination (default: 1).
limit integer no Number of results per page (default: 25).

ko-fi_list_commissions

List all commission requests on your Ko-fi page. Returns commission details including status, requester info, and pricing.

Operation
Read read
Full name
ko-fi.ko-fi_list_commissions
ParameterTypeRequiredDescription
status string no Filter by commission status: pending, accepted, completed, or declined.
page integer no Page number for pagination (default: 1).
limit integer no Number of results per page (default: 25).

ko-fi_get_commission

Get detailed information about a single Ko-fi commission by its ID. Returns full commission data including description, status, and requester details.

Operation
Read read
Full name
ko-fi.ko-fi_get_commission
ParameterTypeRequiredDescription
commission_id string yes The ID of the commission to retrieve.

ko-fi_list_shop_items

List all items in your Ko-fi shop. Returns item names, descriptions, prices, and availability.

Operation
Read read
Full name
ko-fi.ko-fi_list_shop_items
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
limit integer no Number of results per page (default: 25).

ko-fi_get_current_user

Get the profile of the currently authenticated Ko-fi user. Useful to verify the connection and see account details.

Operation
Read read
Full name
ko-fi.ko-fi_get_current_user
ParameterTypeRequiredDescription
No parameters.