Health and support API
Endpoints for public supporter statistics and the one-time donation Stripe checkout. These are used by the ticketyboo.dev team page and the support widget.
GET /api/team/supporters
/api/team/supporters
No auth required
Returns aggregated supporter stats: total number of supporters and total donation amount in pence. Used to display live supporter counts on the site.
Response (200 OK)
{
"supporter_count": 42,
"total_pence": 84000
}
Fields
| Field | Type | Description |
|---|---|---|
supporter_count | integer | Number of unique supporters who have completed a donation checkout |
total_pence | integer | Total donated in GBP pence (divide by 100 for pounds) |
Example
curl https://api.ticketyboo.dev/api/team/supporters
POST /api/support
/api/support
No auth required
Creates a Stripe Checkout Session for a one-time GBP donation. Returns a checkout URL. The user is redirected to Stripe to complete payment. Donations are processed in GBP.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount_pence | integer | Yes | Donation amount in GBP pence. Minimum: 100 (£1.00). |
donor_name | string | No | Optional name shown on the supporter list |
Response (200 OK)
{
"checkout_url": "https://checkout.stripe.com/c/pay/...",
"session_id": "cs_..."
}
Error responses
| Status | Condition |
|---|---|
| 400 | Missing amount_pence or amount below minimum |
Webhook handling
When a donation checkout completes, Stripe sends a checkout.session.completed event to POST /api/stripe-webhook. The webhook handler records the donation in DynamoDB and increments the supporter stats counter. Webhook signatures are verified using HMAC-SHA256 with a 5-minute replay protection window.
GET /api/team/{resource}
/api/team/{resource}
No auth required
Proxy endpoint for the /team/ dashboard. Returns data from DynamoDB team-activity table populated by the ops-agents Lambda functions. The resource path segment selects the data category (for example sre, cost, security, cto).
The /api/team/ endpoints serve the internal team dashboard at /team/. The data is written by four EventBridge-scheduled Lambda functions (ops-agents) and is not user-generated.