From ba1edec1b82c39d10482f4cc0a3d81bfce282583 Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Wed, 29 Apr 2026 15:36:41 -0700 Subject: [PATCH 1/8] feat(billing): Add payment config to charge service Add PaymentConfig message with Stripe payment data to the charge service interface. The PaymentConfig uses a oneof pattern to support multiple payment providers in the future. New payment_config.proto includes: - StripePaymentData: customer ID, payment method, and payment status - PaymentConfig: oneof wrapper for extensibility CaptureChargeRequest now accepts optional payment_config for provider-specific payment details. Also includes buf format fixes for indentation across billing protos. Co-Authored-By: Claude Sonnet 4.5 --- .../v1/endpoint_get_billing_details.proto | 4 +- .../charge/v1/endpoint_capture_charge.proto | 2 + .../charge/v1/endpoint_list_charges.proto | 12 ++-- .../services/charge/v1/payment_config.proto | 18 ++++++ .../services/contract/v1/billing_config.proto | 6 +- .../v1/endpoint_create_contract.proto | 8 +-- .../contract/v1/endpoint_get_invoice.proto | 6 +- .../v1/endpoint_rollover_contract.proto | 12 ++-- .../v1/services/contract/v1/invoice.proto | 22 +++---- .../invoicer/v1/endpoint_generate_pdf.proto | 60 +++++++++---------- 10 files changed, 85 insertions(+), 65 deletions(-) create mode 100644 proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto index 44aa908b..fa164041 100644 --- a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_billing_details.proto @@ -5,9 +5,9 @@ package sentry_protos.billing.v1.services.billing_details.v1; import "sentry_protos/billing/v1/services/billing_details/v1/billing_details.proto"; message GetBillingDetailsRequest { - uint64 organization_id = 1; + uint64 organization_id = 1; } message GetBillingDetailsResponse { BillingDetails billing_details = 1; -} \ No newline at end of file +} diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto index a65d4527..bfa8fc20 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto +++ b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.charge.v1; import "google/protobuf/timestamp.proto"; +import "sentry_protos/billing/v1/services/charge/v1/payment_config.proto"; // How the charge should be executed against the payment provider. enum ChargeMethod { @@ -25,6 +26,7 @@ message CaptureChargeRequest { uint64 organization_id = 4; google.protobuf.Timestamp current_ts = 5; optional string invoice_id = 6; + optional PaymentConfig payment_config = 7; } message CaptureChargeResponse { diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto index 33876b33..4fa90da4 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto +++ b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_list_charges.proto @@ -3,17 +3,17 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.charge.v1; message Charge { - uint64 amount_cents = 1; - bool paid = 2; - optional string failure_code = 3; + uint64 amount_cents = 1; + bool paid = 2; + optional string failure_code = 3; } // No pagination on this request because there are expected to be only a handful // of attempted charges per invoice. message ListChargesForInvoiceRequest { - uint64 invoice_id = 1; + uint64 invoice_id = 1; } message ListChargesForInvoiceResponse { - repeated Charge charges = 1; -} \ No newline at end of file + repeated Charge charges = 1; +} diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto b/proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto new file mode 100644 index 00000000..3b33f76e --- /dev/null +++ b/proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package sentry_protos.billing.v1.services.charge.v1; + +// Stripe-specific payment information for an organization. +message StripePaymentData { + optional string customer_stripe_id = 1; + optional string default_payment_method_id = 2; + bool has_payment_method = 3; +} + +// Payment provider configuration with support for multiple providers. +message PaymentConfig { + oneof config { + StripePaymentData stripe = 1; + // Future payment providers (e.g., PayPal, Braintree) can be added here + } +} diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto b/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto index 0dd66ee3..9adb30fc 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/billing_config.proto @@ -51,9 +51,9 @@ message BillingConfig { BillingType billing_type = 1; // Remaining fields are deprecated - BillingChannel channel = 2 [deprecated=true]; - ExternalBillingProvider external_billing_provider = 3 [deprecated=true]; - Address address = 4 [deprecated=true]; + BillingChannel channel = 2 [deprecated = true]; + ExternalBillingProvider external_billing_provider = 3 [deprecated = true]; + Address address = 4 [deprecated = true]; // Use PricingConfig.billing_period_start_date and PricingConfig.billing_period_end_date Date contract_start_date = 5 [deprecated = true]; Date contract_end_date = 6 [deprecated = true]; 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 04fafe61..63d683cc 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 @@ -5,11 +5,11 @@ package sentry_protos.billing.v1.services.contract.v1; import "sentry_protos/billing/v1/services/contract/v1/pricing_config.proto"; message CreateContractRequest { - uint64 organization_id = 1; - string package_uid = 2; - repeated UserConfig user_configs = 3; + uint64 organization_id = 1; + string package_uid = 2; + repeated UserConfig user_configs = 3; } message CreateContractResponse { - uint64 id = 1; + uint64 id = 1; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto index 9cb24a2e..15bf8a8a 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/endpoint_get_invoice.proto @@ -5,9 +5,9 @@ package sentry_protos.billing.v1.services.contract.v1; import "sentry_protos/billing/v1/services/contract/v1/invoice.proto"; message GetInvoiceRequest { - uint64 invoice_id = 1; + uint64 invoice_id = 1; } message GetInvoiceResponse { - Invoice invoice = 1; -} \ No newline at end of file + Invoice invoice = 1; +} 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 25c394a7..7e39fcf7 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 @@ -8,13 +8,13 @@ import "sentry_protos/billing/v1/services/contract/v1/invoice.proto"; // Creates a new contract for a new billing period. Closes out the current contract by // creating an invoice and setting the last usage date message RolloverContractRequest { - uint64 contract_id = 1; - google.protobuf.Timestamp last_usage_ts = 2; - repeated InvoiceLineItem line_items = 3; + uint64 contract_id = 1; + google.protobuf.Timestamp last_usage_ts = 2; + repeated InvoiceLineItem line_items = 3; } message RolloverContractResponse { - uint64 invoice_id = 1; - bool needs_charge = 2; - uint64 amount_billed = 3; + uint64 invoice_id = 1; + bool needs_charge = 2; + uint64 amount_billed = 3; } diff --git a/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto b/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto index 84ea0ac2..3742f26e 100644 --- a/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto +++ b/proto/sentry_protos/billing/v1/services/contract/v1/invoice.proto @@ -7,18 +7,18 @@ import "google/protobuf/timestamp.proto"; // This is not the same as LineItemDetails, it includes // items not related to the package such as tax. message InvoiceLineItem { - // Intentionally not a uint (some line items could be discounts) - int64 amount_cents = 1; - optional string description = 2; + // Intentionally not a uint (some line items could be discounts) + int64 amount_cents = 1; + optional string description = 2; } message Invoice { - uint64 invoice_id = 1; - repeated InvoiceLineItem line_items = 2; - // Not just a sum of line items since there may be credit applied - uint64 amount_billed = 3; - uint64 organization_id = 4; - bool paid = 5; - google.protobuf.Timestamp date_added = 6; - string guid = 7; + uint64 invoice_id = 1; + repeated InvoiceLineItem line_items = 2; + // Not just a sum of line items since there may be credit applied + uint64 amount_billed = 3; + uint64 organization_id = 4; + bool paid = 5; + google.protobuf.Timestamp date_added = 6; + string guid = 7; } diff --git a/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto index fe7dfe2f..9f84bd22 100644 --- a/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto +++ b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_generate_pdf.proto @@ -3,40 +3,40 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.invoicer.v1; message GeneratePdfRequest { - uint64 invoice_id = 1; - string invoice_guid = 2; + uint64 invoice_id = 1; + string invoice_guid = 2; } message PdfData { - // Right-aligned lines drawn at the top of the page (e.g. company address - // and tax IDs). - repeated string header = 1; - - // Left column of pre-formatted text lines drawn below the header. - repeated string billing_lines = 2; - - // Right column below the header. Each entry renders as the `label` drawn - // in one text column and the corresponding `value` drawn in the next. - message LabeledLine { - string label = 1; - string value = 2; - } - repeated LabeledLine invoice_lines = 3; - - // Rows of the invoice line-item table. The first row is the header row - // ("Description" / "Amount"); every subsequent row has the same number of - // cells. Cells may contain reportlab markup (e.g. ,
, ) for - // multi-line/styled descriptions. - message TableRow { - repeated string cells = 1; - } - repeated TableRow table_data = 4; - - // Optional FTC disclaimer paragraph drawn below the table. - optional string disclaimer = 5; + // Right-aligned lines drawn at the top of the page (e.g. company address + // and tax IDs). + repeated string header = 1; + + // Left column of pre-formatted text lines drawn below the header. + repeated string billing_lines = 2; + + // Right column below the header. Each entry renders as the `label` drawn + // in one text column and the corresponding `value` drawn in the next. + message LabeledLine { + string label = 1; + string value = 2; + } + repeated LabeledLine invoice_lines = 3; + + // Rows of the invoice line-item table. The first row is the header row + // ("Description" / "Amount"); every subsequent row has the same number of + // cells. Cells may contain reportlab markup (e.g. ,
, ) for + // multi-line/styled descriptions. + message TableRow { + repeated string cells = 1; + } + repeated TableRow table_data = 4; + + // Optional FTC disclaimer paragraph drawn below the table. + optional string disclaimer = 5; } message GeneratePdfResponse { - PdfData pdf_data = 1; - string filename = 2; + PdfData pdf_data = 1; + string filename = 2; } From 55469592477d6d3dbfc310338234ed6b8ea0b8d7 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 22:38:05 +0000 Subject: [PATCH 2/8] chore: Regenerate Rust bindings --- Cargo.lock | 2 +- ...ry_protos.billing.v1.services.charge.v1.rs | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 613ada8b..23fe7597 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.20" +version = "0.8.21" dependencies = [ "prost", "prost-types", diff --git a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs index 8815869f..b75f2bab 100644 --- a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs @@ -1,4 +1,31 @@ // This file is @generated by prost-build. +/// Stripe-specific payment information for an organization. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct StripePaymentData { + #[prost(string, optional, tag = "1")] + pub customer_stripe_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub default_payment_method_id: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(bool, tag = "3")] + pub has_payment_method: bool, +} +/// Payment provider configuration with support for multiple providers. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PaymentConfig { + #[prost(oneof = "payment_config::Config", tags = "1")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `PaymentConfig`. +pub mod payment_config { + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] + pub enum Config { + /// Future payment providers (e.g., PayPal, Braintree) can be added here + #[prost(message, tag = "1")] + Stripe(super::StripePaymentData), + } +} #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CaptureChargeRequest { #[prost(enumeration = "ChargeMethod", tag = "1")] @@ -13,6 +40,8 @@ pub struct CaptureChargeRequest { pub current_ts: ::core::option::Option<::prost_types::Timestamp>, #[prost(string, optional, tag = "6")] pub invoice_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "7")] + pub payment_config: ::core::option::Option, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CaptureChargeResponse { From 350d6e7b08d49fc3857970be4e22b9ef15cdd4b2 Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Wed, 29 Apr 2026 16:13:48 -0700 Subject: [PATCH 3/8] add invoice guid to charge service --- .../v1/services/charge/v1/endpoint_capture_charge.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto index bfa8fc20..3856fd53 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto +++ b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto @@ -26,7 +26,8 @@ message CaptureChargeRequest { uint64 organization_id = 4; google.protobuf.Timestamp current_ts = 5; optional string invoice_id = 6; - optional PaymentConfig payment_config = 7; + optional string invoice_guid = 7; + optional PaymentConfig payment_config = 8; } message CaptureChargeResponse { From 13be4e3d57f48f10bf6fe9e277e698fb947bef12 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:15:39 +0000 Subject: [PATCH 4/8] chore: Regenerate Rust bindings --- rust/src/sentry_protos.billing.v1.services.charge.v1.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs index b75f2bab..8db5593c 100644 --- a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs @@ -40,7 +40,9 @@ pub struct CaptureChargeRequest { pub current_ts: ::core::option::Option<::prost_types::Timestamp>, #[prost(string, optional, tag = "6")] pub invoice_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(message, optional, tag = "7")] + #[prost(string, optional, tag = "7")] + pub invoice_guid: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag = "8")] pub payment_config: ::core::option::Option, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] From 6d2a9c3b6100c180c9a74c4ecade60689caf8c4c Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Wed, 29 Apr 2026 16:38:50 -0700 Subject: [PATCH 5/8] feat(billing): Move payment config to common and add billing_details endpoint - Move StripePaymentData and PaymentConfig from charge service to common/v1 - Update charge service to import from common - Add get_stripe_payment_data endpoint to billing_details service - Both services now share the same payment configuration types Co-Authored-By: Claude Sonnet 4.5 --- .../charge => common}/v1/payment_config.proto | 2 +- .../v1/endpoint_get_stripe_payment_data.proto | 13 +++++++++++++ .../charge/v1/endpoint_capture_charge.proto | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) rename proto/sentry_protos/billing/v1/{services/charge => common}/v1/payment_config.proto (89%) create mode 100644 proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_stripe_payment_data.proto diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto b/proto/sentry_protos/billing/v1/common/v1/payment_config.proto similarity index 89% rename from proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto rename to proto/sentry_protos/billing/v1/common/v1/payment_config.proto index 3b33f76e..b61bbf02 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/payment_config.proto +++ b/proto/sentry_protos/billing/v1/common/v1/payment_config.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package sentry_protos.billing.v1.services.charge.v1; +package sentry_protos.billing.v1.common.v1; // Stripe-specific payment information for an organization. message StripePaymentData { diff --git a/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_stripe_payment_data.proto b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_stripe_payment_data.proto new file mode 100644 index 00000000..8b5e8196 --- /dev/null +++ b/proto/sentry_protos/billing/v1/services/billing_details/v1/endpoint_get_stripe_payment_data.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package sentry_protos.billing.v1.services.billing_details.v1; + +import "sentry_protos/billing/v1/common/v1/payment_config.proto"; + +message GetStripePaymentDataRequest { + uint64 organization_id = 1; +} + +message GetStripePaymentDataResponse { + sentry_protos.billing.v1.common.v1.StripePaymentData stripe_payment_data = 1; +} diff --git a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto index 3856fd53..2a6b7161 100644 --- a/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto +++ b/proto/sentry_protos/billing/v1/services/charge/v1/endpoint_capture_charge.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package sentry_protos.billing.v1.services.charge.v1; import "google/protobuf/timestamp.proto"; -import "sentry_protos/billing/v1/services/charge/v1/payment_config.proto"; +import "sentry_protos/billing/v1/common/v1/payment_config.proto"; // How the charge should be executed against the payment provider. enum ChargeMethod { @@ -27,7 +27,7 @@ message CaptureChargeRequest { google.protobuf.Timestamp current_ts = 5; optional string invoice_id = 6; optional string invoice_guid = 7; - optional PaymentConfig payment_config = 8; + optional sentry_protos.billing.v1.common.v1.PaymentConfig payment_config = 8; } message CaptureChargeResponse { From 4ae110c0c2b7550fae46d29755b58451278d6033 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 23:39:59 +0000 Subject: [PATCH 6/8] chore: Regenerate Rust bindings --- .../src/sentry_protos.billing.v1.common.v1.rs | 27 ++++++++++++++++ ....billing.v1.services.billing_details.v1.rs | 12 +++++++ ...ry_protos.billing.v1.services.charge.v1.rs | 31 ++----------------- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/rust/src/sentry_protos.billing.v1.common.v1.rs b/rust/src/sentry_protos.billing.v1.common.v1.rs index 98ca588b..b0c6722c 100644 --- a/rust/src/sentry_protos.billing.v1.common.v1.rs +++ b/rust/src/sentry_protos.billing.v1.common.v1.rs @@ -202,6 +202,33 @@ pub struct LineItemDetails { #[prost(message, optional, tag = "6")] pub billable_metric: ::core::option::Option, } +/// Stripe-specific payment information for an organization. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct StripePaymentData { + #[prost(string, optional, tag = "1")] + pub customer_stripe_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "2")] + pub default_payment_method_id: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[prost(bool, tag = "3")] + pub has_payment_method: bool, +} +/// Payment provider configuration with support for multiple providers. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PaymentConfig { + #[prost(oneof = "payment_config::Config", tags = "1")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `PaymentConfig`. +pub mod payment_config { + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] + pub enum Config { + /// Future payment providers (e.g., PayPal, Braintree) can be added here + #[prost(message, tag = "1")] + Stripe(super::StripePaymentData), + } +} #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PricingTier { #[prost(int64, tag = "1")] 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 10a2ec9f..2d54390b 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 @@ -37,3 +37,15 @@ pub struct GetBillingDetailsResponse { #[prost(message, optional, tag = "1")] pub billing_details: ::core::option::Option, } +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetStripePaymentDataRequest { + #[prost(uint64, tag = "1")] + pub organization_id: u64, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetStripePaymentDataResponse { + #[prost(message, optional, tag = "1")] + pub stripe_payment_data: ::core::option::Option< + super::super::super::common::v1::StripePaymentData, + >, +} diff --git a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs index 8db5593c..7e1f8304 100644 --- a/rust/src/sentry_protos.billing.v1.services.charge.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.charge.v1.rs @@ -1,31 +1,4 @@ // This file is @generated by prost-build. -/// Stripe-specific payment information for an organization. -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct StripePaymentData { - #[prost(string, optional, tag = "1")] - pub customer_stripe_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag = "2")] - pub default_payment_method_id: ::core::option::Option< - ::prost::alloc::string::String, - >, - #[prost(bool, tag = "3")] - pub has_payment_method: bool, -} -/// Payment provider configuration with support for multiple providers. -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct PaymentConfig { - #[prost(oneof = "payment_config::Config", tags = "1")] - pub config: ::core::option::Option, -} -/// Nested message and enum types in `PaymentConfig`. -pub mod payment_config { - #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] - pub enum Config { - /// Future payment providers (e.g., PayPal, Braintree) can be added here - #[prost(message, tag = "1")] - Stripe(super::StripePaymentData), - } -} #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CaptureChargeRequest { #[prost(enumeration = "ChargeMethod", tag = "1")] @@ -43,7 +16,9 @@ pub struct CaptureChargeRequest { #[prost(string, optional, tag = "7")] pub invoice_guid: ::core::option::Option<::prost::alloc::string::String>, #[prost(message, optional, tag = "8")] - pub payment_config: ::core::option::Option, + pub payment_config: ::core::option::Option< + super::super::super::common::v1::PaymentConfig, + >, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CaptureChargeResponse { From d3ca9aa6f83d77fe6aa45435fc67c7c432c7c9fb Mon Sep 17 00:00:00 2001 From: Volo Kluev Date: Thu, 30 Apr 2026 11:15:49 -0700 Subject: [PATCH 7/8] remove redundant field --- proto/sentry_protos/billing/v1/common/v1/payment_config.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/proto/sentry_protos/billing/v1/common/v1/payment_config.proto b/proto/sentry_protos/billing/v1/common/v1/payment_config.proto index b61bbf02..a3381d8d 100644 --- a/proto/sentry_protos/billing/v1/common/v1/payment_config.proto +++ b/proto/sentry_protos/billing/v1/common/v1/payment_config.proto @@ -6,7 +6,6 @@ package sentry_protos.billing.v1.common.v1; message StripePaymentData { optional string customer_stripe_id = 1; optional string default_payment_method_id = 2; - bool has_payment_method = 3; } // Payment provider configuration with support for multiple providers. From 68d14162a49134ab2add6ee5774e15860dde6dbb Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 18:17:11 +0000 Subject: [PATCH 8/8] chore: Regenerate Rust bindings --- Cargo.lock | 2 +- rust/src/sentry_protos.billing.v1.common.v1.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23fe7597..d0fbd538 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.21" +version = "0.8.22" dependencies = [ "prost", "prost-types", diff --git a/rust/src/sentry_protos.billing.v1.common.v1.rs b/rust/src/sentry_protos.billing.v1.common.v1.rs index b0c6722c..e0d91b61 100644 --- a/rust/src/sentry_protos.billing.v1.common.v1.rs +++ b/rust/src/sentry_protos.billing.v1.common.v1.rs @@ -211,8 +211,6 @@ pub struct StripePaymentData { pub default_payment_method_id: ::core::option::Option< ::prost::alloc::string::String, >, - #[prost(bool, tag = "3")] - pub has_payment_method: bool, } /// Payment provider configuration with support for multiple providers. #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]