Skip to content

Commit

Permalink
collab: Include checkout_complete query parameter after checking out (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
maxdeviant authored Oct 25, 2024
1 parent 507929c commit c19c89e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/collab/src/api/billing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit c19c89e

Please sign in to comment.