DEVELOPER PLATFORM · REST API + SDKS

Meter Any Resource. Skip the Billing Logic.

One API call for any resource. Aforo handles metering, aggregation, and invoicing. Scale to millions of events per second.

P99 Latency
< 8ms
Capture Rate
99.99%
Throughput
2.4M/s
quickstart.js
const Aforo = require('@aforo/sdk')
const aforo = new Aforo
  (
  apiKey: 'sk_live_...'
  )

await aforo.ingest({
  customerId: 'cust_123',
  metric: 'api_calls',
  quantity: 1
})
4ms · event recorded
01
Install SDK
02
Set API Key
03
Ingest Event
04
Define Pricing
05
Invoice fires

Get Started in Minutes

1
Create Product
Define what you want to meter
2
Ingest Events
Send usage data via API
3
Attach Rate Plan
Set your pricing model
4
Watch Invoices
Automated billing on schedule
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(),
});
200 events processed

Integration Library

API Gateways
AI Providers
Payments & Finance

Developer Tools

REST API

  • Type-safe endpoints
  • Automatic retries
  • Rate limiting headers

Webhooks

  • Real-time events
  • Signature verification
  • Retry policy

Embeddable Widgets

  • Usage charts
  • Billing preview
  • Custom branding

SDKs

  • JS/TS, Python, Go
  • Type definitions
  • Full API coverage

REST API Reference

POST
/v1/events
Ingest usage event
GET
/v1/customers
List customers
GET
/v1/metrics
List metrics
PUT
/v1/customers/{id}
Update customer
POST
/v1/rate-cards
Create rate card
GET
/v1/invoices/{id}
Get invoice
POST
/v1/invoices
Create invoice
DELETE
/v1/webhooks/{id}
Delete webhook
Webhook Event Example: invoice.created
{
  "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
      }
    ]
  }
}

Meter your first resource today.

Join hundreds of companies automating their usage-based billing.