Metering & Billing

Enterprise only

Meter API requests by Consumerv3.14+

This example enables API request metering and uses the authenticated Kong Gateway Consumer as the billable subject.

The plugin emits one CloudEvent per request to the configured ingest endpoint. Collecting events alone doesn’t produce invoices. To aggregate usage and generate invoices, you need either Konnect Metering & Billing or a self-hosted OpenMeter instance.

For a complete tutorial on this example, see Meter API requests by Consumer with Metering & Billing.

Prerequisites

Environment variables

  • AUTH_TOKEN: A Konnect system account token (spat_) or OpenMeter API key.

Set up the plugin

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!