Skip to content

Conversation

@Arobce
Copy link
Contributor

@Arobce Arobce commented Jan 15, 2026

Description (required)

Added a comprehensive implementation guide for B2B SaaS billing with organizations and per-user pricing in Kinde.

Changes:

  • Created new documentation page: src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx
  • Updated sidebar configuration in src/data/sidebarData.ts to include new "Implementation guides" section under Billing
  • Guide includes:
    • Step-by-step setup instructions for Stripe connection
    • Per-user billing plan configuration with metered features
    • Organization creation and management flows
    • Multiple user join patterns (manual, org codes, domain-based auto-add)
    • Seat usage tracking implementation
    • Troubleshooting section

Key features:

  • Covers organization-scoped access control with administrator-managed billing
  • Includes code examples for React SDK and direct authorization URLs
  • Links to related resources (Stripe management, example workflows)
  • Metadata includes AI summary for LLM training integration

Related issues & labels

  • Suggested label: documentation, billing, guides

Summary by CodeRabbit

  • Documentation
    • Added a B2B SaaS per-usage billing implementation guide covering org-scoped access control, admin-managed billing, per-user (seat-based) metered pricing, usage tracking, onboarding/signup flows, pricing tables, and troubleshooting.
    • Updated sidebar navigation to surface the new billing implementation guide for easier discovery.

✏️ Tip: You can customize this high-level summary in your review settings.

@Arobce Arobce requested review from a team as code owners January 15, 2026 20:12
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Walkthrough

Adds an "Implementation guides" entry to the Billing sidebar and introduces a new B2B SaaS per-usage billing implementation guide documenting org-scoped billing, admin-managed billing, Seat + metered pricing, onboarding patterns, and usage tracking.

Changes

Cohort / File(s) Summary
Navigation configuration
src/data/sidebarData.ts
Added Implementation guides under Billing with autogenerate: billing/implementation-guide and collapsed: false.
Documentation (new guide)
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx
Added comprehensive B2B SaaS per-usage billing guide covering org-scoped access control, Billing Admin, Stripe connection, seat-based + metered pricing, optional base charges, plan publishing/pricing table visibility, signup/onboarding flows (manual, orgCode, domain auto-add), usage tracking/submission, and troubleshooting notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through docs with cheer,
Found billing paths now shining clear,
Seats and meters in a row,
Admins and Stripe ready to go,
Rabbit says: "Ship it, let it flow!" 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: adding a B2B per-usage billing setup guide, which matches the primary content addition in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Arobce
Copy link
Contributor Author

Arobce commented Jan 15, 2026

Hi @tamalchowdhury,

I’d really appreciate your feedback on this PR when you have a moment. I want to make sure it aligns well with Kinde’s style and conventions, so any suggestions or improvements you notice would be very helpful.

