About AskPay
A pay-per-use AI chat app that settles payments on the Celo blockchain — no subscription, no account, no monthly bill.
The problem it solves
Most AI assistants today require a subscription — you pay $20 a month whether you ask one question or a thousand. For people who want occasional, high-quality AI answers, that model is wasteful and excludes anyone who can't or won't commit to a recurring charge.
AskPay's answer is simple: pay per query in USDm stablecoin, directly from your wallet. No registration, no credit card, no account to manage. The cost of a single query is small enough to be trivial — and you only pay when you actually use it.
The primary audience is anyone in a region where MiniPay is already the everyday payment tool. For those users, AskPay is a natural extension: the same wallet they use to send money to family can now answer their questions.
Built for Celo's Proof of Ship
AskPay was built as part of Celo's Proof of Ship program — a builder initiative that challenges developers to ship real, usable products on Celo rather than just prototype demos.
The program pushes builders to go through the full product lifecycle: designing a contract, deploying it to mainnet, integrating a real frontend, and making it accessible to actual users — not just running on localhost. AskPay is the direct result of working through that process.
Why we built this
Honestly, the starting point was curiosity: what does it actually take to gate an AI API response behind a verifiable on-chain payment? Not a simulated payment, not a trusted client claim — a real blockchain transaction the server can verify before it calls the LLM.
Getting that plumbing solid without leaking query IDs or racing the block confirmation was the interesting engineering challenge. The use-minipay-paygate package came out of solving that cleanly.
Who built it
Solo Developer
Full-stack / Web3 developer building on Celo. AskPay is a Proof of Ship submission exploring pay-per-use AI tooling.
Links
Built with
Everything listed here is actually used in the codebase — no aspirational claims.
App Router, server components, API routes (the /api/ask endpoint).
PayPerQuery.sol — ERC-20 pull-payment contract using OpenZeppelin Ownable v5.
Contract compilation, testing, and parameterised deployment to Celo Sepolia / mainnet.
All on-chain reads (fee, allowance, balanceOf) and transaction receipt parsing in the verification layer.
React hooks for wallet connection, contract reads, and write transactions inside the chat UI.
Target chain — chosen for sub-$0.001 gas, ~5 s finality, and native ERC-20 gas fee tokens.
Primary deployment target. Auto-detects the MiniPay provider and skips the standard connect button.
Internal npm package (also published separately) — server-side on-chain payment verification built on viem.
Monorepo tooling tying together the web app, contracts workspace, and shared packages.