From c19c89e6df1e1b0af6a12f9fd995b453a944b4d3 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 25 Oct 2024 16:29:20 -0400 Subject: [PATCH] collab: Include `checkout_complete` query parameter after checking out (#19763) This PR updates the checkout flow to include the `?checkout_complete=1` query parameter after successfully checking out. We'll use this on the account page to adapt the UI accordingly. Release Notes: - N/A --- crates/collab/src/api/billing.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/collab/src/api/billing.rs b/crates/collab/src/api/billing.rs index 5b65249e083f1..d431e4c043543 100644 --- a/crates/collab/src/api/billing.rs +++ b/crates/collab/src/api/billing.rs @@ -252,7 +252,10 @@ async fn create_billing_subscription( let default_model = llm_db.model(rpc::LanguageModelProvider::Anthropic, "claude-3-5-sonnet")?; let stripe_model = stripe_billing.register_model(default_model).await?; - let success_url = format!("{}/account", app.config.zed_dot_dev_url()); + let success_url = format!( + "{}/account?checkout_complete=1", + app.config.zed_dot_dev_url() + ); let checkout_session_url = stripe_billing .checkout(customer_id, &user.github_login, &stripe_model, &success_url) .await?;