PayLoop is a non-custodial subscription payment protocol for USDC on Stellar, enabling crypto users to pay for recurring services like newsletters, SaaS tools, DAO memberships, and trading signal platforms, directly from their wallet.
Recurring payments are the backbone of the internet economy. Subscriptions power SaaS, media, APIs, and community tools.
- $500B+/year subscription economy
- $300B+ in stablecoins onchain ()
- No permissionless way to connect the two
Yet crypto has never had a reliable, non-custodial subscription primitive. Users are forced to either:
- Trust custodial platforms (centralized, KYC-heavy)
- Use credit cards and fiat rails that exclude the crypto-native population
- Manually send payments on schedule (impractical at scale)
- Use pull-payment hacks with no spending guardrails
For agents specifically, this is a hard stop.
An AI agent that needs to:
- Renew access to a data API
- Pay for a premium tool
- Maintain a DAO membership
cannot do so autonomously without a programmable payment layer underneath it.
π PayLoop fills that gap on Stellar.
Users fund their wallet with Stellar USDC.
They create a Policy defining:
- Merchant address
- Recurring amount
- Billing interval
- Safety cap (maximum spend)
The first charge executes instantly during policy creation, ensuring upfront payment.
From that point forward, the system becomes fully automated:
- The smart contract enforces payment rules on-chain (none can manipulate this)
- The relayer executes recurring charges at each interval
- The indexer tracks all policy and payment state
- The user retains full control, can pause, resume, or revoke anytime
User Wallet (Stellar)
β
Frontend (Next.js)
β
Backend API (Node.js)
β
Relayer + Indexer
β
Soroban Smart Contract
Create Policy
β
Approve USDC
β
First Charge (Instant)
β
Relayer Executes Future Charges
β
Indexer Tracks State
PayLoop enables seamless onboarding for real world use:
Users manually create a policy for any merchant
Merchants generate:
- Payment links
- Embeddable buttons
Flow:
User clicks link
β
Redirect to PayLoop
β
Policy pre-filled
β
Approve USDC
β
Subscribe
π Similar to Stripe Checkout but fully onchain
PayLoop integrates x402, an HTTP-native payment protocol.
π Call API β Pay β Access
Client (user / agent) β API call
β
Server β 402 Payment Required
β
Client creates subscription (policy)
β
Retry request
β
API verifies subscription β returns data
This embeds payments directly into HTTP requests, making APIs natively monetizable.
PayLoop is built for the agent economy.
AI agents can:
- Discover APIs
- Create subscription policies
- Approve payments
- Retry requests
- Continue execution
Fully autonomous. No human interaction required.
This transforms agents from:
π Passive tools β Economic actors
Deployed Contract: CDMMFYL7WBBDW7GDOQQKQKSP2C72H2TZ7DYCY4H6TYTAIFOXXUYJPD5J
/frontend β Next.js App
/backend β Node.js API + Relayer
/contracts β Soroban Smart Contracts
git clone https://github.com/Shadow-Ash/payloop
cd payloop
npm install
npm run dev
cd backend
npm install
npm run dev
PORT=4000
DATABASE_URL=
SOROBAN_RPC=https://soroban-testnet.stellar.org
STELLAR_RPC_URL=
CONTRACT_ID=
RELAYER_SECRET_KEY=
RELAYER_POLL_INTERVAL_MS=15000
RELAYER_BATCH_SIZE=10
RELAYER_LEASE_SECONDS=900
RELAYER_MAX_ATTEMPTS=5
WEBHOOK_SIGNING_SECRET=
NEXT_PUBLIC_BACKEND_URL=
GET /policies?user=ADDRESS
GET /policies/:id
GET /charges/:policy_id
POST /protected
- Connect GitHub repo
- Add environment variables
- Deploy automatically
- Import repo
- Set:
NEXT_PUBLIC_BACKEND_URL
While the core system is live and functional, the roadmap focuses on expanding flexibility, intelligence, and real-world adoption.
Moving beyond fixed subscriptions, PayLoop will support invoice-style payments where merchants can request variable amounts per cycle.
Enabling per-request payments, hybrid subscription + usage models, and dynamic pricing.
- Create paid APIs in minutes
- Define pricing logic
- Monitor usage and revenue
Better dashboards and controls for users and agents.
- Payment patterns
- Agent activity
Expand beyond USDC on Stellar.
Agents can:
- Sell services
- Pay each other
- Form decentralized economies
Agents dynamically select the most cost-efficient services.