Loops House

SplitPay Agent

Agents on Open Rails Hackathon
Team
1 member- JAOwner
jackzhu88
Overview
SplitPay Agent is a pay-per-call agent on Celo mainnet that splits a bill or invoice into exact per-person stablecoin amounts. It is for groups and apps that need a fair split they can pay in Tether's US dollar token USA₮, and for other agents that want a small, verifiable paid tool.
What it does: A client sends GET /split with a total and a list of people with weights. The agent returns each person's amount, rounded with the largest-remainder method so no cent is lost.
How payment works (x402 + USA₮): every call costs 0.001. Without payment, the endpoint answers 402 Payment Required with an x402 v2 challenge on eip155:42220 (exact scheme, EIP-3009). It offers USA₮ first (0xD2ab3C9A02DBBAB236BfEC45D1d755DF4267F771), then USD₮ and USDC. The buyer signs for the token it holds and retries. My server verifies and settles the payment through Celo's hosted facilitator (api.x402.celo.org) before it returns the result. I list Tether's US dollar token USA₮ first because it is the token this track is built around. USD₮ and USDC holders can use the same endpoint.
Where the money goes: payTo is a RevenueSplitter contract, 0x7ea042eb2d0a7e18ab94e11429ef31bd1e2e4175. Its payees and basis-point shares are fixed at deploy time (currently 50/50, both my own wallets). Anyone can call distribute(token) to push the balance to the payees, so buyers can check on-chain where every payment ends up.
Identity and attribution: my agent wallet 0xde9f6B273C9F2A041D90c0ee1545C4C1e2618676 owns ERC-8004 agentId 9982 on the Identity Registry 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432. Its registration file is https://jackzhu88.github.io/splitpay-agent-celo/agent.json. Every transaction my agent sends carries the ERC-8021 attribution suffix with my assigned tag celo_759bf11d2efc, added with @celo/attribution-tags. Gas is paid in USDC through Celo fee abstraction (CIP-64), so the agent holds no CELO.
Architecture: a Solidity RevenueSplitter with local tests (build_test.py), a Node x402 v2 seller (agent/server.mjs: 402 → verify → serve → settle), and viem scripts for deploy, ERC-8004 registration and distribute, all tagged. The service runs on Render; a static demo page is on GitHub Pages.
Honest status: there has been no third-party settlement yet. As of Oct 26, 2026 the PayTo contract has received zero payments, and I have not run a paid round-trip on mainnet myself either. My agent wallet's only on-chain transactions are the contract deployment and the ERC-8004 registration, both sent by me. I am not claiming any users or volume. The live service is on a free tier and may take about a minute to wake up.
Repo: https://github.com/jackzhu88/splitpay-agent-celo Live: https://splitpay-agent-celo.onrender.com Contact: GitHub jackzhu88 · Telegram @jackzhu8888