BRIEFOUI
Pay-per-use AI summaries via crypto.
Created on 30th April 2026
•
BRIEFOUI
Pay-per-use AI summaries via crypto.
The problem BRIEFOUI solves
Right now, if an AI agent needs to pay for something (an API, a service, data), it can't — payment systems are built only for humans with credit cards and bank accounts. Locus fixes this by making a checkout that is machine-readable, meaning a bot can find it, read it, and pay through it just like a human would click and pay.
Challenges I ran into
- Locus SDK Was Unfamiliar Territory
Unlike Stripe, Locus has minimal community examples.
Understanding the checkout session flow — especially
how to verify on-chain payment status before releasing
the AI response — required careful reading of the beta
docs and trial-and-error with the API responses.
Fix: Built a manual verification step that polls
/api/checkout/sessions/:id and checks for
status === 'paid' || 'complete' before calling Claude.
- Making the App Agent-Readable
The hackathon required the checkout to work for AI
agents, not just humans. Standard checkout flows assume
a human clicking — agents need a raw API path.
Fix: Exposed /api/checkout/create and
/api/summarize as clean REST endpoints with no
session cookies or human-only redirects, so agents
can call them programmatically with just JSON.
- Payment Timing — Race Condition
Users would click "I've Paid" before the on-chain
confirmation had propagated, causing the summarizer
to reject valid payments.
Fix: Added a friendly error state that tells the
user to wait a few seconds and retry, rather than
failing silently or blocking the UI.
4. Environment Separation (Beta vs Prod)
Accidentally pointed to the production Locus URL
during early testing instead of beta.paywithlocus.com,
causing auth failures with beta API keys.
Fix: Hardcoded the beta base URL as a constant in
the server and added a console warning on startup to
confirm which environment is active.
Tracks Applied (1)
Track: Checkout with Locus
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.