KosmoKrator

productivity

Buy Me a Coffee Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Buy Me a Coffee KosmoKrator integration.

7 functions 7 read 0 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.buymeacoffee.*. Use lua_read_doc("integrations.buymeacoffee") 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.

Buy Me a Coffee — Lua API Reference

list_supporters

List all supporters in your Buy Me a Coffee account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)

Example

local result = app.integrations.buymeacoffee.list_supporters()

for _, supporter in ipairs(result.supporters) do
  print(supporter.supporter_name .. " — $" .. supporter.support_amount .. " (" .. supporter.support_id .. ")")
end

get_supporter

Get detailed information about a single Buy Me a Coffee supporter.

Parameters

NameTypeRequiredDescription
supporter_idstringyesThe ID of the supporter to retrieve

Example

local result = app.integrations.buymeacoffee.get_supporter({
  supporter_id = "12345"
})

print(result.supporter_name)
print(result.support_amount)
print(result.support_note)

list_subscriptions

List all active recurring subscriptions.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)

Example

local result = app.integrations.buymeacoffee.list_subscriptions()

for _, sub in ipairs(result.subscriptions) do
  print(sub.supporter_name .. " — $" .. sub.support_amount .. " — " .. sub.status)
end

list_extras

List all extras (additional purchase options) in your Buy Me a Coffee account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)

Example

local result = app.integrations.buymeacoffee.list_extras()

for _, extra in ipairs(result.extras) do
  print(extra.title .. " — $" .. extra.price .. " — " .. extra.purchases .. " purchases")
end

get_extra

Get detailed information about a single extra.

Parameters

NameTypeRequiredDescription
extra_idstringyesThe ID of the extra to retrieve

Example

local result = app.integrations.buymeacoffee.get_extra({
  extra_id = "67890"
})

print(result.title)
print(result.description)
print(result.price)

list_shops

List all shop items in your Buy Me a Coffee account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)

Example

local result = app.integrations.buymeacoffee.list_shops()

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

get_current_user

Get the profile of the currently authenticated Buy Me a Coffee user.

Parameters

None.

Example

local result = app.integrations.buymeacoffee.get_current_user()

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

Multi-Account Usage

If you have multiple Buy Me a Coffee accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.buymeacoffee.function_name({...})

-- Explicit default (portable across setups)
app.integrations.buymeacoffee.default.function_name({...})

-- Named accounts
app.integrations.buymeacoffee.main_page.function_name({...})
app.integrations.buymeacoffee.side_project.function_name({...})

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

Raw agent markdown
# Buy Me a Coffee — Lua API Reference

## list_supporters

List all supporters in your Buy Me a Coffee account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |

### Example

```lua
local result = app.integrations.buymeacoffee.list_supporters()

for _, supporter in ipairs(result.supporters) do
  print(supporter.supporter_name .. " — $" .. supporter.support_amount .. " (" .. supporter.support_id .. ")")
end
```

---

## get_supporter

Get detailed information about a single Buy Me a Coffee supporter.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `supporter_id` | string | yes | The ID of the supporter to retrieve |

### Example

```lua
local result = app.integrations.buymeacoffee.get_supporter({
  supporter_id = "12345"
})

print(result.supporter_name)
print(result.support_amount)
print(result.support_note)
```

---

## list_subscriptions

List all active recurring subscriptions.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |

### Example

```lua
local result = app.integrations.buymeacoffee.list_subscriptions()

for _, sub in ipairs(result.subscriptions) do
  print(sub.supporter_name .. " — $" .. sub.support_amount .. " — " .. sub.status)
end
```

---

## list_extras

List all extras (additional purchase options) in your Buy Me a Coffee account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |

### Example

```lua
local result = app.integrations.buymeacoffee.list_extras()

for _, extra in ipairs(result.extras) do
  print(extra.title .. " — $" .. extra.price .. " — " .. extra.purchases .. " purchases")
end
```

---

## get_extra

Get detailed information about a single extra.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `extra_id` | string | yes | The ID of the extra to retrieve |

### Example

```lua
local result = app.integrations.buymeacoffee.get_extra({
  extra_id = "67890"
})

print(result.title)
print(result.description)
print(result.price)
```

---

## list_shops

List all shop items in your Buy Me a Coffee account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |

### Example

```lua
local result = app.integrations.buymeacoffee.list_shops()

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

---

## get_current_user

Get the profile of the currently authenticated Buy Me a Coffee user.

### Parameters

None.

### Example

```lua
local result = app.integrations.buymeacoffee.get_current_user()

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

---

## Multi-Account Usage

If you have multiple Buy Me a Coffee accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.buymeacoffee.function_name({...})

-- Explicit default (portable across setups)
app.integrations.buymeacoffee.default.function_name({...})

-- Named accounts
app.integrations.buymeacoffee.main_page.function_name({...})
app.integrations.buymeacoffee.side_project.function_name({...})
```

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

Metadata-Derived Lua Example

local result = app.integrations.buymeacoffee.buymeacoffee_list_supporters({
  page = 1
})
print(result)

Functions

buymeacoffee_list_supporters

List all supporters in your Buy Me a Coffee account. Returns supporter names, emails, support amounts, and dates.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_list_supporters
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).

buymeacoffee_get_supporter

Get detailed information about a single Buy Me a Coffee supporter by their ID. Returns full supporter data including support history and notes.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_get_supporter
ParameterTypeRequiredDescription
supporter_id string yes The ID of the supporter to retrieve.

buymeacoffee_list_subscriptions

List all active recurring subscriptions in your Buy Me a Coffee account. Returns subscriber details, amounts, and status.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_list_subscriptions
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).

buymeacoffee_list_extras

List all extras (additional purchase options) in your Buy Me a Coffee account. Returns extra names, descriptions, and pricing.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_list_extras
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).

buymeacoffee_get_extra

Get detailed information about a single Buy Me a Coffee extra by its ID. Returns full extra data including description, pricing, and purchase count.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_get_extra
ParameterTypeRequiredDescription
extra_id string yes The ID of the extra to retrieve.

buymeacoffee_list_shops

List all shop items in your Buy Me a Coffee account. Returns shop item names, descriptions, prices, and availability.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_list_shops
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).

buymeacoffee_get_current_user

Get the profile of the currently authenticated Buy Me a Coffee user. Useful to verify the connection and see account details.

Operation
Read read
Full name
buymeacoffee.buymeacoffee_get_current_user
ParameterTypeRequiredDescription
No parameters.