Get paid for freelance work in seconds, not weeks β with a permanent, portable income record.
PayLoop is an invoicing + escrow dApp built on Stellar/Soroban. It lets freelancers (built with Nigerian & African freelancers working with foreign clients in mind) create an invoice, share a payment link, and receive USDC the moment a client funds it β settling in ~5 seconds for a fraction of a cent, instead of the 2β5 days and 5β8% that PayPal/Payoneer cost. Every paid invoice is a timestamped on-chain record that becomes the freelancer's portable income history. Open-source Soroban invoicing and escrow dApp enabling freelancers to receive USDC payments and build verifiable on-chain income records.
Website: https://pay-loop-neon.vercel.app
Topics: stellar, soroban, rust, usdc, escrow, invoicing, freelancers, web3, payments
create_invoice β fund_invoice (client pays, escrow + instant release) β Paid, on-chain forever
That create β fund β release loop is PayLoop. Everything else is UX around it.
π Live app: https://pay-loop-neon.vercel.app Β Β·Β π¬ Demo video: https://www.loom.com/share/0b08c1208df841ac96ecd61b2b05a7a9 π€ Pitch deck: /pitch (web) Β· PayLoop-Pitch-Deck.pptx
This level is about growth, iteration, and pitching. Everything shipped here is driven by the user feedback collected in Level 4.
- 60 testnet users onboarded with real wallet transactions β proof log in docs/USERS.md, live on the Activity page (unique-wallet + invoice counts, Export CSV), and on stellar.expert.
- On-chain activity snapshot (point-in-time, 2026-08-12): docs/testnet-traction.csv β 42 invoices on-chain, 34 Paid. This is a committed snapshot, not a live figure; for the current on-chain count, see the live Activity page.
- Feedback collection: a user survey collecting name, email, wallet address, network, product rating and written feedback.
- Raw responses (Google Sheet): view-only link.
- Excel export (committed):
docs/survey-responses.xlsxβ generated from the form CSV bypython3 scripts/build-excel.py, with a Responses sheet (every user) and a Summary sheet (metrics).
The full traceability table β each user request, the feature that shipped, and its commit β is in docs/GROWTH.md. Summary of what shipped:
- Invoice history page with search + status/role filters
- Invoice preview before sending
- PDF export for any invoice (and paid receipts)
- Onboarding walkthrough (first-run tour + navbar "?")
- Payment reminders (one-click copy-to-send)
- Dark/light mode toggle (dark default)
- UX polish: retry on all load errors, stronger buttons, better empty states
- Analytics: activity-page CSV export + live usage stats
- Pitch deck: web /pitch Β·
downloadable
PayLoop-Pitch-Deck.pptx(generated bypython3 scripts/build-pitch.py). - Demo video: Level-5 walkthrough covering create β preview β pay β history β activity β withdraw β script in DEMO.md.
Mapped requirement-by-requirement in SUBMISSION.md.
| Problem (today) | PayPal / wire | PayLoop on Stellar |
|---|---|---|
| Speed | 2β5 days; PayPal 21-day holds | ~5 second settlement |
| Cost | 3β5% fee + 5β8% FX markup | fractions of a cent network fee |
| Income trail | scattered bank alerts, WhatsApp | tamper-proof on-chain invoice history |
| Compliance | you become a money transmitter | anchors handle the regulated fiat on/off-ramp |
- Smart contract β
contracts/invoice, Rust/Soroban, deployed to Stellar testnet. Holds invoices and performs the atomic clientβfreelancer USDC transfer on funding. - Web app β
web/, Next.js (App Router) + TypeScript + Tailwind, Freighter wallet, deployed on Vercel. Mobile-responsive, with loading/error states throughout. - Observability β Sentry (errors) + Vercel Analytics (usage).
- Public activity feed β
/activityreads every invoice straight off the contract and reports usage stats; doubles as verifiable proof of wallet interactions. - Feedback β in-app widget β
/api/feedback(forwards to an optional webhook). - Anchor off-ramp β USDC β Naira bank payout is mocked for this submission with clear UX and a documented integration path. See docs/ANCHOR.md.
Full design: docs/ARCHITECTURE.md. Contract-level integrator reference (entrypoints, auth matrix, errors, events, integration code): contracts/invoice/README.md.
- The contract is the only database. Invoice state lives in two persistent
storage keys per freelancer (
Invoice(id)records and a per-freelancerHistoryindex) plus three instance keys set once atinitialize(admin, default token, id counter). There is no application backend holding state. - Two-state lifecycle:
Pending β Paid, transitioned atomically insidefund_invoicetogether with the clientβfreelancer token transfer (instant release β the contract never custodies funds). Double payment is impossible (AlreadyPaid), and a short client balance fails with a typedInsufficientBalanceerror instead of an opaque token trap. - Authorization is minimal and verified: only the freelancer being credited
can create their invoice, only the named client can fund it, and no admin
power exists after one-time initialization. Authorization enforcement is
covered by
MockAuthtests (impostor and no-auth rejections). - Events for indexers:
InvoiceCreatedandInvoicePaidemit freelancer/client as topics, so off-chain indexers can watch addresses directly instead of scanning invoices.
Ecosystem relevance beyond the product itself:
- A reusable, token-agnostic invoice/escrow contract. The payment token is
chosen at
initialize, invoices store the token they were created with, and the instant-release escrow pattern is documented for reuse β contracts/invoice/README.md ships the lifecycle, storage model, auth matrix, error codes, event schema, build/test commands and copy-paste TypeScript/CLI integration examples against the live testnet deployment. - A reusable authorization-test pattern.
contracts/invoice/src/test.rspairs standardmock_all_authsconvenience tests withMockAuth-verified tests that prove exactly which party must sign each write (including the nested token-transfer authorization insidefund_invoice) β a technique other Soroban teams can copy for their ownrequire_authcoverage. - Practical testnet-SAC lessons in the open. The repo documents and
implements the friction points of using an issued asset on Soroban testnet:
in-app trustline management via
changeTrust(Freighter's asset UI is unreliable across versions), a server-side faucet pattern with the issuer secret kept server-only, and the reasoned25519-dalekis pinned against asoroban-env-hosttestutils break (contracts/invoice/Cargo.toml). - Contract CI that builds the real artifact. Every push to
contracts/runs fmt/clippy/tests and uploads the optimizedwasm32v1-noneWASM as a CI artifact β the deployable build is verifiable, not just claimed.
Known limitations are documented, not hidden: the testnet-only faucet (now rate-limited per wallet, though best-effort on serverless), the id-scan activity feed (correct long-term primitive would be the contract events), and the unbounded growth of the per-freelancer history read β all in docs/ARCHITECTURE.md and the contract README.
- Create an invoice on-chain (client, amount, description, optional due date).
- Preview the invoice before it goes on-chain, and export any invoice as PDF.
- Share a
/pay/<id>link; the client funds it in one wallet click. - Instant settlement β USDC moves clientβfreelancer atomically, marked
Paid. - Invoice history page with search + status/role filtering and payment reminders (one-click copy-to-send).
- Freelancer dashboard: invoices, balance, received/pending totals, test-USDC faucet, and an overdue/pending reminders card.
- Public on-chain activity feed with unique-wallet and settled-volume stats + CSV export.
- Dark/light mode toggle (dark default) and a first-run onboarding tour.
- Mocked USDCβNaira off-ramp with a documented SEP-24 path.
- Monitoring (Sentry) + analytics (Vercel) + in-app feedback collection.
- Pitch deck live at /pitch.
| Item | Value |
|---|---|
| Network | Stellar Testnet |
| Invoice contract | CAQVSBNVL7OI66IDTYCR7XL4VJKMSOYGBW5D6SWLTWTINTCQO2OGCSXS |
| Payment token (test USDC SAC) | CA3DMMHKAEV555MKWZB5AFXWB6LVZRETYNUO5ZCFGSENQOC7A2FL5HNU |
| Live app | https://pay-loop-neon.vercel.app |
Full deployment metadata: contracts/deployment.testnet.json.
The app is a standard Next.js project. From web/:
npm install
vercel --prod # or import the repo in the Vercel dashboardSet the root directory to web/. The public testnet contract/token addresses
are baked in as defaults, so the app works with zero env vars. To enable the
faucet, monitoring, or feedback forwarding, set USDC_ISSUER_SECRET,
NEXT_PUBLIC_SENTRY_DSN (+ SENTRY_ORG/SENTRY_PROJECT), and
FEEDBACK_WEBHOOK_URL in the Vercel project settings. See
web/.env.example.
GitHub Actions runs on every push and pull request
(.github/workflows/):
| Workflow | What it does |
|---|---|
contract.yml |
Contract CI β cargo fmt --check, clippy, cargo test, and an optimized wasm32v1-none release build (uploaded as an artifact) |
web.yml |
Web CI β npm ci, npm run lint, npm run build |
deploy.yml |
CD β Vercel production deploy on push to main (via the Vercel CLI when VERCEL_* secrets are set; Vercel's native Git integration otherwise) |
The four proof-critical shots:
| Dashboard (balance, invoices, faucet, reminders) | Payment β paid (explorer tx link) |
![]() |
![]() |
| On-chain activity (unique-wallet stats, proof of interactions) | Create invoice (templates + preview) |
![]() |
![]() |
The full index (landing, preview, history, feedback, tour, mobile, analytics, monitoring, light theme) is the single canonical list maintained in docs/screenshots/README.md β see also docs/GROWTH.md for the full feedback β shipped trace.
Watch the π¬ demo video for the full create β pay β on-chain loop. The demo-video script, onboarding steps, and how to capture proof of wallet interactions are in DEMO.md. The user-feedback summary (60 responses, avg 5.2/6) is in docs/FEEDBACK.md, collected via a user survey β raw responses (Google Sheet).
- Requirement-by-requirement checklist: SUBMISSION.md
- Proof of 60 user wallet interactions: docs/USERS.md + the live Activity page
- User feedback iteration summary: docs/FEEDBACK.md + docs/GROWTH.md
- Growth & onboarding plan: docs/GROWTH.md
- Excel export of survey responses:
docs/survey-responses.xlsx
Prerequisites: Node 20+, Rust + stellar CLI (cargo install --locked stellar-cli).
# Contract
cd contracts/invoice
cargo test # run unit tests
stellar contract build # build the wasm
# Web
cd web
cp .env.example .env.local # fill in contract + token addresses
npm install
npm run devSee contracts/DEPLOYMENT.md for the full testnet deploy + token setup steps.
PayLoop/
βββ .github/workflows/ CI (contract + web) and CD (Vercel) pipelines
βββ contracts/
β βββ invoice/ Soroban invoice/escrow contract (Rust) + tests
β β βββ README.md Integrator reference: lifecycle, auth, errors, events, examples
β βββ DEPLOYMENT.md Testnet deploy + token setup steps
β βββ deployment.testnet.json
βββ scripts/
β βββ build-excel.py Generate docs/survey-responses.xlsx (stdlib only)
β βββ build-pitch.py Generate the .pptx pitch deck (stdlib only)
βββ web/ Next.js frontend (App Router)
β βββ app/ routes incl. /history, /pitch, /activity, /api/*
β βββ components/ wallet, theme, tour, invoice document, feedback
β βββ lib/ config, wallet, contract, format
βββ docs/
β βββ ARCHITECTURE.md System design
β βββ ANCHOR.md Mock vs. production off-ramp (SEP-24)
β βββ FEEDBACK.md User-feedback summary
β βββ GROWTH.md Feedbackβshipped table + next-phase plan
β βββ USERS.md 60-user proof log
β βββ survey-responses.csv Google Form CSV export
β βββ survey-responses.xlsx Generated Excel export (Responses + Summary)
β βββ testnet-traction.csv On-chain invoice activity snapshot
β βββ pitch/ PayLoop-Pitch-Deck.pptx
β βββ screenshots/ Submission screenshots
βββ CONTRIBUTING.md How to report bugs and submit PRs
βββ AUDIT.md Maintainer-criteria audit + remediation trace
βββ DEMO.md Demo-video + user-onboarding checklist
βββ README.md
- MVP (this): single invoice, shareable pay link, instant release on fund, on-chain history.
- Next: live USDCβNaira anchor off-ramp, milestone-based escrow (deposit + final), on-chain reputation score, recurring/retainer invoices, multi-stablecoin, agency batch payouts.
- Bugs and feature requests: open an issue; see CONTRIBUTING.md for what to include and the review process. Security reports: private security advisory per SECURITY.md.
- MIT licensed.



