Inspiration

AI agents already pay for the web one request at a time. x402 brought back HTTP 402, Payment Required, and it has passed a hundred million payments, nearly nine in ten of them under a dime. But almost every rail built for it settles in stablecoins, so the 439 million PayPal accounts that companies already use can't join in. PayPal can't bill half a cent, and a 49-cent fee on every payment would turn $50 of calls into thousands of dollars in fees. We wanted agents to pay with the money finance teams already use.

What it does

402 Fiatality is a bar tab for AI agents, on PayPal.

  1. Finance describes a budget in plain English. Backend agent turns it into a spending policy, and one PayPal approval places a $50 hold. Nothing is charged yet.
  2. Agents call seller APIs through our gateway with x402 v2 headers. Every paid call carries an Ed25519-signed IOU that the gateway checks locally, so paying adds no PayPal round trip.
  3. Bad answers, such as errors, timeouts and empty or malformed results, are voided under rules each seller publishes, before anyone pays. If spending looks wrong, an alarm pauses the tab and the backend agent holds a trial with a prosecutor, a defender and a judge, who can void bad calls or freeze a runaway agent.
  4. At $50 or day seven, the tab settles as one PayPal capture and the rest of the hold is released. PayPal's fee is split across sellers by what each earned, and sellers are paid through PayPal Payouts.
  5. If the company disputes the charge on PayPal, an AI jury drafts the response from the signed IOUs, and a person sends it.

The buyer pays exactly the list price of the calls, sellers keep about 95% of a full tab, and PayPal earns its normal fees on spending it can't process today. There's no middleman: we built it for PayPal to run.

How we built it

It's a TypeScript monorepo: a Fastify gateway with SQLite, a React 19 app, three demo seller APIs and a shopping agent. Orders v2 and Payments v2 go through the PayPal Server SDK (authorize, reauthorize, capture with final_capture, void and refund), and Payouts, Disputes and Invoicing go over REST. We wrote a PayPal binding for x402's batch-settlement scheme. Gemma 4 runs locally through Ollama, and the live demo calls the Gemini API on Render. The clearing terminal is AG Grid Enterprise, the dashboards are AG Charts and AG Studio, the hold calendar is Bryntum Scheduler, and the agent shops real products through Channel3. Almost 400 automated tests run offline.

Challenges we ran into

  • PayPal amounts stop at the cent, so the ledger counts in millionths of a dollar and carries any fraction of a cent into the next tab.
  • A PayPal hold is honored for 3 days and can be reauthorized once, so the scheduler renews on day 4 and charges by day 7, and tabs under $10 wait until day 28.
  • Small models are slow on a laptop, so each argument in the AI trial is capped at 35 words, and anything below 0.6 confidence goes to a person.

Accomplishments that we're proud of

  • It runs end to end on the PayPal sandbox: holds, partial capture with final_capture, payouts, invoices and two live disputes, one accepted and one won.
  • In a load test at PayPal's published fees, 5,201 paid calls cleared through one tab in 42 seconds and settled for $1.20 in fees, against $2,045.97 if every call had been its own payment.
  • Where money is at stake, the AI only recommends. A person always sends the dispute response.

What we learned

Fixed fees, not percentages, are what break micropayments, and PayPal's own authorizations are enough to batch them. We also found that an AI that argues both sides before it rules is far easier to trust than one that just answers.

What's next for 402 Fiatality

A pilot with Channel3 and a few API sellers that already take PayPal, clearing on PayPal's delayed disbursement so only PayPal holds the money, and publishing the PayPal binding for x402 so any x402 agent can pay with PayPal. If PayPal runs it, we estimate about $23.8 million a year in revenue by 2029.

Built With

Share this project:

Updates

Submission history