3 pointsby Mike-io7 hours ago1 comment
  • Mike-io7 hours ago
    Hi HN — I've been hacking on satsgate, an open-source FastAPI service to charge per API call using Lightning and the L402 (HTTP 402) flow.

    The basic idea: your endpoint returns a 402 challenge with an invoice + macaroon; the client pays, gets the preimage, and retries with `Authorization: L402 <macaroon>:<preimage>`. satsgate handles invoice creation/verification and adds a simple credits layer (1 credit = 1 successful verification), plus a ledger and basic usage forecasting for operators.

    Hosted beta: https://api.satsgate.org (docs: https://api.satsgate.org/docs). It's also self-hostable (Docker compose is in the repo).

    I'm looking for 3–10 beta operators to integrate it into a real endpoint and tell me what’s missing. If you're up for it, open a “Beta Operator (Hosted)” issue: https://github.com/Mike-io-hash/satsgate/issues/new/choose

    Would love feedback on the API shape and whether the credits model makes sense.