Developer Setup

Ready to monetize your API? Follow these steps to register your endpoint on PayGate and start earning USDC per API call.

Prerequisites

  • A Stellar wallet — Freighter, LOBSTR, or xBull (browser extension).
  • Your wallet must be funded with XLM on the Stellar Testnet. Get free testnet XLM from Friendbot.
  • A publicly accessible backend API URL to monetize.

Step 1 — Connect Your Wallet

Navigate to the Login page and connect your Stellar wallet. PayGate uses SEP-10 authentication — you will be prompted to sign a challenge transaction. This proves you own the wallet without ever exposing your private keys.

Step 2 — Register Your API

In your developer dashboard, click “New API”. Fill in the following fields:

  • Name — How your API will appear in the Marketplace (e.g., Real-time Weather API).
  • Slug — A unique URL-safe identifier (e.g., weather-london). This becomes your proxy path.
  • Description — A clear description of what your API returns.
  • Target URL — Your hidden backend URL (e.g., https://api.openweathermap.org/data/2.5/weather?q=London). This is never exposed publicly.
  • Price per Call — The cost in USDC (e.g., 0.001).

Step 3 — Get Your Proxy URL

Once created, PayGate generates a public proxy URL for your API:

https://paygate-stellar-swart.vercel.app/api/x/<your-slug>

Share this URL with your users or AI agents. All payments, routing, and on-chain settlement happen automatically through this endpoint.

Step 4 — Stake to List in the Marketplace

To get your API publicly listed in the Marketplace so other developers and agents can discover it, you must stake 1 USDC into the PayGate Reputation contract.

Navigate to your API details page and click “Stake to Publish”. Your wallet will prompt you to approve the Soroban smart contract invocation. This is a one-time stake that signals quality and prevents spam.

Step 5 — Monitor Earnings

Your dashboard provides real-time analytics for every API you own:

  • Total calls received and earnings in USDC.
  • A live feed of recent API hits.
  • An “Auto-Settled” badge linking directly to your on-chain transaction history on Stellar Expert, verifying that funds have been settled to your wallet.