To pay by invoice or for any other questions, contact
sales@zulip.com.
diff --git a/web/src/billing/event_status.ts b/web/src/billing/event_status.ts
index c9f0d12f15..9e4baf52e8 100644
--- a/web/src/billing/event_status.ts
+++ b/web/src/billing/event_status.ts
@@ -13,6 +13,7 @@ const stripe_response_schema = z.object({
stripe_payment_intent_id: z.string().optional(),
status: z.string(),
is_manual_license_management_upgrade_session: z.boolean().optional(),
+ tier: z.number(),
event_handler: z
.object({
status: z.string(),
@@ -47,6 +48,7 @@ function handle_session_complete_event(session: StripeSession): void {
case "card_update_from_upgrade_page":
redirect_to = helpers.get_upgrade_page_url(
session.is_manual_license_management_upgrade_session,
+ session.tier,
billing_base_url,
);
break;
diff --git a/web/src/billing/helpers.ts b/web/src/billing/helpers.ts
index 5e1baded35..7957c05aef 100644
--- a/web/src/billing/helpers.ts
+++ b/web/src/billing/helpers.ts
@@ -182,11 +182,15 @@ export function redirect_to_billing_with_successful_upgrade(billing_base_url: st
export function get_upgrade_page_url(
is_manual_license_management_upgrade_session: boolean | undefined,
+ tier: number,
billing_base_url: string,
): string {
- let redirect_to = "/upgrade";
- if (is_manual_license_management_upgrade_session) {
- redirect_to += "/?manual_license_management=true";
+ const base_url = billing_base_url + "/upgrade/";
+ let params = `tier=${String(tier)}`;
+ if (is_manual_license_management_upgrade_session !== undefined) {
+ params += `&manual_license_management=${String(
+ is_manual_license_management_upgrade_session,
+ )}`;
}
- return billing_base_url + redirect_to;
+ return base_url + "?" + params;
}
diff --git a/web/src/billing/page_params.ts b/web/src/billing/page_params.ts
index e0f03f1512..b5c5434bdc 100644
--- a/web/src/billing/page_params.ts
+++ b/web/src/billing/page_params.ts
@@ -8,6 +8,7 @@ export const page_params: {
monthly_price: number;
seat_count: number;
billing_base_url: string;
+ tier: number;
} = $("#page-params").data("params");
if (!page_params) {