Thanks in advance!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx`:
- Line 14: Update the document metadata by changing the `updated` front-matter
value from "2025-01-27" to "2026-01-27" so the file's `updated` field reflects
the correct 2026 date; locate the `updated:` metadata entry in the MDX
front-matter and replace the year accordingly.
- Around line 1-18: The filename in the frontmatter and file path uses
"b2b-sass-per-usage-billing-setup.mdx" (typo: "sass")—rename the file to
"b2b-saas-per-usage-billing-setup.mdx" and update any internal references/links
to the old name (e.g., nav/sidebar entries or cross-doc links) so they point to
"b2b-saas-per-usage-billing-setup.mdx"; ensure the page title/frontmatter
remains unchanged except for any filename-based fields that reference the old
name.
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbf2320 and 72be94b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx
  • src/data/sidebarData.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-27T18:42:29.479Z
Learnt from: victoreronmosele
Repo: kinde-oss/documentation PR: 647
File: src/content/docs/developer-tools/sdks/native/ios-sdk.mdx:278-297
Timestamp: 2025-12-27T18:42:29.479Z
Learning: In MDX documentation files (e.g., any API reference docs), when documenting parameters (like loginHint, connectionId), prefer listing them in the API reference Arguments section and link to detailed documentation pages instead of duplicating descriptions, format specs, or validation rules inline. This follows the 'document once, reference anywhere' principle.

Applied to files:

  • src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx
🪛 LanguageTool
src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx

[style] ~209-~209: The double modal “required Intended” is nonstandard (only accepted in certain dialects). Consider “to be Intended”.
Context: ...dashboard) - No custom code required - Intended for internal or low-volume use ### O...

(NEEDS_FIXED)

🔇 Additional comments (6)
src/data/sidebarData.ts (1)

249-254: LGTM!

The new "Implementation guides" entry follows the established pattern and correctly references the billing/implementation-guide directory where the new documentation resides.

src/content/docs/billing/implementation-guide/b2b-sass-per-usage-billing-setup.mdx (5)

42-150: LGTM!

The setup sections (Stripe connection, billing plan configuration, pricing table, and role creation) are well-structured with clear step-by-step instructions and appropriate external references.


162-184: LGTM!

The code examples for organization creation are clear and demonstrate both the React SDK approach and direct authorization URL method appropriately.


197-255: LGTM!

The user join patterns are well-documented with three practical options covering different B2B use cases. The orgCode approach is appropriately marked as the recommended default.

Note: The static analysis hint about line 209 is a false positive—"required" and "Intended" are separate bullet points, not a double modal.


256-277: LGTM!

Good clarity that seat counts must be manually submitted, with practical trigger examples and multiple integration paths (API, Workflows, webhooks).


279-287: LGTM!

The troubleshooting section addresses a common issue with clear verification steps.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx`:
- Around line 134-150: The "Key" field in the "Create a Billing Admin role"
section is inconsistent with other fields; update the markdown for the Key line
in the Billing Admin role block so it matches the others by changing "Key:
billing-admin" to "**Key:** billing-admin" within the same section (the block
that configures Name, Key, Assign, System permission).
- Around line 201-203: Replace the vague bullet "The appropriate authentication
method is enabled" with a specific guidance: list supported auth flows (e.g.,
RegisterLink/LoginLink for orgCode, domain-based SSO via direct auth URLs, and
manual invite flow), state which flow is required for each billing setup option,
and add a pointer to the authentication examples in Section 5 (lines 163–184) or
Kinde's auth docs; keep the existing "Org → Policies → Allow org members to be
auto-added" bullet as-is.
🧹 Nitpick comments (1)
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx (1)

42-52: Consider using relative links for internal documentation.

Line 52 uses an absolute URL for internal documentation. If your documentation system supports it, using relative paths (e.g., /billing/payment-management/manage-stripe-connection/) can prevent broken links across different environments and improve maintainability.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72be94b and 8c28752.

📒 Files selected for processing (1)
  • src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-27T18:42:29.479Z
Learnt from: victoreronmosele
Repo: kinde-oss/documentation PR: 647
File: src/content/docs/developer-tools/sdks/native/ios-sdk.mdx:278-297
Timestamp: 2025-12-27T18:42:29.479Z
Learning: In MDX documentation files (e.g., any API reference docs), when documenting parameters (like loginHint, connectionId), prefer listing them in the API reference Arguments section and link to detailed documentation pages instead of duplicating descriptions, format specs, or validation rules inline. This follows the 'document once, reference anywhere' principle.

Applied to files:

  • src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx
🪛 LanguageTool
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx

[style] ~209-~209: The double modal “required Intended” is nonstandard (only accepted in certain dialects). Consider “to be Intended”.
Context: ...dashboard) - No custom code required - Intended for internal or low-volume use ### O...

(NEEDS_FIXED)

🔇 Additional comments (8)
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx (8)

1-18: LGTM! Frontmatter is well-structured.

The metadata is comprehensive and appropriate for this implementation guide. The updated date (2026-01-15) correctly reflects the current timeframe.


20-41: LGTM! Clear introduction and logical flow.

The guide overview provides a well-structured implementation roadmap that will help developers understand the complete process upfront.


54-124: LGTM! Comprehensive billing plan configuration.

The step-by-step instructions with specific field names and values make this section highly actionable. The inclusion of optional base subscription charges adds helpful flexibility.


125-132: LGTM! Clear and concise pricing table setup.


152-195: LGTM! Clear organization creation flow with practical examples.

Both the React SDK and direct authorization URL examples are well-formatted and demonstrate the signup flow effectively. The behavior description helps developers understand what to expect.


206-254: LGTM! Well-organized user join patterns.

The three options (manual, orgCode-based, and domain-based) are clearly explained with appropriate code examples. The recommendation to use orgCode as the default is helpful guidance.


256-277: LGTM! Critical information about manual seat tracking.

The explicit note that Kinde doesn't automatically calculate seat counts is crucial for developers. The various submission methods (API, Workflows, webhooks) provide flexibility for different architectures.


279-287: LGTM! Helpful troubleshooting guidance.

The verification checklist for the pricing table issue provides clear, actionable steps for debugging.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@Arobce
Copy link
Contributor Author

Arobce commented Jan 15, 2026

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tamalchowdhury
Copy link
Collaborator

