Pricing & Costs
Understanding who pays what in the x402 escrow system.
Cost Summary
| Party | What They Pay |
|---|
| User (Payer) | USDC deposit only (no gas needed) |
| API Provider | Nothing - fees sponsored |
| Agentokratia | Gas + 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.
| Cost | Who Pays |
|---|
| Platform fee | Sponsored (normally would be a % of transactions) |
| Gas costs | Sponsored (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
| Type | Minimum |
|---|
| 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.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
- User creates session with $10 deposit
- Your API charges $0.05 per request
- User makes 50 requests = $2.50 charged
- Facilitator captures $2.50 to your wallet
- User reclaims remaining $7.50
When Do I Get Paid?
The facilitator batches captures for gas efficiency:
| Trigger | Action |
|---|
| Pending > $1 | Batch capture (hourly cron) |
| Session expiry < 2h | Immediate capture |
| User reclaims | Capture 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:
| Operation | Approximate Gas | Approximate 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
| Scheme | Gas per Request | Best For |
|---|
| Exact | ~65k gas ($0.005-0.02) | Single high-value calls |
| Escrow | 0 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
Recommended Pricing
| API Type | Suggested Price |
|---|
| Simple query | 0.001−0.01 |
| AI inference (small) | 0.01−0.05 |
| AI inference (large) | 0.05−0.50 |
| Data export | 0.10−1.00 |
| Premium feature | $1.00+ |
// 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?