Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 Flowlance

Modular payment infrastructure for the Stellar ecosystem β€” recurring payments, split billing, and payment links powered by Soroban smart contracts.

License: MIT Built on Stellar Soroban TypeScript Rust


What is Flowlance?

Flowlance is an open-source, developer-first payment toolkit built on Stellar and Soroban. It gives any application the building blocks to implement:

  • πŸ” Recurring Payments β€” on-chain subscriptions and scheduled transfers
  • βœ‚οΈ Split Payments β€” split bills, salaries, or revenues across multiple wallets
  • πŸ”— Payment Links β€” shareable, one-click USDC payment requests
  • πŸ“Š Dashboard β€” a React/Next.js UI to manage and track all payment flows

Think of it as Stripe-like payment primitives, but fully decentralized on Stellar.


Why Flowlance?

The Stellar ecosystem has excellent infrastructure for transfers and asset issuance, but lacks composable, reusable payment patterns that developers can drop into their apps. Flowlance fills that gap by providing:

  • Smart contracts (Rust/Soroban) for the core payment logic
  • A TypeScript SDK for easy frontend and backend integration
  • An open-source dashboard so any project can self-host their payment management UI

Whether you're building a freelance platform, a payroll system, a subscription SaaS, or a group expense app β€” Flowlance gives you the infrastructure layer you need.


Architecture

flowlance/
β”œβ”€β”€ contracts/                  # Rust / Soroban smart contracts
β”‚   β”œβ”€β”€ recurring/              # Subscription & scheduled payment logic
β”‚   β”œβ”€β”€ split/                  # Multi-recipient payment splitting
β”‚   └── payment-link/           # One-time & reusable payment links
β”‚
β”œβ”€β”€ sdk/                        # TypeScript SDK (npm package)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ recurring.ts        # RecurringPayment client
β”‚   β”‚   β”œβ”€β”€ split.ts            # SplitPayment client
β”‚   β”‚   β”œβ”€β”€ payment-link.ts     # PaymentLink client
β”‚   β”‚   └── index.ts
β”‚   └── package.json
β”‚
β”œβ”€β”€ dashboard/                  # Next.js frontend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ payments/           # Payment history & management
β”‚   β”‚   β”œβ”€β”€ subscriptions/      # Recurring payment management
β”‚   β”‚   └── links/              # Payment link generator
β”‚   └── package.json
β”‚
└── docs/                       # Documentation

Features

πŸ” Recurring Payments

Create on-chain subscriptions where USDC is automatically transferred on a defined schedule (weekly, monthly, etc.). Built with Soroban smart contracts β€” no centralized cron job required.

import { FlowlanceClient } from '@flowlance/sdk';

const client = new FlowlanceClient({ network: 'testnet' });

const subscription = await client.recurring.create({
  recipient: 'GXXXXXXX...',
  amount: '50',         // 50 USDC
  interval: 'monthly',
  startDate: new Date(),
});

βœ‚οΈ Split Payments

Define a list of recipients with percentage or fixed-amount splits. A single transaction distributes funds across all parties atomically.

const split = await client.split.create({
  recipients: [
    { address: 'GAAA...', share: 60 },  // 60%
    { address: 'GBBB...', share: 25 },  // 25%
    { address: 'GCCC...', share: 15 },  // 15%
  ],
  totalAmount: '1000',   // 1000 USDC
  memo: 'Q2 Revenue Split',
});

πŸ”— Payment Links

Generate a shareable URL (or QR code) that pre-fills a Stellar payment. Perfect for invoices, donations, or checkout flows.

const link = await client.paymentLink.create({
  recipient: 'GDDD...',
  amount: '250',
  memo: 'Invoice #1042',
  expiresAt: '2026-06-01',
});

console.log(link.url);  // https://pay.flowlance.xyz/l/abc123

Getting Started

Prerequisites

  • Rust (1.75+) with wasm32-unknown-unknown target
  • Stellar CLI (stellar)
  • Node.js 18+

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/flowlance.git
cd flowlance

2. Build the smart contracts

cd contracts
cargo build --target wasm32-unknown-unknown --release

3. Deploy to Stellar Testnet

stellar contract deploy \
  --wasm target/wasm32-unknown-unknown/release/recurring.wasm \
  --network testnet \
  --source YOUR_SECRET_KEY

4. Install the SDK

cd sdk
npm install
npm run build

5. Run the dashboard

cd dashboard
npm install
npm run dev
# Open http://localhost:3000

SDK Reference

FlowlanceClient

Method Description
recurring.create(params) Create a new recurring payment
recurring.cancel(id) Cancel an active subscription
recurring.list(address) List all subscriptions for an address
split.create(params) Create a split payment
split.execute(id) Execute a pending split
paymentLink.create(params) Generate a payment link
paymentLink.resolve(linkId) Fetch payment link details

Full SDK documentation: docs/sdk.md


Smart Contracts

All contracts are written in Rust and deployed on Stellar's Soroban smart contract platform.

Contract Description Status
recurring Manages subscriptions and scheduled transfers βœ… Implemented
split Handles multi-recipient atomic splits βœ… Implemented
payment-link Stores and validates payment link metadata βœ… Implemented

Contributing

Flowlance is part of the Stellar Wave Program on Drips β€” a monthly open-source contribution cycle where contributors Fix, Merge, and Earn rewards.

How to contribute

  1. Browse open issues tagged for the current Wave
  2. Comment on an issue to apply
  3. Fork the repo, create a branch, and submit a PR
  4. Earn Points that convert to real USDC rewards πŸŽ‰

Good First Issues

Look for issues tagged good first issue β€” these are scoped, well-documented tasks perfect for new contributors.

Development Guidelines

  • All Soroban contracts must include unit tests
  • TypeScript code must pass tsc with no errors
  • PRs must include a brief description of what was changed and why
  • Follow the Stellar Contribution Guide

Roadmap

  • Project scaffold & repo setup
  • RecurringPayment Soroban contract
  • SplitPayment Soroban contract
  • PaymentLink Soroban contract
  • TypeScript SDK v0.1
  • Next.js dashboard v0.1
  • Stellar Testnet deployment scripts
  • SDK npm package publish
  • Mainnet deployment
  • Audit

Network & Tokens

Flowlance uses USDC on the Stellar network as the primary payment token. Testnet deployments use Stellar's Friendbot for funding.

Network Status
Stellar Testnet βœ… Supported
Stellar Mainnet πŸ”œ Coming soon

License

MIT Β© [Your Name] β€” see LICENSE for details.


Links

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages