Reporting a payout
How a send gets onto the public ledger.
The system that buys the subs and sends the gifts reports each send to this site. That is the only way a row reaches the Payouts page — the site has no way to invent one, so the ledger is a record of real sends or it is empty.
The endpoint
POST https://donsfamily.netlify.app/api/payout
Authorization: Bearer $BITPAD_PAYOUT_SECRET
Content-Type: application/json
{
"id": "kick-91883", // yours; replaying it is a no-op
"key": "twitch:kaicenat", // platform:handle
"kind": "subs", // subs | donation | gifts
"units": 3, // subs or gifts sent; 1 for a donation
"valueUsd": 17.70,
"valueEth": 0.0069,
"receipt": "US-864477", // order number, or a 0x… tx hash
"note": "fees from $KAI",
"sentAt": 1758326400 // unix seconds (ms accepted)
}Behaviour
A repeated id returns success without adding a second row, so retries are safe. A receipt that looks like a transaction hash is linked to the block explorer automatically. Without the bearer token the endpoint refuses every write, and if the secret has not been configured it refuses all of them — nobody can post a fake send.
Reading it back
GET /api/payout returns the whole ledger, newest first. It is public: the whole point is that anyone can check what was actually sent.