Pay-Per-Use API Billing

Every API call is settled in USDC on Base L2. Transparent pricing: owner sets the price, platform takes 5%, no hidden fees.

How Pay-Per-Use Settlement Works

Consumer API Caller USDC Balance API Call Opsalis Price: $0.001 / call Settlement Split 95% → Owner: $0.00095 5% → Platform: $0.00005 Base Sepolia L2 (Chain 84532) 95% USDC API Owner Your Revenue $0.00095 / call API Response (encrypted P2P) Every call = 1 USDC transaction on Base L2 Immutable, auditable, instant settlement

Consumer pays per API call in USDC. Opsalis splits 95% to the API owner and 5% platform fee, settled on Base L2.

Why Pay-Per-Use on Blockchain?

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 Opsalis, every single API call creates a USDC settlement transaction on Base L2 — fully transparent, immutable, 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://opsalis.com/api/demo/api/bb-sse-ticker \
  -H "Content-Type: application/json" \
  -H "X-Consumer-Key: demo-public-key-2026" \
  -d '{
    "action": "getQuote",
    "symbol": "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('/api/demo/api/bb-sse-ticker', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Consumer-Key': 'demo-public-key-2026'
  },
  body: JSON.stringify({
    action: 'getQuote',
    symbol: 'AAPL'
  })
});

const result = await response.json();
console.log('Price:', result.settlement.price_usdc, 'USDC');
console.log('Owner gets:', result.settlement.owner_revenue_usdc, 'USDC');
console.log('TX:', result.settlement.tx_hash);
import requests

response = requests.post(
    "https://opsalis.com/api/demo/api/bb-sse-ticker",
    headers={
        "Content-Type": "application/json",
        "X-Consumer-Key": "demo-public-key-2026",
    },
    json={
        "action": "getQuote",
        "symbol": "AAPL",
    },
)

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

Self-Host with Pay-Per-Use Billing

1

Install Opsalis

Pull and run the free Docker container on your own infrastructure.

docker pull opsalis/control-center:latest
docker run -d --name opsalis -p 8080:8080 opsalis/control-center:latest
2

Register Your API

Add your API endpoint in the Opsalis control center. Point it at your existing service — no code changes required.

# Register API via control center
{
  "name": "My Stock API",
  "endpoint": "http://localhost:3000/api/quote",
  "protocol": "rest",
  "auth": "none"
}
3

Set Your Price

Define the per-call price in USDC. The platform automatically applies the 5% commission. You receive the remaining 95% instantly.

# Set pricing
{
  "pricing": {
    "model": "pay-per-use",
    "price_per_call_usdc": "0.001",
    "commission_pct": 5,
    "settlement_chain": "base"
  }
}
4

Start Earning

Consumers discover your API in the marketplace, make calls, and USDC settles to your wallet after every call. No invoicing, no payment terms, no chargebacks.