Skip to content

CBI-856 | Add GetBillingProfile and UpdateBillingProfile RPCs - #582

Open
Rendez wants to merge 1 commit into
mainfrom
CBI-856-billing-profile
Open

Rendez wants to merge 1 commit into
mainfrom
CBI-856-billing-profile

Conversation

@Rendez

@Rendez Rendez commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What changed

BillingService gets two RPCs for the billing profile: who a billing account is billed as (legal name, billing email, address and Tax ID). GetBillingProfile reads it, and UpdateBillingProfile writes it, with an optional update mask in which the address counts as one field, address. Both work on the billing account only; a child account gets FAILED_PRECONDITION, which names the billing account to use instead.

Why

Today the billing name, address and Tax ID live on each payment method, so an account with several payment records has several, possibly conflicting, copies. The billing profile keeps one copy per billing account, and new clients will read and write it through these RPCs instead of UpdatePaymentMethod (CBI-856, design section 7.1). The billing fields on PaymentMethod stay as they are for now and are deprecated in a later change.

Notes

  • UpdateBillingProfile is a PUT, like UpdateCluster and UpdatePaymentMethod, with account_id_expression and a patch_source on GetBillingProfile. With a mask, fields left out of it keep their stored values; tax_id listed in the mask with no value removes the Tax ID. The address cannot be removed: an update without one keeps the stored address. Both responses mark billing_profile as required, like the other get and update responses.
  • UpdateBillingProfile is not interactive_only, so API keys and MCP clients can call it. Both RPCs are MCP tools: get_billing_profile, and update_billing_profile, which asks the user to confirm before an agent's change goes through, as update_cluster does. The gateway's verb defaults for a PUT (idempotent, destructive) fit, so no hints are set.
  • UpdateBillingProfile publishes an EVENT_TYPE_UPDATED event for billing-profile, and both RPCs log the account id when they fail. Both name the account id only, never the name, email, address or Tax ID. GetBillingProfile has no event, like every other read RPC.
  • BillingProfileAddress follows payment.v1.BillingAddress: its comments and rules, and the read-only tax_supported_country. A new read-only formatted_address holds the address on one line in its country's format, ending with the country name, for example Mainzer Landstraße 50, 60325 FRANKFURT, GERMANY; the cluster API fills it in a follow-up PR and leaves it unset until then. The display names state_formatted and country_formatted are left out, because no client of the profile needs them; adding them later is backwards compatible. Only line1 and country are required; line2, city, state and postal_code stay optional, because which of them an address has depends on the country. A Tax ID needs a country with an Orb tax type (otherwise E1037), and tax_supported_country tells the client whether the address's country has one, so it can save the country before the Tax ID, or with it. Lengths follow the columns of the new billing_profiles table in the cluster API.
  • The service api_version stays 1.0.0, as it did when ListCommitments was added.
  • Both RPCs stay behind the enable_billing_profiles gate. While it is off, a featureGateRules entry in the API gateway answers NOT_FOUND (HTTP 404); the cluster API does not check the gate itself. Behind it, GetBillingProfile returns the profile, and UpdateBillingProfile answers UNIMPLEMENTED until the profile logic lands. The RPCs are still listed in reflection, MCP and GraphQL until launch; that is accepted. The cluster API branch (feat/CBI-856-billing-profile) pins a dev build of this PR until a release.
  • make generate rebuilt gen/; only the billing files changed.

@Rendez
Rendez requested a review from a team as a code owner December 3, 2026 10:32
@Rendez Rendez added the feature label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

PR Packages Published

Python Package:

  • Version: 0.238.0.dev582+8106f58
  • Package: qdrant-cloud-public-api
  • Registry: https://us-python.pkg.dev/qdrant-cloud/python/
  • To update run: uv add qdrant-cloud-public-api==0.238.0.dev582+8106f58

NPM Package:

  • Version: 0.238.0-dev582.8106f58
  • Package: @qdrant/qdrant-cloud-public-api
  • Registry: https://us-npm.pkg.dev/qdrant-cloud/npm/
  • To update run: npm install @qdrant/qdrant-cloud-public-api@0.238.0-dev582.8106f58

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Pull Request / linting (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 4, 2026, 2:47 PM

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Pull Request / linting (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 3, 2026, 10:33 AM

@Rendez
Rendez force-pushed the CBI-856-billing-profile branch 2 times, most recently from 82ea090 to 09bea35 Compare December 3, 2026 14:56
@Rendez
Rendez marked this pull request as draft December 3, 2026 15:13
@Rendez
Rendez force-pushed the CBI-856-billing-profile branch from 09bea35 to 85f560c Compare December 4, 2026 10:09
@github-actions

This comment has been minimized.

@Rendez
Rendez force-pushed the CBI-856-billing-profile branch from 85f560c to 6223f28 Compare December 4, 2026 10:40
github-actions[bot]

This comment was marked as resolved.

@Rendez
Rendez marked this pull request as ready for review December 4, 2026 14:39
github-actions[bot]

This comment was marked as resolved.

@Rendez
Rendez force-pushed the CBI-856-billing-profile branch from 6223f28 to 8106f58 Compare December 4, 2026 14:46

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant