Automated, trustless collaborative payment distribution powered by Stellar and Soroban smart contracts.
GitHub Organisation: github.com/Splitpayx
| Repository | Description |
|---|---|
| splitpay-web ← this repo | Primary web application (Next.js) |
| splitpay-contract | Soroban smart contract — on-chain pool & distribution logic |
| splitpay-mobile | React Native mobile application |
| splitpay-sdk | Shared client SDK |
SplitPay is a non-custodial decentralized application (dApp) built on Stellar that enables automated, mathematically verified split payments among collaborators, agencies, DAOs, and freelancers.
Unlike traditional platforms relying on centralized payment processors or custodial escrow accounts, SplitPay uses Soroban smart contracts as the sole financial and organizational authority. Incoming funds are atomically transferred and distributed to verified recipient addresses in a single blockchain transaction.
- Decentralized Pools: Create and manage customizable payment pools with multi-party splits verified on-chain.
-
Strict Basis Points (BPS) Accounting: All member allocations are specified in basis points (
$10,000\text{ BPS} = 100.00%$ ). The smart contract strictly enforces that the sum of shares must equal exactly 10,000 BPS before any pool can be deployed or updated. -
Deterministic Remainder Policy: For odd amounts where integer division leaves remainder stroops, SplitPay applies an exact zero-loss policy—assigning remainder units to the primary pool recipient (index
0). - Non-Custodial Wallet Integration: Native support for Freighter Wallet browser extension alongside instant Testnet Dev Keypairs with on-demand Friendbot funding.
-
Atomic Two-Step Settlement Engine: Payments are recorded on-chain (
create_payment) and atomically executed (settle_payment) with real-time transaction lifecycle tracking modals. - Stellar Asset Contract (SAC) Support: Configurable with native XLM SAC or any custom SAC token contract on Stellar Testnet.
- Production-Grade Next.js Architecture: Single full-stack Next.js application utilizing the App Router, Tailwind CSS, Lucide icons, and zero legacy backend dependencies.
SplitPay Web App (Next.js 16 App Router)
├── /dashboard - Overview of pools, activity, and Stellar balance
├── /pools - List, search, and monitor active pools
│ ├── /new - Interactive pool creator with live 10,000 BPS validator
│ ├── /[id] - Detailed pool inspect with on-chain shares & explorer links
│ └── /[id]/settings - Admin pool controls (add/remove member, shares, status)
├── /payments - Historical transaction logs & distribution records
│ ├── /new - Payment initiator with live split preview calculator
│ └── /[id] - Immutable settlement details & per-member receipt
├── /wallet - Balance inspector, key export, and Friendbot funding
└── /settings - RPC endpoints, network configuration, and contract targets
Blockchain Integration Layer
├── lib/stellar/rpc.ts - Horizon RPC queries & Soroban transaction polling
├── lib/contract/splitpay.ts- Typed client for all 13 Soroban smart contract methods
├── lib/wallet/ - WalletContext with Freighter & Dev Keypair signing
└── lib/validation/ - 10,000 BPS integrity rules & Stellar address validators
SplitPay connects to an immutable Soroban smart contract deployed on the Stellar Testnet:
| Parameter | Value |
|---|---|
| Network | Stellar Testnet |
| RPC Endpoint | https://soroban-testnet.stellar.org |
| Horizon RPC | https://horizon-testnet.stellar.org |
| Contract ID | CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC |
| Native XLM SAC | CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC |
| Network Passphrase | Test SDF Network ; September 2015 |
create_pool(owner, asset, members)get_pool(pool_id)get_pool_members(pool_id)add_member(owner, pool_id, member, share_bps)remove_member(owner, pool_id, member)update_member_share(owner, pool_id, member, new_share_bps)set_pool_status(owner, pool_id, status)create_payment(payer, pool_id, amount)settle_payment(caller, payment_id)get_payment(payment_id)get_distributions(payment_id)get_payment_count()get_pool_count()
- Node.js v18.18 or higher (v20+ recommended)
- npm or pnpm
- Freighter Wallet extension (optional, dev keypairs supported out of the box)
-
Clone the repository:
git clone https://github.com/Splitpayx/splitpay-web.git cd splitpay-web -
Install dependencies:
npm install
-
Configure environment variables: Create a
.env.localfile in the root directory:NEXT_PUBLIC_STELLAR_NETWORK=TESTNET NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org NEXT_PUBLIC_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org NEXT_PUBLIC_SPLITPAY_CONTRACT_ID=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC NEXT_PUBLIC_NATIVE_ASSET_CONTRACT=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
-
Start the local development server:
npm run dev
Open http://localhost:3000 in your browser.
The suite includes unit tests for the 10,000 basis points rule, integer division remainder policies, and address formatting:
# Run unit tests via Vitest
npm test
# Run Next.js production build
npm run build- Framework: Next.js 16 (App Router, Turbopack)
- Language: TypeScript 5
- Styling: Tailwind CSS v4
- Icons: Lucide React
- Blockchain SDK: @stellar/stellar-sdk
- Wallet Provider: @stellar/freighter-api
- Unit Testing: Vitest
- SAMKIEL — @samkiell | hello@samkiel.dev
This project is licensed under the MIT License — see the LICENSE file for details.