The foundational payment layer for recurring transactions on Stellar.
Soroban Subscription Engine is a decentralized recurring payment protocol built on Soroban within the Stellar ecosystem. It enables developers and businesses to implement automated, trustless subscription and payment systems using smart contracts — bringing automation, transparency, and efficiency to Web3 billing.
Recurring payments are a core part of modern digital services — SaaS, memberships, payroll — but in Web3:
- Payments are mostly manual and require user action every cycle
- There is no native recurring billing standard on-chain
- Users lack control and transparency over what they're charged
- Developers must build custom solutions from scratch every time
This creates friction for both users and builders.
Build a reusable on-chain protocol that:
- Automates recurring payments securely via smart contracts
- Provides flexible, configurable subscription models
- Reduces reliance on centralized billing systems
- Enables developers to easily integrate subscription logic into dApps
- Time-based payment execution (daily, weekly, monthly)
- Configurable billing cycles and amounts
- Multi-token support (any Stellar asset)
- Create, update, pause, or cancel subscriptions on-chain
- User-controlled approvals and permissions
- Transparent, auditable on-chain records
- Scheduled execution via off-chain relayer (cron-like triggers)
- Grace periods and retry mechanisms
- Fail-safe handling for insufficient balances
- Manage subscribers and plans
- Revenue tracking and analytics
- Plan configuration interface
| Layer | Technology |
|---|---|
| Smart Contracts | Rust, Soroban SDK |
| Relayer | Node.js (off-chain executor) |
| Frontend | Next.js 14, React, Tailwind CSS |
| Wallet | Freighter API |
| Network | Stellar Testnet / Mainnet |
Soroban-Subscription-Engine/
├── contracts/
│ ├── src/
│ │ ├── lib.rs # Contract entry point
│ │ ├── subscription.rs # Subscription logic
│ │ ├── billing.rs # Payment execution
│ │ └── types.rs # Shared types & errors
│ └── Cargo.toml
├── relayer/
│ ├── src/
│ │ ├── index.js # Relayer entry point
│ │ ├── executor.js # Payment execution logic
│ │ └── scheduler.js # Cron-based trigger
│ └── package.json
├── frontend/
│ └── src/
│ ├── app/
│ │ ├── page.jsx # Landing page
│ │ ├── dashboard/ # Merchant dashboard
│ │ └── subscribe/ # User subscription page
│ ├── components/
│ └── context/
│ └── WalletContext.jsx
└── README.md
- Rust + Soroban CLI
- Node.js >= 18
- Freighter Wallet
cd contracts
cargo build --target wasm32-unknown-unknown --releasecd relayer
npm install
cp .env.example .env
npm run startcd frontend
npm install
cp .env.example .env.local
npm run devUser approves subscription on-chain
↓
Contract stores: subscriber, merchant, amount, token, interval, next_payment
↓
Relayer polls contracts every N minutes
↓
If next_payment <= current_ledger → execute payment
↓
Contract transfers tokens from subscriber to merchant
↓
Updates next_payment = current + interval
↓
(if balance insufficient) → grace period → retry → cancel
- SaaS subscription billing
- Membership platforms
- Payroll and recurring payouts
- API usage billing
- Content creator monetization
- SaaS platforms and subscription-based businesses
- Web3 developers building dApps
- DAOs managing recurring payments
- Freelancers and service providers
- Fully automated, trustless recurring payments
- Reduced operational overhead for businesses
- Transparent and user-controlled billing
- Composable infrastructure for other dApps
- Soroban subscription smart contract
- Off-chain relayer for payment execution
- Merchant & user dashboard (Next.js)
- Freighter wallet integration
- Token streaming (real-time payments)
- Multi-party subscriptions (split payments)
- Cross-chain subscription support
- SDK for easy developer integration
- Integration with identity/reputation systems
Pull requests are welcome. Open an issue first for major changes.
MIT