This getting-started guide shows how you can meter Kong Gateway API requests and invoice your customers based on their API consumption with Metering & Billing in Konnect.
In this guide, you’ll:
- Create a Kong Gateway Consumer that you’ll map as a customer
- Set up a meter for Kong Gateway API requests
- Create a premium plan based on API usage
- Start subscriptions for a customer
- Generate an invoice for a customer on the paid premium plan and see their API usage
The following diagram shows how Kong Gateway entities and Metering & Billing entities are associated:
flowchart TB
subgraph gateway["Kong Gateway"]
direction LR
service["example-service"]
route["example-route"]
consumer1["Consumer-Kong Air"]
end
subgraph metering["Konnect Metering & Billing"]
direction LR
meter["Meter"]
subgraph plan["Premium Plan"]
direction LR
feature2["Feature (example-service)"]
rate-card2["Rate card"]
end
subgraph subscription["Premium Subscription"]
direction LR
customer1["Customer (Kong Air)"]
end
end
gateway --> metering
service --> meter
meter --> feature2
consumer1 --> customer1
subscription --> plan