Funding API
Manages podcast funding status and configuration for value-for-value (V4V) payments.
Base Path: /api/funding
Authentication: All endpoints require Bearer token.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /status | Yes | Get user's funding status |
POST | /setup | Yes | Setup podcast funding |
Get Funding Status
Retrieves the current funding configuration for the user.
GET /api/funding/statusResponse:
json
{
"status": {
"has_funding": true,
"provider": "alby",
"lightning_address": "[email protected]",
"podcast_id": "uuid",
"created_at": "2025-01-07T10:00:00Z"
}
}Fields:
| Field | Type | Description |
|---|---|---|
has_funding | boolean | Whether funding is configured |
provider | string | Funding provider (e.g., "alby", "custom") |
lightning_address | string | Lightning Network address |
podcast_id | UUID | Associated podcast |
created_at | string | When funding was configured |
Setup Funding
Configures funding for a podcast. Requires owner role.
POST /api/funding/setupRequest Body:
json
{
"podcast_id": "uuid",
"provider": "alby",
"lightning_address": "[email protected]"
}Fields:
| Field | Type | Required | Description |
|---|---|---|---|
podcast_id | UUID | Yes | Podcast to configure |
provider | string | Yes | Funding provider |
lightning_address | string | Yes | Lightning address |
Response:
json
{
"success": true,
"funding": {
"provider": "alby",
"lightning_address": "[email protected]"
}
}RSS Feed Integration
When funding is configured, the RSS feed includes Podcasting 2.0 value tags:
xml
<podcast:value type="lightning" method="keysend">
<podcast:valueRecipient
name="Host Name"
type="node"
address="[email protected]"
split="100"
/>
</podcast:value>Supported Providers
| Provider | Description |
|---|---|
alby | Alby Lightning wallet |
custom | Custom Lightning address |
TypeScript Client Usage
typescript
import { createApiClient } from '$api/client';
const client = createApiClient(fetch);
// Get funding status
const statusRes = await client.api.funding.status.$get(
{},
{ headers: { Authorization: `Bearer ${token}` } }
);
// Setup funding
const setupRes = await client.api.funding.setup.$post(
{
json: {
podcast_id: 'uuid',
provider: 'alby',
lightning_address: '[email protected]'
}
},
{
headers: { Authorization: `Bearer ${token}` }
}
);Related
- RSS Feed Worker - Value tag generation