Hi @Arobce thanks a lot for the mention. I am also in the process of creating an updated style guide for the docs so it will be helpful to create the guides in one unified standard. In the meantime, I will review the doc.

@tamalchowdhury tamalchowdhury self-assigned this Jan 16, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx`:
- Around line 224-228: The displayed link text "Signin" inside the LoginLink
component is a typo and should be changed to "Sign in" for consistency; locate
the LoginLink usage (LoginLink orgCode="org_8d350c10295bf") and update its inner
text from "Signin" to "Sign in" so it matches other occurrences like "Sign up".
- Around line 257-278: The example link to "Track org seat usage workflow"
pointing to trackOrgSeatUsageWorkflow.ts is broken (404); either remove the
linked example or replace the link with a valid workflow example URL (or point
to a local example file), and update the surrounding text in the "How to submit
usage" section so the list item no longer references a missing resource (adjust
the bullet that mentions the workflow example and the anchor text "Track org
seat usage workflow" accordingly).
🧹 Nitpick comments (1)
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx (1)

200-204: Add a "Prerequisites" header for clarity.

The bullet points at lines 202-203 appear to be prerequisites for Options 2 and 3, but they're presented without context after the introductory sentence. This structure may confuse readers about whether these are requirements or options.

📝 Suggested clarification
 Once an organization exists, additional users can join using multiple supported approaches.

+**Prerequisites for self-signup options (Options 2 and 3):**
+
 - The appropriate authentication (email + password, email + code, etc.) method is enabled
 - **Org → Policies → Allow org members to be auto-added** is enabled
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa5cdaa and 678092e.

📒 Files selected for processing (1)
  • src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-27T18:42:29.479Z
Learnt from: victoreronmosele
Repo: kinde-oss/documentation PR: 647
File: src/content/docs/developer-tools/sdks/native/ios-sdk.mdx:278-297
Timestamp: 2025-12-27T18:42:29.479Z
Learning: In MDX documentation files (e.g., any API reference docs), when documenting parameters (like loginHint, connectionId), prefer listing them in the API reference Arguments section and link to detailed documentation pages instead of duplicating descriptions, format specs, or validation rules inline. This follows the 'document once, reference anywhere' principle.

Applied to files:

  • src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx
🪛 LanguageTool
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx

[style] ~210-~210: The double modal “required Intended” is nonstandard (only accepted in certain dialects). Consider “to be Intended”.
Context: ...dashboard) - No custom code required - Intended for internal or low-volume use ### O...

(NEEDS_FIXED)

🔇 Additional comments (3)
src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx (3)

20-40: Well-structured guide overview.

The introduction clearly outlines the architecture pattern and the high-level implementation flow. The numbered steps provide a good roadmap for readers.


54-126: Clear per-user billing configuration instructions.

The metered feature configuration is well-documented with specific field values and explanations. The optional base subscription charge section provides good flexibility guidance.


163-185: Good code examples for both React SDK and direct URL.

Both the RegisterLink component usage and the direct authorization URL provide developers with flexible integration options.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx`:
- Line 224: Update the heading text "Option 2: Allow self sign-up using an
organization code (recommended)" to hyphenate the compound noun; change "self
sign-up" to "self-sign-up" so the heading reads "Option 2: Allow self-sign-up
using an organization code (recommended)"; locate and edit the heading string in
the document where that exact line appears.

- No custom code required
- Intended for internal or low-volume usage

### Option 2: Allow self sign-up using an organization code (recommended)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hyphenate “self‑sign‑up” in the heading.
Line 224 uses a compound noun; hyphenation improves grammar and consistency.

✏️ Proposed copy edit
-### Option 2: Allow self sign-up using an organization code (recommended)
+### Option 2: Allow self-sign-up using an organization code (recommended)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Option 2: Allow self sign-up using an organization code (recommended)
### Option 2: Allow self-sign-up using an organization code (recommended)
🧰 Tools
🪛 LanguageTool

[grammar] ~224-~224: Use a hyphen to join words.
Context: ...w-volume usage ### Option 2: Allow self sign-up using an organization code (reco...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In
`@src/content/docs/billing/implementation-guide/b2b-saas-per-usage-billing-setup.mdx`
at line 224, Update the heading text "Option 2: Allow self sign-up using an
organization code (recommended)" to hyphenate the compound noun; change "self
sign-up" to "self-sign-up" so the heading reads "Option 2: Allow self-sign-up
using an organization code (recommended)"; locate and edit the heading string in
the document where that exact line appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants