From 14d52f2585a345e729250bdfac1c541820f28a19 Mon Sep 17 00:00:00 2001 From: Alberto Leal Date: Wed, 3 Jun 2026 17:30:11 -0400 Subject: [PATCH 1/3] feat(billing): add tax id fields to billing details and contract requests Carry the customer's tax registration number across the platform billing service boundary so contract invoicing can compute sales tax with the correct treatment (e.g. EU reverse charge for registered businesses). - BillingDetails.tax_number (field 6): mirrors the stored billing-details tax number, returned by GetBillingDetails. - CreateContractRequest.customer_tax_id (field 7) and RolloverContractRequest.customer_tax_id (field 6): let the caller forward the resolved tax id into contract creation and rollover. All three are optional string fields with new field numbers, so the change is backwards compatible. REVENG-15 --- .../v1/services/billing_details/v1/billing_details.proto | 1 + .../services/contract/v1/endpoint_create_contract.proto | 3 +++ .../services/contract/v1/endpoint_rollover_contract.proto | 3 +++ ...entry_protos.billing.v1.services.billing_details.v1.rs | 2 ++ rust/src/sentry_protos.billing.v1.services.contract.v1.rs | 8 ++++++++ 5 files changed, 17 insertions(+) diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto index 864bef55..cc6e79b0 100644 --- a/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto @@ -22,4 +22,5 @@ message BillingDetails { optional string company_name = 3; optional string billing_email = 4; sentry_protos.billing.v1.common.v1.Address billing_address = 5; + optional string tax_number = 6; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto index 0bc0d05b..2308e9c9 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto @@ -16,6 +16,9 @@ message CreateContractRequest { // supported_month_intervals. If unset, defaults to the package's first // supported interval. uint32 month_interval = 6; + // The customer's tax registration number (e.g. VAT ID), used to determine + // tax treatment for this contract. Unset if none is on file. + optional string customer_tax_id = 7; } message CreateContractResponse { diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto index fc4cdfd9..faca9cca 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto @@ -18,6 +18,9 @@ message RolloverContractRequest { // The pending change to apply to the new contract, if any. Unset means no // pending change is being applied during this rollover. optional sentry_protos.billing.v1.common.v1.PendingChange pending_change = 5; + // The customer's tax registration number (e.g. VAT ID), used to determine + // tax treatment for this contract. Unset if none is on file. + optional string customer_tax_id = 6; } message RolloverContractResponse { diff --git a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs index 3a05b50b..b0fdcee9 100644 --- a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs @@ -31,6 +31,8 @@ pub struct BillingDetails { pub billing_address: ::core::option::Option< super::super::super::common::v1::Address, >, + #[prost(string, optional, tag = "6")] + pub tax_number: ::core::option::Option<::prost::alloc::string::String>, } #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetBillingDetailsRequest { diff --git a/rust/src/sentry_protos.billing.v1.services.contract.v1.rs b/rust/src/sentry_protos.billing.v1.services.contract.v1.rs index e5812bb5..8a9da0cc 100644 --- a/rust/src/sentry_protos.billing.v1.services.contract.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.contract.v1.rs @@ -493,6 +493,10 @@ pub struct CreateContractRequest { /// supported interval. #[prost(uint32, tag = "6")] pub month_interval: u32, + /// The customer's tax registration number (e.g. VAT ID), used to determine + /// tax treatment for this contract. Unset if none is on file. + #[prost(string, optional, tag = "7")] + pub customer_tax_id: ::core::option::Option<::prost::alloc::string::String>, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateContractResponse { @@ -673,6 +677,10 @@ pub struct RolloverContractRequest { pub pending_change: ::core::option::Option< super::super::super::common::v1::PendingChange, >, + /// The customer's tax registration number (e.g. VAT ID), used to determine + /// tax treatment for this contract. Unset if none is on file. + #[prost(string, optional, tag = "6")] + pub customer_tax_id: ::core::option::Option<::prost::alloc::string::String>, } #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RolloverContractResponse { From cc778992d5193af37758b5236c0419d6cf9e2b51 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:48:13 +0000 Subject: [PATCH 2/3] chore: Regenerate Rust bindings --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c2346d72..2894b567 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.21.0" +version = "0.22.0" dependencies = [ "prost", "prost-types", From a8c5a138201d161f6ae37e9ab3de88de0aef5ee2 Mon Sep 17 00:00:00 2001 From: Alberto Leal Date: Wed, 3 Jun 2026 18:22:27 -0400 Subject: [PATCH 3/3] docs(billing): expand tax id field doc comments Add a doc-comment to BillingDetails.tax_number for parity, and note the reverse-charge use on the contract requests' customer_tax_id. Regenerated Rust bindings carry the comments. --- .../v1/services/billing_details/v1/billing_details.proto | 1 + .../v1/services/contract/v1/endpoint_create_contract.proto | 3 ++- .../services/contract/v1/endpoint_rollover_contract.proto | 3 ++- .../sentry_protos.billing.v1.services.billing_details.v1.rs | 1 + rust/src/sentry_protos.billing.v1.services.contract.v1.rs | 6 ++++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto index cc6e79b0..cdeb1720 100644 --- a/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto @@ -22,5 +22,6 @@ message BillingDetails { optional string company_name = 3; optional string billing_email = 4; sentry_protos.billing.v1.common.v1.Address billing_address = 5; + // The customer's tax registration number (e.g. VAT ID), if on file. optional string tax_number = 6; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto index 2308e9c9..0125014c 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_create_contract.proto @@ -17,7 +17,8 @@ message CreateContractRequest { // supported interval. uint32 month_interval = 6; // The customer's tax registration number (e.g. VAT ID), used to determine - // tax treatment for this contract. Unset if none is on file. + // tax treatment for this contract (for example, reverse charge for + // tax-registered businesses). Unset if none is on file. optional string customer_tax_id = 7; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto index faca9cca..1e39c36f 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_rollover_contract.proto @@ -19,7 +19,8 @@ message RolloverContractRequest { // pending change is being applied during this rollover. optional sentry_protos.billing.v1.common.v1.PendingChange pending_change = 5; // The customer's tax registration number (e.g. VAT ID), used to determine - // tax treatment for this contract. Unset if none is on file. + // tax treatment for this contract (for example, reverse charge for + // tax-registered businesses). Unset if none is on file. optional string customer_tax_id = 6; } diff --git a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs index b0fdcee9..e21d6284 100644 --- a/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.billing_details.v1.rs @@ -31,6 +31,7 @@ pub struct BillingDetails { pub billing_address: ::core::option::Option< super::super::super::common::v1::Address, >, + /// The customer's tax registration number (e.g. VAT ID), if on file. #[prost(string, optional, tag = "6")] pub tax_number: ::core::option::Option<::prost::alloc::string::String>, } diff --git a/rust/src/sentry_protos.billing.v1.services.contract.v1.rs b/rust/src/sentry_protos.billing.v1.services.contract.v1.rs index 8a9da0cc..9d3961f5 100644 --- a/rust/src/sentry_protos.billing.v1.services.contract.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.contract.v1.rs @@ -494,7 +494,8 @@ pub struct CreateContractRequest { #[prost(uint32, tag = "6")] pub month_interval: u32, /// The customer's tax registration number (e.g. VAT ID), used to determine - /// tax treatment for this contract. Unset if none is on file. + /// tax treatment for this contract (for example, reverse charge for + /// tax-registered businesses). Unset if none is on file. #[prost(string, optional, tag = "7")] pub customer_tax_id: ::core::option::Option<::prost::alloc::string::String>, } @@ -678,7 +679,8 @@ pub struct RolloverContractRequest { super::super::super::common::v1::PendingChange, >, /// The customer's tax registration number (e.g. VAT ID), used to determine - /// tax treatment for this contract. Unset if none is on file. + /// tax treatment for this contract (for example, reverse charge for + /// tax-registered businesses). Unset if none is on file. #[prost(string, optional, tag = "6")] pub customer_tax_id: ::core::option::Option<::prost::alloc::string::String>, }