https://invoisio-roan.vercel.app/
Invoisio is a modern, privacy‑first invoice platform. It combines AI‑assisted invoice creation with fast, low‑cost crypto payments on the Stellar network. Payments are sent directly to merchant accounts using Stellar's native Payment operation. Optional memos (text or hash) carry the invoice identifier for reliable off‑chain matching and reconciliation.
Invoisio is being adapted to run with grant programs on GrantFox (grantfox.xyz) so contributors can help fund and use the app in real projects.
- AI‑assisted invoice creation with clean, responsive UI
- Wallet‑based authentication (Freighter, Lobstr, Albedo, etc.); no passwords
- Invoice detail page with SEP-0007 payment links (web)
- Live status updates via intelligent polling with exponential backoff
- Ultra‑low‑cost payments on Stellar: XLM and USDC
- Real‑time backend reconciliation via Horizon (listen for payments + memo)
- Privacy‑first mindset; collect only what’s necessary
The invoice detail page (web: /invoices/[id]) allows payers to:
- View Invoice Details — Client name, amount, due date, payment instructions
- Initiate Payment — Click "Pay Invoice" to open wallet via SEP-0007 payment link
- Monitor Status — Real-time polling with exponential backoff detects payment completion
- Manual Verification — "Refresh Status" button for immediate checks
- Desktop: Freighter extension, or any SEP-0007 compatible wallet
- ✅ SEP-0007 URI Generation — Creates proper
web+stellar:pay?...links with memo matching - ✅ Intelligent Polling — Starts at 2s intervals, uses exponential backoff (max 30s), stops on success
- ✅ Error Recovery — Up to 5 automatic retries, graceful degradation if wallet unavailable
- ✅ Transaction Tracking — Displays
tx_hashafter payment confirmed - ✅ Responsive Design — Works seamlessly on web
For detailed integration docs, see docs/INVOICE_PAYMENT_SETUP.md and docs/invoice-detail-payment-flow.md.
./
├── webapp/ # Next.js 14 app (frontend UI)
├── backend/ # New Stellar-first NestJS API (invoices, payments, Soroban integration)
├── smart-contracts/ # Soroban smart contracts (Rust · stellar contract init)
│ └── contracts/
│ └── invoice-payment/ # Invoice payment tracking contract
└── legacy/ # All legacy code kept during migration
├── backend-legacy/ # Original backend kept as reference during migration
└── legacy-evm/ # EVM prototype (Solidity + Hardhat)
├── contracts/ # Solidity PaymentRouter and related contracts
└── hardhat/ # Hardhat project (compile/deploy EVM router)
- Node.js 18+
- pnpm or npm
- A Stellar wallet (Freighter, Lobstr, Albedo, or StellarX)
- Testnet XLM from Friendbot faucet:
https://friendbot.stellar.org/?addr=YOUR_PUBLIC_KEY
Replace YOUR_PUBLIC_KEY with your Stellar testnet address (starts with G).
Create backend/.env and set:
# Stellar network
HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# For mainnet later: https://horizon.stellar.org + "Public Global Stellar Network ; September 2015"
# Merchant receiving account (your app's merchant public key)
MERCHANT_PUBLIC_KEY=GBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Optional USDC issuer & asset (Circle USDC on Stellar)
USDC_ISSUER=GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
USDC_ASSET_CODE=USDC
# For memo matching (your app logic decides format)
MEMO_PREFIX=invoisio-
# Database, auth, etc.
DATABASE_URL=postgresql://...
JWT_SECRET=...Then:
cd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run start:devThe backend will be responsible for:
- Creating and storing invoices and their identifiers
- Watching Horizon for incoming payments to
MERCHANT_PUBLIC_KEY - Matching payments by memo (e.g.,
invoisio-<invoiceId>)
cd webapp
npm install
npm run dev
# open http://localhost:3000The frontend handles:
- AI‑assisted invoice creation
- Displaying payment details for Stellar (destination, asset, amount, memo)
- Connecting a Stellar wallet (e.g., Freighter) to sign Payment operations
- Wallet signature flow; no passwords
- Users own their identity via their Stellar wallet
- Minimal data collection to preserve privacy
The smart-contracts/ workspace contains Rust-based Soroban contracts built with the official stellar contract init template.
Tracks invoice payments on-chain so the backend can reconcile Soroban events with native Horizon payment streams.
| Method | Description |
|---|---|
initialize(admin) |
One-time setup; sets the backend service account as admin. |
record_payment(invoice_id, payer, asset_code, asset_issuer, amount) |
Persist record + emit ("payment","recorded") event. |
get_payment(invoice_id) |
Return stored PaymentRecord. |
has_payment(invoice_id) |
Non-panicking existence check. |
Every record_payment emits a Soroban event carrying the full PaymentRecord, enabling any indexer to subscribe via stellar events CLI or the Soroban RPC getEvents endpoint.
- Native Stellar payments:
- Destination:
MERCHANT_PUBLIC_KEY - Asset: XLM or USDC on Stellar
- Memo:
MEMO_PREFIX + <invoiceId>for off‑chain matching
- Destination:
- Soroban (
smart-contracts/):invoice-paymentcontract records and indexes payment state- Events consumers can stream: topics
("payment", "recorded") - Future room for programmable discounts, escrow, or milestone payments
See smart-contracts/README.md for full build, deploy, and invocation instructions.
- Frontend:
npm run dev— start Next.js dev servernpm run build— production buildnpm run start— run built app
- Backend:
npm run start:dev— run NestJS in watch modenpm run test/npm run test:e2e— tests
- Soroban contracts (
smart-contracts/):stellar contract build— compile to WASMcargo test— run all unit tests (no network needed)make deploy— deploy to Stellar testnet (fromcontracts/invoice-payment/)make invoke-record-payment CONTRACT_ID=<id> ...— call contract on testnet- See
smart-contracts/README.mdfor full details
- Legacy contracts/Hardhat (EVM prototype, optional):
npx hardhat compile— compile contractsnpx hardhat run scripts/deploy.js --network baseSepolia— deploy routernpx hardhat run scripts/tx-demo.js --network baseSepolia— send demo payment
- Next.js 14, TypeScript, Tailwind CSS (neumorphic styling)
- Radix UI + shadcn/ui components
- NestJS + Prisma (PostgreSQL)
- Stellar network (Horizon testnet/mainnet)
This project is being prepared to run on GrantFox (grantfox.xyz) so that:
- Grants can fund continued development of Invoisio on Stellar
- Contributors can help improve the app (AI, UX, payment flows)
- Projects using GrantFox can plug in a privacy‑first invoicing flow
- Full invoice CRUD and client portal
- Advanced AI invoice suggestions
- Stellar payment watcher and memo‑based reconciliation
- Multi‑asset support (more tokens on Stellar)
- Analytics dashboard and reporting
- PDF export and email delivery
- Fork the repo
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit:
git commit -m "feat: add amazing feature" - Push:
git push origin feature/amazing-feature - Open a PR
MIT — see LICENSE.
- https://stellar.org/ — Stellar network
- https://developers.stellar.org/ — Stellar docs and Horizon
- https://nextjs.org/ — React framework
- https://tailwindcss.com/ — utility‑first styling
- https://www.radix-ui.com/ — accessible primitives
Built with ❤️ for freelancers on Stellar