Open Rails AP-Check

A pay-per-call accounts-payable control service for AI agents, paid with HTTP 402 on Celo. Built by Shyam Desigan, CFO.

This live demo runs on the Celo Sepolia testnet (chain 11142220). There are no keys on this server. It only issues 402 terms and verifies payments that buyers send.

How it works

  1. POST /ap-check with an invoice and no payment returns 402 Payment Required with x402-style terms.
  2. The buyer agent pays 0.001 CELO to the payTo address on Celo Sepolia.
  3. It retries with the header X-PAYMENT: base64({"txHash":"0x…"}). The server checks the receipt on-chain: payee, amount, success, recency and single use. It then returns APPROVE / REVIEW / HOLD with flags (math errors, duplicates, bank-account change, PO overrun, round amounts, tax, dates).

Try it: see the 402 terms

(response appears here)

Or run: curl -i https://celo-open-rails-ap-check.vercel.app/ap-check

Testnet proof (Celo Sepolia)

Not done yet: mainnet payments, ERC-8004 Agent ID, ERC-8021 attribution tag. Settlement is a direct on-chain transfer that the seller verifies; it does not go through the Celo x402 facilitator.

Source on GitHub