All guide pages
The FairPay guide
Overview
This guide covers the whole project: how to use the FairPay app, how payments and private payments work, and how to run, test, deploy and build on it. FairPay is a testnet prototype. Nothing here is audited.
- New here? Get started with the app, or open FairPay straight away.
- No wallet handy? Try the simulated demo.
- Want to run it? Run it locally.
- Building a checkout? Use the SDK.
- Deciding whether to trust it? Security and limitations.
What FairPay isLink to this section
FairPay is a bill-splitting app for friends, with payments in test USDC on Monad Testnet. A share only shows as paid after FairPay finds the payment on-chain. Its Business section holds FairEats, where restaurants list menus and tables, guests order and split the bill at the table, and the restaurant issues Indian GST invoices.
The project has four parts:
| Part | What it does |
|---|---|
FairPay app apps/fairpay | Bill splitting (evenly, by amounts, percent or shares) with share links, seat claims and reminders, plus FairEats: restaurant registration, menus, tables, a kitchen board, orders and GST invoices. Live on this website at /pay/. |
Contracts packages/contracts | FairPay routes a payment to an allowlisted merchant and emits one PaymentReceived event. FairPool is a privacy pool built on Semaphore v4 with a fixed 5 USDC note size. MonadSemaphoreVerifier checks the zero-knowledge proofs on Monad. |
SDK @fairpay/sdk | Creates order references, pays publicly or privately, runs a relayer, and verifies payments against the chain. |
FairEats demo apps/faireats | The original single-restaurant app, "Saffron Table". Its simulated build is the demo on this site, which runs in your browser with no wallet. |
There are two ways to pay:
- Public. You pay from your wallet. Anyone looking at the chain sees your wallet, who you paid and the amount. Bills between friends are paid this way.
- Private (Confidential in the app). You pay with 5 USDC notes you added to the pool earlier. Your browser builds a proof that you own the notes, and a relayer sends the payment, so it does not contain your wallet. This works when you pay a verified business, such as a FairEats restaurant whose payout wallet is allowlisted.
Either way, FairPay does not trust your browser. It only marks a share paid after it finds the payment on-chain.