Recurring payments on Stellar with bounded, revocable authorizations.
This repository contains:
- REST API — Rust/Axum service that indexes subscription activity from Stellar
- Documentation Site — Next.js/MDX comprehensive platform documentation
- Contracts: stellar-subscriptions-contracts — Soroban smart contracts
- Web App: stellar-subscriptions-web — Frontend dApp for users
cd api
cargo build --release
cargo runAPI runs on http://localhost:3001
cd docs
npm install
npm run devDocs site runs on http://localhost:3000
Visit stellar-subscriptions.io/docs or run locally with npm run dev in the docs/ folder.
Key pages:
- Authorization Model — How bounded authorizations work
- Security Model — What merchants can and cannot do
- API Reference — REST API endpoints
- Integration Guide — Building on the platform
The API polls Horizon every 10 seconds for new transactions, parses contract events, and maintains an in-memory index of:
- Plans (name, merchant, amount, interval, status)
- Subscriptions (cap, charged amount, status, next charge ledger)
- Platform statistics (total plans, subscriptions, charged volume)
Tech Stack:
- Rust 1.75+
- Axum web framework
- Tokio async runtime
- Reqwest for Horizon API calls
- Serde for JSON serialization
Endpoints:
GET /plans— All active plansGET /plans/:id— Plan detailsGET /subscriptions— All subscriptionsGET /subscriptions/:id— Subscription details with next charge infoGET /merchants/:address/plans— Plans by merchantGET /merchants/:address/subscriptions— Subscribers to a merchantGET /stats— Platform statistics
Next.js 14 app with:
- MDX for content-rich documentation
- Tailwind CSS for styling
- Custom components (CalloutBox, CodeBlock, ApiEndpoint)
- Sidebar navigation
- Dark mode support
cd api
cargo watch -x run # auto-reload on changes
cargo test # run tests
cargo clippy # lintingcd docs
npm run dev # dev server with hot reload
npm run build # production build
npm run lint # ESLintcd api
cargo test --allcd docs
npm run build # ensures all MDX compiles- ✅ API: Fully implemented, all endpoints functional
- ✅ Docs: Complete documentation for all concepts, contracts, and API
⚠️ Testnet only (mainnet contracts not yet deployed)⚠️ Unaudited (professional audit planned before mainnet)
Important: Contributors should focus on documentation improvements only. The api/ folder is maintainer-managed, and PRs touching API code will be closed.
See CONTRIBUTING.md for guidelines on:
- Improving documentation clarity
- Adding code examples
- Fixing typos and formatting
- Translating docs (future)
MIT License - see LICENSE for details
For security concerns, please email security@stellar-subscriptions.io. Do not open public issues for vulnerabilities.
- Discord: stellar-subscriptions.io/discord
- Issues: GitHub Issues
- Docs: stellar-subscriptions.io/docs
Built with:
Made with ❤️ for the Stellar ecosystem