Features & Architecture
PayGate is built from the ground up for trustless, autonomous API monetization. Here is an in-depth look at the core technical features.
Zero-Config Paywalls
Turn any backend URL into a monetized API in seconds — no SDK installation required on your backend. PayGate acts as a secure reverse proxy:
- You register your hidden backend URL in the PayGate dashboard.
- PayGate gives you a public proxy URL (e.g.,
https://paygate.app/api/x/your-slug). - Callers hit the proxy URL. PayGate intercepts, verifies payment, then forwards the clean request to your backend.
- Your backend never needs to know about payments — it just serves data as normal.
Passwordless Auth via SEP-10
PayGate uses SEP-10, the official Stellar ecosystem standard for authentication. There are no passwords or OAuth tokens. Developers log in by cryptographically signing a time-bounded challenge transaction using their Stellar wallet (Freighter, LOBSTR, xBull, etc.).
This means:
- No password databases — credentials cannot be stolen from PayGate servers.
- Wallet-native UX — login works with any Stellar wallet via the Wallet Kit.
- Automatic session expiry — challenge transactions are short-lived and cannot be replayed.
Soroban Smart Contracts
PayGate uses three Soroban (Stellar's smart contract platform) contracts to ensure decentralized, trustless operation. None of these contracts can be altered by the PayGate team after deployment.
- PayGate Router: Receives every API payment and automatically splits it —
90%to the API developer's wallet and10%to the protocol treasury — in a single atomic on-chain transaction. - PayGate Reputation: Developers must stake
1 USDCvia thestake_apifunction to list in the public marketplace, creating a financial deterrent against spam. - Receipt Verifier: Logs every successful payment verification immutably on-chain. Provides an auditable proof-of-payment trail.
All three contracts emit Soroban RPC events (staked, voted, payment_verified) which are consumed by the PayGate backend event indexer to keep the frontend in sync with blockchain state without polling.
Dynamic DEX Pricing
PayGate integrates with the Stellar Decentralized Exchange (DEX) and AMM liquidity pools to fetch real-time conversion rates. This allows agents to pay with any Stellar asset they hold (XLM, USDC, etc.), while developers always receive stable USDC.
Real-Time Analytics Dashboard
The developer dashboard provides a live feed of API calls and earnings, powered by:
- Upstash Redis — for a real-time per-API call counter with sub-millisecond latency.
- Soroban Event Indexer — a background service that listens for on-chain contract events and syncs them to the database.
- Neon Postgres — the persistent store for API definitions, earnings history, and developer accounts.
API Rate Limiting
Every PayGate proxy endpoint is automatically protected by Upstash's sliding-window rate limiter. Requests that pass payment verification are still subject to configurable per-IP rate limits, preventing abuse.