Built for the Edge. Orchestrated by You.
Deep integrations for Kong, Apigee, and MuleSoft. Entitlement checks are cached and fail open, so your API keeps serving. Start monetizing your infrastructure without a rewrite.
Gateway plugins, multi-language SDKs, and a complete API for metering and entitlements. Your engineers connect once and never write billing code again.
Billing is infrastructure, not product.
Treat it accordingly.
Your engineering team should be building the features your customers pay for, not maintaining the infrastructure that charges them. Aforo handles metering, aggregation, rating, invoicing, and payment recovery so your team never writes billing code again.
Zero-Code Gateway Integrations
Plug Aforo into Kong, AWS API Gateway, Apigee, Azure APIM, or MuleSoft at the infrastructure layer. Billing logic lives entirely outside your application codebase, no SDK imports, no decorator patterns, no middleware chains. Your API code stays clean. Metering happens at the network edge, invisible to your application engineers.
Enterprise-Grade Safety Nets
The hard distributed-systems problems are already solved. Idempotency keys prevent double-billing across retries and replays. Timestamp validation handles clock skew (rejects >5-minute drift, flags >24-hour late arrivals). Dead-letter queues capture every failed event for replay, nothing is silently dropped. Your CTO does not need to staff a billing reliability team.
Pre-Production Testing Sandbox
Engineers simulate millions of usage events against the full billing pipeline before touching production data. The sandbox executes all 10 pipeline stages, quota, aggregation, rating, discounts, tax, settlement, with deterministic results. Validate that every pricing model, every contract term, and every edge case produces the correct invoice. Ship with confidence, not hope.
An architecture win, not a code dependency
Billing logic stays outside your application boundary. Engineering connects the pipe. Aforo runs the pipeline. Business teams control the configuration.
Connect the Infrastructure
Gateway plugins or SDK, your choice
Deploy a gateway plugin (zero application changes) or add an SDK decorator (5-15 lines). Usage events flow from your API traffic into Aforo's metering pipeline. Your application code has no knowledge of billing. The integration is at the infrastructure layer, not the application layer.
Aforo Handles the Hard Math
Validation → Enrichment → Aggregation → Rating
The metering engine validates timestamps, deduplicates events, and enriches each one with customer and pricing context. The billing engine then executes a 10-stage pipeline: quota checks, rollover credits, aggregation, rating across 8 pricing models, contract enforcement, discounts, tax, routing, and settlement. All deterministic. All auditable.
Test Before You Ship
Sandbox environment with production-parity pipeline
Before going live, engineers run the full billing pipeline against simulated usage events in the sandbox. Test every pricing model. Verify every edge case, clock skew, duplicate events, late arrivals, overage caps. The sandbox runs the same 10-stage pipeline as production, with the same validation rules and the same rating logic.
Hand Control to Product and Finance
Business teams manage pricing, engineers maintain zero billing code
Once connected, product managers configure pricing models, rate plans, and customer contracts through the admin UI. Finance reviews invoices, reconciliation reports, and revenue dashboards. Engineering's involvement drops to zero. New pricing models, new product launches, new contract structures, none of them require engineering tickets.
The integration surface, in detail
Five gateway plugins. Four SDK languages. One sandbox. Zero billing code in your application.
Zero Performance Tax.
Local Edge Cache
Entitlements and margin policies stored in Redis at the gateway layer. Every access decision resolves locally in under 5ms, no round-trip to a central server.
Asynchronous Metering
Usage ingestion is fire-and-forget. Events are buffered and flushed asynchronously so metering never blocks the API response. Your P99 latency stays untouched.
Global Resilience
Multi-region failover for the ingestion pipeline and entitlement cache. If one region degrades, traffic fails over automatically. Zero single points of failure.
Two Calls. Full Monetization.
Check a customer's quota before serving. Meter usage after serving. Both are HTTPS calls authenticated with your API key.
const res = await fetch('https://api.aforo.ai/api/v1/quota/check', {
method: 'POST',
headers: {
'X-API-Key': process.env.AFORO_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({ customerId: 'cust_abc123', metricName: 'api_calls', estimatedQuantity: 1 }),
signal: AbortSignal.timeout(250),
}).catch(() => null); // Aforo unreachable: serve the request
const check = res?.ok ? (await res.json()).data : null;
if (check?.decision === 'DENY') return reply.code(429).send(check.reason);
// check: { decision: 'ALLOW', reason: 'Passed', currentUsage: 950, limit: 1000 }The decision is ALLOW, WARN or DENY. If the call errors or times out, serve the request: the check is built to fail open. The gateway plugins make this call for you. To gate a named feature instead of a metric, call GET /api/v1/entitlements/check?customerId=…&feature=…, documented in the API reference.
await aforo.track({
customerId: 'cust_abc123',
metricName: 'api_calls',
quantity: 1,
metadata: { endpoint: '/v2/search', model: 'gpt-4o' },
});Built for teams that refuse to maintain billing code
Different roles, same outcome: billing infrastructure off your team's plate.
Engineering sprints recovered per year
Lines of billing code in your application
Gateway plugins, zero-code metering
Gateway integration to first metered event
Your engineers have better things
to build than billing infrastructure.
Connect at the gateway layer. Test in the sandbox. Hand pricing control to the product team. Your engineering backlog just got 20 sprints lighter.