feat(metering): Get Started guide#3504
feat(metering): Get Started guide#3504cloudjumpercat merged 12 commits intorelease/konnect-metering-and-billingfrom
Conversation
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
| {% endentity_examples %} | ||
| <!--vale on--> | ||
|
|
||
| ## Enable rate limiting |
There was a problem hiding this comment.
This is not needed. Metering & Billing doesn't integrate with Gateway rate limiter
| {% endentity_examples %} | ||
| <!--vale on--> | ||
|
|
||
| ## Configure ACL plugin |
There was a problem hiding this comment.
This is not needed. Metering & Billing doesn't integrate with Gateway ACL
|
|
||
| Creating plans for our feature. | ||
|
|
||
| 1. In the {{site.konnect_short_name}} sidebar, click **Metering & Billing**. |
There was a problem hiding this comment.
Can we use nested list to separate bigger tasks?
If not, I think we should split this into three sections:
- Create Plan
- Add Rate Card
- Publish Plan
| 1. In the **Include usage from** dropdown, select "kong-air". | ||
| 1. Click **Save**. | ||
| 1. Click the **Subscriptions** tab. | ||
| 1. Click **Create a Subscription**. |
There was a problem hiding this comment.
This should be a separate section: "Start Subscription"
|
|
||
| You can run the following command to test the that the Kong Travel Consumer is invoiced correctly: | ||
|
|
||
| <!--vale off--> |
There was a problem hiding this comment.
We don't need rate limit section
| @@ -0,0 +1,253 @@ | |||
| --- | |||
| title: Get started with Metering and Billing in {{site.konnect_short_name}} | |||
There was a problem hiding this comment.
This is get started if you use Kong API Gateway.
How can we have a separate docs for GW and Generic metering?
|
|
||
| ## Create a Consumer | ||
|
|
||
| Create the two consumers, one for the free and one for premium. These will be mapped to our customers/subjects later on |
There was a problem hiding this comment.
"one for the free and one for premium"
as it's not relevant here maybe instead say something like:
Create two consumers. Later, we will assign them a Free or Premium plan.
| ^ ChatGPT recommended this to fix my ACL error, tested and it seems to work. | ||
|
|
||
| ## Create a meter | ||
|
|
There was a problem hiding this comment.
Should we explain why? Like:
"To meter API request traffic from our consumers we will create a meter:"
| 1. Click **Next**. | ||
| 1. From the **Pricing model** dropdown menu, select "Free". | ||
| 1. Click **Next**. | ||
| 1. From the **Entitlements** dropdown, select "Metered". |
There was a problem hiding this comment.
Setting up entitlement is optional. Not sure if we should include in getting started.
Wdyt?
There was a problem hiding this comment.
Also today M&B will track entitlement balance but won't enforce it in Gateway yet. It's coming in Q2. Maybe call it out as an info box here.
| 1. Click **Publish Plan**. | ||
|
|
||
| ## Map Consumers to customers | ||
|
|
There was a problem hiding this comment.
We should explain what a customer is briefly like
"Customers are the entities who pay for the consumption. In many cases, it's equal to your Consumer. Here we are going to create a Customer and map our Consumer to it."
| url: /plugins/ | ||
| automated_tests: false | ||
| --- | ||
|
|
There was a problem hiding this comment.
Should we add an intro like:
"This getting-started guide shows how you can meter Kong API requests and invoice your customers after their API consumption."
|
|
||
| ## Enable authentication | ||
|
|
||
| Authentication lets you identify a Consumer so that you can apply rate limiting. |
There was a problem hiding this comment.
Authentication lets you identify a Consumer so that you can apply rate limiting. =>
Authentication lets you identify a Consumer so you can invoice Customers after their consumption.
| 1. In the Metering & Billing sidebar, click **Product Catalog**. | ||
| 1. Click the **Plans** tab. | ||
| 1. Click **Create Plan**. | ||
| 1. In the **Name** field, enter `Free`. |
There was a problem hiding this comment.
Main use-case should be paid, setup a usage-based price. Otherwise we won't have invoice.
| 1. Click **Add Rate Card**. | ||
| 1. From the **Feature** dropdown menu, select "example-service". | ||
| 1. Click **Next**. | ||
| 1. From the **Pricing model** dropdown menu, select "Package". |
There was a problem hiding this comment.
IMHO selecting "Usage Based" would be simpler and more suitable for getting started.
| 1. Click **Create Subscription**. | ||
| 1. Navigate back to **Customers** in the breadcrumbs. | ||
| 1. Click **Create Customer**. | ||
| 1. In the **Name** field, enter `Kong Travel`. |
There was a problem hiding this comment.
Do we need to setup two Customers? One is not enough?
| 1. From the **Value** dropdown menu, select "example-service". | ||
| 1. Click **Save**. | ||
|
|
||
| ## Create a plan |
There was a problem hiding this comment.
We setup two plans here, if we want to keep both let's split into two sections:
- Setup a Free Plan
- Setup a Paid Plan
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com>
| This getting-started guide shows how you can meter {{site.base_gateway}} API requests and invoice your customers based on their API consumption with Metering & Billing in {{site.konnect_short_name}}. | ||
|
|
||
| In this guide, you'll: | ||
| * Create a Consumer that you'll map as a customer |
There was a problem hiding this comment.
Create a Consumer that you'll map as a customer
Create a Gateway Consumer that you'll map as Metering & Billing Customer
| * Create a premium plan based on API usage | ||
| * Start subscriptions for a customer | ||
| * Collect an invoice for a customer on the paid premium plan and see their API usage | ||
|
|
There was a problem hiding this comment.
Collect => Generate
(as we don't collect revenue, that's the payment gateway)
| {% endmermaid %} | ||
|
|
||
|
|
||
| ## Create a Consumer |
There was a problem hiding this comment.
Create a Consumer
Create a Gateway Consumer
|
|
||
| ## Create a Consumer | ||
|
|
||
| Before you configure metering and billing, you can set up a Consumer, Kong Air. [Consumers](/gateway/entities/consumer/) let you identify the client that's interacting with {{site.base_gateway}}. Later in this guide, you'll be mapping this Consumer to a customer in Metering & Billing and assigning them to a Premium plan. Doing this allows you map existing Consumers that are already consuming your APIs to customers to make them billable. |
There was a problem hiding this comment.
you'll be mapping this Consumer to a customer in Metering & Billing
you'll be mapping this Gateway Consumer to a Metering & Billing Customer
|
|
||
| ## Enable authentication | ||
|
|
||
| Authentication lets you identify a Consumer so you can invoice them as customers after they've consumed the resource, in this case, the API request. |
There was a problem hiding this comment.
We should write OpenMeter entities capital:
- Customer
- Meter
- Feature
- Plan
- Rate Card
- Subscription
- Invoice
| 1. Click **Next**. | ||
| 1. From the **Pricing model** dropdown menu, select "Usage Based". | ||
| 1. In the **Price per package** field, enter `1`. | ||
| 1. In the **Quantity per package** field, enter `5000`. |
There was a problem hiding this comment.
Usage-based price doesn't have a quantity. Only the packaged price has it, but we changed it to UBP.
| @@ -0,0 +1,231 @@ | |||
| --- | |||
| title: Get started with Metering and Billing in {{site.konnect_short_name}} | |||
…rted-metering-billing
|
skipping broken links since they're fake (will be resolved in the release branch because the docs exist there) |
57d9df8
into
release/konnect-metering-and-billing
* Feat: Konnect metering and billing Subjects (#3478) * subjects * add schema * Apply suggestions from code review * appease vale Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * add metering and billing var * Feat: Metering and Billing customer entity (#3540) * subjects * add schema * metering customer * Apply suggestions from code review Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Apply suggestions from code review * Delete two subject pages as I moved the content to the customers page Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Feat(Metering and Billing): Product Catalog (#3561) * product catalog * Discounts, Product Catalog and an include * rework product catalog page * appease vale * Apply suggestions from code review * fix broken link --------- Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Feat(Metering&Billing): Metering landing page (#3617) * landing page * fix urls * icons * Apply suggestions from code review * Fix images and svgs Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * feat(metering): Get Started guide (#3504) * Start outlining the get started guide Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Finish the rough draft Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Add M&B scaffolding Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Add metering and billing to rate limit check Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Apply changes from testing Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * See if skipping product fixes build Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * appease vale Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Finishing draft, adding concept diagram and words Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Fix diagram, dev edit Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * remove colors * Apply suggestions from code review --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Angel <angel.guarisma@konghq.com> * Feat(Metering & Billing): Billing and subscriptions (#3695) * billing and subs * rework billing page Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * appease vale by turning it off the tables Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions from code review --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Fix naming variable usage, remove get started from landing page and replace with learn more Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * feat(Metering&Billing): API addition (#3711) * api * api action * feat(metering): Metering reference page (#3704) * draft metering page Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * appease vale Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Update app/metering-and-billing/metering.md --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Angel <Guaris@users.noreply.github.com> * add M&B roles Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * fix frontmatter Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * fix broken links hopefully Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * fix build issue Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * Attempt to fix icon, nav item, and color Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * apply feedback, change M&B color for top nav, remove discounts page Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * fix get started guide Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * fix customer endpoint, add get started to landing page Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> * new metering spec (#3742) --------- Signed-off-by: Diana <75819066+cloudjumpercat@users.noreply.github.com> Co-authored-by: Angel <Guaris@users.noreply.github.com> Co-authored-by: Angel <angel.guarisma@konghq.com>
Description
Fixes #3375
Preview Links
https://deploy-preview-3504--kongdeveloper.netlify.app/metering-and-billing/get-started/
Checklist
descriptionentry in frontmatter.