Pay-Per-Use API Billing

Every API call is paid automatically in USDC. Transparent pricing: owner sets the price, platform takes 5%, no hidden fees.

Live Demo — This demo runs on a testnet using test USDC. When you install your own Sertone, it connects to the production blockchain with real USDC.

How Pay-Per-Use Billing Works

Consumer API Caller USDC Balance API Call Sertone Price: $0.001 / call Settlement Split 95% → Owner: $0.00095 5% → Platform: $0.00005 Blockchain (testnet) 95% USDC API Owner Your Revenue $0.00095 / call API Response (encrypted direct) Every call = automatic USDC payment Permanent, auditable, instant payment

Consumer pays per API call in USDC. Sertone splits 95% to the API owner and 5% platform fee, paid automatically.

Why Pay-Per-Use with Sertone?

Traditional API billing is opaque. Monthly invoices arrive with aggregated totals and no per-call breakdown. Disputes are common, audits are painful, and reconciliation takes days. With Sertone, every single API call triggers an automatic USDC payment — fully transparent, permanent, and auditable by both parties.

API owners set their own price per call. There is one commission: 5% to the platform. No hidden fees, no payment processing surcharges, no minimum commitments. A $0.001 API call costs the consumer exactly $0.001. The owner receives $0.00095. The math is the same whether you process 100 calls or 10 million.

For consumers, this means no surprise bills and no prepaid credits that expire. You pay for exactly what you use, when you use it. For owners, revenue is settled instantly — no 30-day payment terms, no chargebacks, no invoicing overhead. USDC arrives in your wallet after every call.

Live Demo: Pay-Per-Use Settlement

API Call Simulator

Make multiple API calls and watch the running balance. Each call shows exact price, commission, and owner revenue with USDC settlement.

Configure the number of calls and click "Run API Calls" to see exact USDC settlement math per call with running balance.

Code Samples

# Each API call automatically triggers USDC settlement.
# No separate billing API — payment is built into every call.

curl -X POST https://localhost:3000/internal/call \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_CONSUMER_SECRET" \
  -d '{
    "api_id_public": "bb-sse-ticker",
    "method": "GET",
    "path": "/quote/AAPL"
  }'

# Response includes settlement metadata:
# "settlement": {
#   "price_usdc": "0.001000",
#   "commission_usdc": "0.000050",
#   "owner_revenue_usdc": "0.000950",
#   "tx_hash": "0xabc123...",
#   "chain": "base-sepolia"
# }
// Every API call includes settlement data in the response.
// No separate billing step — pay-per-use is automatic.

const response = await fetch('https://localhost:3000/internal/call', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_CONSUMER_SECRET'
  },
  body: JSON.stringify({
    api_id_public: 'bb-sse-ticker',
    method: 'GET',
    path: '/quote/AAPL'
  })
});

const { data } = await response.json();
console.log('Result:', data.result);
console.log('Price:', data.result?.settlement?.price_usdc, 'USDC');
console.log('Owner gets:', data.result?.settlement?.owner_revenue_usdc, 'USDC');
import requests

response = requests.post(
    "https://localhost:3000/internal/call",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_CONSUMER_SECRET",
    },
    json={
        "api_id_public": "bb-sse-ticker",
        "method": "GET",
        "path": "/quote/AAPL",
    },
)

result = response.json()
data = result.get("data", {}).get("result", {})
settlement = data.get("settlement", {})
print(f"Price: {settlement.get('price_usdc')} USDC")
print(f"Owner revenue: {settlement.get('owner_revenue_usdc')} USDC")
print(f"Commission: {settlement.get('commission_usdc')} USDC (5%)")
print(f"TX hash: {settlement.get('tx_hash')}")

Self-Host with Pay-Per-Use Billing

1

Run the Docker Container

Pull and run the free Sertone wrapper on your own infrastructure. One command sets everything up.

docker run -d --name sertone \
  -p 3000-3003:3000-3003 -p 3005-3006:3005-3006 \
  -v sertone-data:/app/data \
  sertone/wrapper:latest
2

Open the Web Console

Navigate to https://localhost:3002/panel to access your Sertone control center. Create your account and connect your wallet on first launch.

3

Browse the Catalog

Click Catalog & SDKs in the sidebar. Search for APIs, try them in demo mode (free), then switch to production when ready.

4

Make Your First Call

Copy your consumer secret from Settings > Security, then use the code samples above to call any API from your own code.