Skip to main content

Pricing & Costs

Understanding who pays what in the x402 escrow system.

Cost Summary

PartyWhat They Pay
User (Payer)USDC deposit only (no gas needed)
API ProviderNothing - fees sponsored
AgentokratiaGas + platform fees (sponsored)
Zero cost to get started. All fees are currently sponsored by Agentokratia.

Facilitator Fee

Fees are currently sponsored by Agentokratia. We cover all gas costs and charge no platform fee. This allows you to focus on building without worrying about costs.
CostWho Pays
Platform feeSponsored (normally would be a % of transactions)
Gas costsSponsored (session creation, captures, voids)
We’ll keep you updated on any changes.

User Costs

Users pay only their USDC deposit. No gas required.

Example

User deposits: $10.00 USDC
User spends:   $3.50 on API calls
User reclaims: $6.50 (100% of unused funds)
The user’s wallet never pays gas because x402 uses ERC-3009 signatures (gasless approvals).

Minimum Amounts

TypeMinimum
Session deposit$0.01 USDC
Per-request charge$0.0001 USDC (1/100th of a cent)
While technically you can charge fractions of a cent, consider user experience. Most APIs charge 0.0010.001 - 0.10 per call.

API Provider Revenue

As an API provider, you receive:
Your Revenue = Sum of all charges to user sessions

Revenue Flow

  1. User creates session with $10 deposit
  2. Your API charges $0.05 per request
  3. User makes 50 requests = $2.50 charged
  4. Facilitator captures $2.50 to your wallet
  5. User reclaims remaining $7.50

When Do I Get Paid?

The facilitator batches captures for gas efficiency:
TriggerAction
Pending > $1Batch capture (hourly cron)
Session expiry < 2hImmediate capture
User reclaimsCapture pending, then void
You’ll typically see funds within 1-2 hours of charges accumulating.

Gas Costs (Paid by Facilitator)

For transparency, here’s what operations cost on Base:
OperationApproximate GasApproximate Cost
Session creation~150k gas~$0.01-0.05
Batch capture~80k gas per session~$0.005-0.02
Session void (reclaim)~100k gas~$0.01-0.03
These costs are covered by the facilitator, not you or your users.

Escrow vs Exact: Cost Comparison

SchemeGas per RequestBest For
Exact~65k gas ($0.005-0.02)Single high-value calls
Escrow0 gas (off-chain)High-frequency, low-value calls

Break-even Analysis

If each request costs the facilitator ~$0.01 in gas:
  • 1 request: Exact is fine
  • 10+ requests: Escrow saves money
  • 100+ requests: Escrow saves significant money

Setting Your Prices

API TypeSuggested Price
Simple query0.0010.001 - 0.01
AI inference (small)0.010.01 - 0.05
AI inference (large)0.050.05 - 0.50
Data export0.100.10 - 1.00
Premium feature$1.00+

Price Format Examples

// Human-readable (recommended)
price: '$0.01'      // 1 cent
price: '$0.001'     // 0.1 cents
price: '$1.50'      // $1.50

// Atomic units (6 decimals for USDC)
price: '10000'      // $0.01
price: '1000'       // $0.001
price: '1500000'    // $1.50

Free Tier Strategy

Want to offer free requests before charging?
app.use(paymentMiddleware({
  'GET /api/query': {
    accepts: {
      scheme: 'escrow',
      price: '$0.01',
      network: 'eip155:8453',
      payTo: process.env.PAYMENT_ADDRESS!,
    },
    // Add your own middleware to check free tier
  },
}, x402));

// Before the payment middleware
app.use('/api/query', (req, res, next) => {
  const user = getUser(req);
  if (user.freeRequestsRemaining > 0) {
    user.freeRequestsRemaining--;
    return yourHandler(req, res);
  }
  next(); // Proceed to payment
});

Tax Considerations

This is not tax advice. Consult a tax professional.
Revenue from x402 payments is likely taxable income. Keep records of:
  • Total USDC received
  • USD value at time of receipt
  • Associated costs
The facilitator provides transaction history in the dashboard.

Questions?