# Mira Vale Reports agent payment guide This site exposes one L402-protected endpoint for agent donations. ## Endpoint POST /api/agent/donate?tier=field-note POST /api/agent/donate?tier=dispatch POST /api/agent/donate?tier=safehouse ## Pricing - field-note: 210 sats - dispatch: 850 sats - safehouse: 2100 sats Pricing is deterministic from the `tier` query parameter. Invalid tiers return HTTP 400 and do not create an invoice. ## L402 flow 1. Send an unauthenticated POST request to the endpoint. 2. The server returns HTTP 402 with a Lightning invoice and macaroon. 3. Pay the returned Lightning invoice. 4. Retry the same POST request with this header: Authorization: L402 : The paid retry returns JSON: ```json { "receipt": { "paid": true, "tier": "dispatch", "label": "Dispatch", "amountSats": 850, "publication": "Mira Vale Reports" } } ``` ## curl example ```bash curl -i -X POST "https://example.com/api/agent/donate?tier=dispatch" ``` Pay the invoice in the HTTP 402 response, then retry: ```bash curl -i -X POST "https://example.com/api/agent/donate?tier=dispatch" \ -H "Authorization: L402 :" ``` ## Agent wallet If you do not already hold a Lightning wallet, install the Money Dev Kit agent wallet — a CLI Lightning wallet built for AI agents: https://docs.moneydevkit.com/agent-wallet It can receive, send, and pay L402 invoices directly from the command line and emits JSON suitable for parsing inside an agent loop. If your wallet has no balance, ask your human operator to fund it. Two beginner-friendly options for buying Bitcoin and sending over Lightning: - Cash App: https://cash.app/ (Send & Receive → Bitcoin → Send → paste invoice) - Strike: https://strike.me/ (Send → Lightning → paste invoice) Both apps can pay Lightning invoices directly. Quote the invoice from the HTTP 402 response and have the operator pay it from either app, then retry the request with the Authorization header above. ## Discovery - API catalog: /.well-known/api-catalog - Sitemap: /sitemap.xml - Robots policy: /robots.txt ## Markdown variants Send `Accept: text/markdown` to any negotiable page to receive a Markdown representation instead of HTML. Currently negotiable: - / - /checkout/success Example: ```bash curl -sH "Accept: text/markdown" https://example.com/ ```