Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: optimize stripe (#20437)
ecmadao212edc5dc16c
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 3c77f47a7a..cfb03546b9 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -14669,6 +14669,7 @@ components:totalPrice:type: stringtitle: total_price+ description: Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).currency:type: stringtitle: currency@@ -14686,6 +14687,12 @@ components:type: booleantitle: cancel_at_period_enddescription: Whether the subscription is scheduled to cancel at the end of the current billing period.+ nextPeriodPrice:+ type: string+ title: next_period_price+ description: |-+ Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+ Empty when the subscription will not renew (e.g. scheduled to cancel at period end).title: PaymentInfoadditionalProperties: falsebytebase.v1.PermissionDeniedDetail:diff --git a/backend/api/v1/subscription_service.go b/backend/api/v1/subscription_service.goindex cf3609e2b5..59fcf39ae3 100644--- a/backend/api/v1/subscription_service.go+++ b/backend/api/v1/subscription_service.go@@ -244,7 +244,24 @@ func (s *SubscriptionService) CancelPurchase(ctx context.Context, req *connect.R// Annual: cancel at period end.prorate := payload.Interval == storepb.SubscriptionPayload_MONTHif _, err := stripeplugin.CancelSubscription(payload.StripeSubscriptionId, workspaceID, prorate, feedback, comment); err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to cancel subscription"))+ if !stripeplugin.IsResourceMissingError(err) {+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to cancel subscription"))+ }+ // Stripe no longer has this subscription — a prior cancel succeeded but its+ // webhook was never delivered, leaving our local status stale. Reconcile to+ // the same end state the customer.subscription.deleted webhook would produce.+ slog.Warn("stripe subscription already canceled, reconciling local state",+ slog.String("workspace", workspaceID),+ slog.String("stripe_subscription_id", payload.StripeSubscriptionId),+ )+ payload.Status = storepb.SubscriptionPayload_CANCELED+ if _, err := s.store.UpsertSubscription(ctx, workspaceID, payload); err != nil {+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to reconcile subscription status"))+ }+ if err := s.licenseService.StoreLicense(ctx, workspaceID, ""); err != nil {+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to clear license"))+ }+ return connect.NewResponse(&v1pb.PurchaseResponse{}), nil}// Stripe webhook (customer.subscription.deleted) will update the subscription status and clear the license@@ -288,6 +305,20 @@ func (s *SubscriptionService) GetPaymentInfo(ctx context.Context, _ *connect.ReqCancelAtPeriodEnd: sub.CancelAtPeriodEnd,}+ // Preview the next renewal charge. Skip when the subscription won't renew —+ // Stripe has no upcoming invoice in that state. Degrade gracefully on failure+ // so the current-period info is still returned.+ if !sub.CancelAtPeriodEnd {+ if preview, err := stripeplugin.GetUpcomingInvoice(payload.StripeSubscriptionId, payload.StripeCustomerId); err != nil {+ slog.Error("failed to preview upcoming invoice",+ log.BBError(err),+ slog.String("stripe_subscription_id", payload.StripeSubscriptionId),+ )+ } else {+ info.NextPeriodPrice = strconv.FormatInt(preview.Total, 10)+ }+ }+if payload.StripeCustomerId != "" {returnURL := fmt.Sprintf("%s/setting/subscription", s.profile.ExternalURL)portalURL, err := stripeplugin.CreateBillingPortalSession(payload.StripeCustomerId, returnURL)diff --git a/backend/generated-go/v1/subscription_service.pb.go b/backend/generated-go/v1/subscription_service.pb.goindex beaf43226a..2d7590895a 100644--- a/backend/generated-go/v1/subscription_service.pb.go+++ b/backend/generated-go/v1/subscription_service.pb.go@@ -934,17 +934,21 @@ func (*GetPaymentInfoRequest) Descriptor() ([]byte, []int) {}type PaymentInfo struct {- state protoimpl.MessageState `protogen:"open.v1"`- TotalPrice string `protobuf:"bytes,1,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`- Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`- PeriodStart string `protobuf:"bytes,3,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"`- PeriodEnd string `protobuf:"bytes,4,opt,name=period_end,json=periodEnd,proto3" json:"period_end,omitempty"`+ state protoimpl.MessageState `protogen:"open.v1"`+ // Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).+ TotalPrice string `protobuf:"bytes,1,opt,name=total_price,json=totalPrice,proto3" json:"total_price,omitempty"`+ Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`+ PeriodStart string `protobuf:"bytes,3,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"`+ PeriodEnd string `protobuf:"bytes,4,opt,name=period_end,json=periodEnd,proto3" json:"period_end,omitempty"`// Stripe Billing Portal URL for invoice management.InvoiceUrl string `protobuf:"bytes,5,opt,name=invoice_url,json=invoiceUrl,proto3" json:"invoice_url,omitempty"`// Whether the subscription is scheduled to cancel at the end of the current billing period.CancelAtPeriodEnd bool `protobuf:"varint,6,opt,name=cancel_at_period_end,json=cancelAtPeriodEnd,proto3" json:"cancel_at_period_end,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ // Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+ // Empty when the subscription will not renew (e.g. scheduled to cancel at period end).+ NextPeriodPrice string `protobuf:"bytes,7,opt,name=next_period_price,json=nextPeriodPrice,proto3" json:"next_period_price,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *PaymentInfo) Reset() {@@ -1019,6 +1023,13 @@ func (x *PaymentInfo) GetCancelAtPeriodEnd() bool {return false}+func (x *PaymentInfo) GetNextPeriodPrice() string {+ if x != nil {+ return x.NextPeriodPrice+ }+ return ""+}+type PurchasePlan struct {state protoimpl.MessageState `protogen:"open.v1"`Type PlanType `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.v1.PlanType" json:"type,omitempty"`@@ -1611,7 +1622,7 @@ const file_v1_subscription_service_proto_rawDesc = "" +"\x15CancelPurchaseRequest\x12\x1a\n" +"\bfeedback\x18\x01 \x01(\tR\bfeedback\x12\x18\n" +"\acomment\x18\x02 \x01(\tR\acomment\"\x17\n" +- "\x15GetPaymentInfoRequest\"\xde\x01\n" ++ "\x15GetPaymentInfoRequest\"\x8a\x02\n" +"\vPaymentInfo\x12\x1f\n" +"\vtotal_price\x18\x01 \x01(\tR\n" +"totalPrice\x12\x1a\n" +@@ -1621,7 +1632,8 @@ const file_v1_subscription_service_proto_rawDesc = "" +"period_end\x18\x04 \x01(\tR\tperiodEnd\x12\x1f\n" +"\vinvoice_url\x18\x05 \x01(\tR\n" +"invoiceUrl\x12/\n" +- "\x14cancel_at_period_end\x18\x06 \x01(\bR\x11cancelAtPeriodEnd\"\x81\x02\n" ++ "\x14cancel_at_period_end\x18\x06 \x01(\bR\x11cancelAtPeriodEnd\x12*\n" ++ "\x11next_period_price\x18\a \x01(\tR\x0fnextPeriodPrice\"\x81\x02\n" +"\fPurchasePlan\x12)\n" +"\x04type\x18\x01 \x01(\x0e2\x15.bytebase.v1.PlanTypeR\x04type\x122\n" +"\x15self_service_purchase\x18\x02 \x01(\bR\x13selfServicePurchase\x12E\n" +diff --git a/backend/generated-go/v1/subscription_service_equal.pb.go b/backend/generated-go/v1/subscription_service_equal.pb.goindex d67dca2d24..b2ff63cbd6 100644--- a/backend/generated-go/v1/subscription_service_equal.pb.go+++ b/backend/generated-go/v1/subscription_service_equal.pb.go@@ -160,6 +160,9 @@ func (x *PaymentInfo) Equal(y *PaymentInfo) bool {if x.CancelAtPeriodEnd != y.CancelAtPeriodEnd {return false}+ if x.NextPeriodPrice != y.NextPeriodPrice {+ return false+ }return true}diff --git a/backend/plugin/stripe/stripe.go b/backend/plugin/stripe/stripe.goindex 397850d3ba..6181324dce 100644--- a/backend/plugin/stripe/stripe.go+++ b/backend/plugin/stripe/stripe.go@@ -129,6 +129,17 @@ func GetCheckoutSessionInfo(sessionID string) (*CheckoutSessionInfo, error) {}, nil}+// IsResourceMissingError reports whether err is a Stripe "resource_missing"+// error — e.g. attempting to cancel a subscription that no longer exists in+// Stripe (the previous cancel succeeded but its webhook was never delivered).+func IsResourceMissingError(err error) bool {+ var stripeErr *stripego.Error+ if errors.As(err, &stripeErr) {+ return stripeErr.Code == stripego.ErrorCodeResourceMissing+ }+ return false+}+// CancelSubscription cancels a Stripe subscription.// If prorate is true, cancels immediately with proration and processes refund.// If prorate is false, schedules cancellation at the end of the current billing period.@@ -261,6 +272,24 @@ func GetSubscription(stripeSubID string, expand []string) (*stripego.Subscriptioreturn sub, nil}+// GetUpcomingInvoice previews the next invoice for a subscription — the amount+// the customer will be charged at the next renewal. The preview reflects expiring+// discounts, scheduled plan changes, and tax. The caller should skip this when the+// subscription is set to cancel at period end, as there is no upcoming invoice then.+func GetUpcomingInvoice(stripeSubID string, customerID string) (*stripego.Invoice, error) {+ params := &stripego.InvoiceCreatePreviewParams{+ Subscription: stripego.String(stripeSubID),+ }+ if customerID != "" {+ params.Customer = stripego.String(customerID)+ }+ inv, err := invoice.CreatePreview(params)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to preview upcoming invoice for subscription %s", stripeSubID)+ }+ return inv, nil+}+// GetMetadata builds the metadata map for a Stripe subscription.func GetMetadata(workspace string, model *pricing.PriceModel) map[string]string {return map[string]string{diff --git a/backend/plugin/stripe/stripe_test.go b/backend/plugin/stripe/stripe_test.gonew file mode 100644index 0000000000..8d59cffe3f--- /dev/null+++ b/backend/plugin/stripe/stripe_test.go@@ -0,0 +1,51 @@+package stripe++import (+ "testing"++ "github.com/pkg/errors"+ stripego "github.com/stripe/stripe-go/v85"+)++func TestIsResourceMissingError(t *testing.T) {+ testCases := []struct {+ name string+ err error+ want bool+ }{+ {+ name: "nil error",+ err: nil,+ want: false,+ },+ {+ name: "plain error",+ err: errors.New("boom"),+ want: false,+ },+ {+ name: "stripe resource_missing error",+ err: &stripego.Error{Code: stripego.ErrorCodeResourceMissing},+ want: true,+ },+ {+ name: "stripe error with other code",+ err: &stripego.Error{Code: stripego.ErrorCodeCardDeclined},+ want: false,+ },+ {+ // Mirrors CancelSubscription, which wraps the Stripe error with errors.Wrapf.+ name: "wrapped stripe resource_missing error",+ err: errors.Wrap(&stripego.Error{Code: stripego.ErrorCodeResourceMissing}, "failed to cancel stripe subscription"),+ want: true,+ },+ }++ for _, tc := range testCases {+ t.Run(tc.name, func(t *testing.T) {+ if got := IsResourceMissingError(tc.err); got != tc.want {+ t.Errorf("IsResourceMissingError() = %v, want %v", got, tc.want)+ }+ })+ }+}diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.jsonindex c8cd569bd7..ec44cbc990 100644--- a/frontend/src/react/locales/en-US.json+++ b/frontend/src/react/locales/en-US.json@@ -3718,6 +3718,7 @@"enterprise-description": "Scale your business securely while staying compliant.","free-description": "Designed for solo devs, side-projects, and experiments.","manage-invoices": "Manage Invoices",+ "next-period-price": "Next Period Price","payment-info": "Payment Info","pending-description": "Please wait while we confirm your payment. This usually takes a few seconds.","pending-title": "Completing your purchase...",diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.jsonindex f2c9718f55..318cea40bb 100644--- a/frontend/src/react/locales/es-ES.json+++ b/frontend/src/react/locales/es-ES.json@@ -3707,6 +3707,7 @@"enterprise-description": "Scale your business securely while staying compliant.","free-description": "Designed for solo devs, side-projects, and experiments.","manage-invoices": "Gestionar facturas",+ "next-period-price": "Precio del próximo período","payment-info": "Información de pago","pending-description": "Por favor espere mientras confirmamos su pago. Esto suele tardar unos segundos.","pending-title": "Completando su compra...",diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.jsonindex e8aeae9c3b..3c85e9d5ec 100644--- a/frontend/src/react/locales/ja-JP.json+++ b/frontend/src/react/locales/ja-JP.json@@ -3707,6 +3707,7 @@"enterprise-description": "Scale your business securely while staying compliant.","free-description": "Designed for solo devs, side-projects, and experiments.","manage-invoices": "請求書を管理",+ "next-period-price": "次期間の金額","payment-info": "支払い情報","pending-description": "お支払いの確認中です。通常は数秒で完了します。","pending-title": "購入を完了しています...",diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.jsonindex a411243e54..d3677d6343 100644--- a/frontend/src/react/locales/vi-VN.json+++ b/frontend/src/react/locales/vi-VN.json@@ -3707,6 +3707,7 @@"enterprise-description": "Scale your business securely while staying compliant.","free-description": "Designed for solo devs, side-projects, and experiments.","manage-invoices": "Quản lý hóa đơn",+ "next-period-price": "Giá kỳ tiếp theo","payment-info": "Thông tin thanh toán","pending-description": "Vui lòng đợi trong khi chúng tôi xác nhận thanh toán. Thường chỉ mất vài giây.","pending-title": "Đang hoàn tất giao dịch...",diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.jsonindex 1a0d78a7b2..688d29ec3f 100644--- a/frontend/src/react/locales/zh-CN.json+++ b/frontend/src/react/locales/zh-CN.json@@ -3707,6 +3707,7 @@"enterprise-description": "安全合规地扩展您的业务。","free-description": "适用于个人开发者、副业项目和实验。","manage-invoices": "管理发票",+ "next-period-price": "下一周期价格","payment-info": "支付信息","pending-description": "请稍候,我们正在确认您的付款。通常只需几秒钟。","pending-title": "正在完成购买...",diff --git a/frontend/src/react/pages/settings/PurchaseSection.tsx b/frontend/src/react/pages/settings/PurchaseSection.tsxindex 98f55127d2..9b57cfeb07 100644--- a/frontend/src/react/pages/settings/PurchaseSection.tsx+++ b/frontend/src/react/pages/settings/PurchaseSection.tsx@@ -368,7 +368,7 @@ export function PurchaseSection({ onRequireEnterprise }: PurchaseSectionProps) {<div className="text-lg font-medium">{t("subscription.purchase.payment-info")}</div>- <div className="grid grid-cols-2 gap-4 text-sm">+ <div className="flex flex-wrap gap-x-12 gap-y-4 text-sm"><div><span className="text-control-placeholder">{t("subscription.purchase.total-price")}@@ -398,6 +398,17 @@ export function PurchaseSection({ onRequireEnterprise }: PurchaseSectionProps) {{paymentInfo.periodStart} - {paymentInfo.periodEnd}</div></div>+ {paymentInfo.nextPeriodPrice && (+ <div>+ <span className="text-control-placeholder">+ {t("subscription.purchase.next-period-price")}+ </span>+ <div className="font-medium">+ ${(Number(paymentInfo.nextPeriodPrice) / 100).toFixed(2)}{" "}+ {paymentInfo.currency.toUpperCase()}+ </div>+ </div>+ )}</div></div>)}diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts b/frontend/src/types/proto-es/v1/subscription_service_pb.d.tsindex 04f7a33933..ee1bc716b9 100644--- a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts@@ -201,6 +201,8 @@ export declare const GetPaymentInfoRequestSchema: GenMessage<GetPaymentInfoReque*/export declare type PaymentInfo = Message<"bytebase.v1.PaymentInfo"> & {/**+ * Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).+ ** @generated from field: string total_price = 1;*/totalPrice: string;@@ -233,6 +235,14 @@ export declare type PaymentInfo = Message<"bytebase.v1.PaymentInfo"> & {* @generated from field: bool cancel_at_period_end = 6;*/cancelAtPeriodEnd: boolean;++ /**+ * Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+ * Empty when the subscription will not renew (e.g. scheduled to cancel at period end).+ *+ * @generated from field: string next_period_price = 7;+ */+ nextPeriodPrice: string;};/**diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.js b/frontend/src/types/proto-es/v1/subscription_service_pb.jsindex 48ad520182..9eeed3a1f1 100644--- a/frontend/src/types/proto-es/v1/subscription_service_pb.js+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.js@@ -13,7 +13,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/subscription_service.proto.*/export const file_v1_subscription_service = /*@__PURE__*/- fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCInChRVcG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2hlY2tvdXRTZXNzaW9uUmVxdWVzdBoqLmJ5dGViYXNlLnYxLlZlcmlmeUNoZWNrb3V0U2Vzc2lvblJlc3BvbnNlIlOK6jAWYmIuc3Vic2NyaXB0aW9uLm1hbmFnZZDqMAGC0+STAi8SLS92MS9zdWJzY3JpcHRpb24vY2hlY2tvdXRTZXNzaW9uL3tzZXNzaW9uX2lkfRKCAQoRTGlzdFB1cmNoYXNlUGxhbnMSJS5ieXRlYmFzZS52MS5MaXN0UHVyY2hhc2VQbGFuc1JlcXVlc3QaJi5ieXRlYmFzZS52MS5MaXN0UHVyY2hhc2VQbGFuc1Jlc3BvbnNlIh6C0+STAhgSFi92MS9zdWJzY3JpcHRpb24vcGxhbnNCrgEKD2NvbS5ieXRlYmFzZS52MUIYU3Vic2NyaXB0aW9uU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);+ fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCInChRVcGxvYWRMaWNlbnNlUmVxdWVzdBIPCgdsaWNlbnNlGAEgASgJInsKFUNyZWF0ZVB1cmNoYXNlUmVxdWVzdBIjCgRwbGFuGAEgASgOMhUuYnl0ZWJhc2UudjEuUGxhblR5cGUSLgoIaW50ZXJ2YWwYAiABKA4yHC5ieXRlYmFzZS52MS5CaWxsaW5nSW50ZXJ2YWwSDQoFc2VhdHMYAyABKAUiOwoQUHVyY2hhc2VSZXNwb25zZRITCgtwYXltZW50X3Vyb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YXNlUGxhbnMSJS5ieXRlYmFzZS52MS5MaXN0UHVyY2hhc2VQbGFuc1JlcXVlc3QaJi5ieXRlYmFzZS52MS5MaXN0UHVyY2hhc2VQbGFuc1Jlc3BvbnNlIh6C0+STAhgSFi92MS9zdWJzY3JpcHRpb24vcGxhbnNCrgEKD2NvbS5ieXRlYmFzZS52MUIYU3Vic2NyaXB0aW9uU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);/*** Describes the message bytebase.v1.GetSubscriptionRequest.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 1173055e7f..c4520e4a6f 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -23928,6 +23928,7 @@ components:totalPrice:type: stringtitle: total_price+ description: Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).currency:type: stringtitle: currency@@ -23945,6 +23946,12 @@ components:type: booleantitle: cancel_at_period_enddescription: Whether the subscription is scheduled to cancel at the end of the current billing period.+ nextPeriodPrice:+ type: string+ title: next_period_price+ description: |-+ Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+ Empty when the subscription will not renew (e.g. scheduled to cancel at period end).title: PaymentInfoadditionalProperties: falsebytebase.v1.PermissionDeniedDetail:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 8f4dccae22..788b3dc1ca 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -11172,12 +11172,13 @@ SheetService manages SQL scripts and saved queries.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| total_price | [string](#string) | | |+| total_price | [string](#string) | | Total amount paid for the current billing period, in the smallest currency unit (e.g. cents). || currency | [string](#string) | | || period_start | [string](#string) | | || period_end | [string](#string) | | || invoice_url | [string](#string) | | Stripe Billing Portal URL for invoice management. || cancel_at_period_end | [bool](#bool) | | Whether the subscription is scheduled to cancel at the end of the current billing period. |+| next_period_price | [string](#string) | | Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents). Empty when the subscription will not renew (e.g. scheduled to cancel at period end). |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 6b7252c714..6734be39cb 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -31475,7 +31475,7 @@ Required. </p></td><td>total_price</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Total amount paid for the current billing period, in the smallest currency unit (e.g. cents). </p></td></tr><tr>@@ -31513,6 +31513,14 @@ Required. </p></td><td><p>Whether the subscription is scheduled to cancel at the end of the current billing period. </p></td></tr>+ <tr>+ <td>next_period_price</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+Empty when the subscription will not renew (e.g. scheduled to cancel at period end). </p></td>+ </tr>+</tbody></table>diff --git a/proto/v1/v1/subscription_service.proto b/proto/v1/v1/subscription_service.protoindex e045a64299..50ea6ad429 100644--- a/proto/v1/v1/subscription_service.proto+++ b/proto/v1/v1/subscription_service.proto@@ -134,6 +134,7 @@ message CancelPurchaseRequest {message GetPaymentInfoRequest {}message PaymentInfo {+ // Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).string total_price = 1;string currency = 2;string period_start = 3;@@ -142,6 +143,9 @@ message PaymentInfo {string invoice_url = 5;// Whether the subscription is scheduled to cancel at the end of the current billing period.bool cancel_at_period_end = 6;+ // Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).+ // Empty when the subscription will not renew (e.g. scheduled to cancel at period end).+ string next_period_price = 7;}enum BillingInterval {