One API call for any resource. Aforo handles metering, aggregation, and invoicing. Scale to millions of events per second.
const Aforo = require('@aforo/sdk') const aforo = new Aforo ( apiKey: 'sk_live_...' ) await aforo.ingest({ customerId: 'cust_123', metric: 'api_calls', quantity: 1 })
const Aforo = require('@aforo/sdk'); const aforo = new Aforo({ apiKey: 'your-api-key', }); await aforo.ingest({ customerId: 'cust_123', metric: 'api_calls', quantity: 1, properties: { endpoint: '/v1/users' }, idempotencyKey: 'evt_' + Date.now(), });
{ "id": "evt_abc123", "type": "invoice.created", "timestamp": "2026-03-15T14:30:00Z", "data": { "invoiceId": "inv_xyz789", "customerId": "cust_123", "amount": 150.00, "currency": "USD", "status": "draft", "lineItems": [ { "metric": "api_calls", "quantity": 50000, "unitPrice": 0.003, "total": 150.00 } ] } }
Connect with other developers building on Aforo
Contribute to our SDK libraries and tools
Comprehensive guides and API reference
Expert help for Enterprise customers
Join hundreds of companies automating their usage-based billing.