Skip to content

Conversation

@sean-brydon
Copy link
Member

What does this PR do?

Adds source: "onboarding" metadata to Stripe subscriptions when users sign up to a team or organization from the onboarding v3 flow. This helps track which subscriptions originated from the onboarding flow for analytics and debugging purposes.

Changes:

  • Teams: Adds source: "onboarding" to subscription_data.metadata when isOnboarding is true
  • Organizations: Adds source: "onboarding" to subscription metadata for all organization onboarding subscriptions

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. For Teams (onboarding v3):

    • Go through the team creation flow from onboarding v3 (/onboarding/teams/details)
    • Complete the Stripe checkout
    • Verify in Stripe dashboard that the subscription has metadata.source = "onboarding"
  2. For Organizations (onboarding v3):

    • Go through the organization creation flow from onboarding v3
    • Complete the Stripe checkout
    • Verify in Stripe dashboard that the subscription has metadata.source = "onboarding"

Environment variables needed:

  • STRIPE_TEAM_MONTHLY_PRICE_ID
  • STRIPE_ORG_MONTHLY_PRICE_ID
  • Standard Stripe configuration

Human Review Checklist

  • Verify that isOnboarding flag correctly identifies onboarding v3 team signups vs other team creation paths
  • Confirm that OrganizationPaymentService.createSubscription is only called from onboarding flows (otherwise non-onboarding org subscriptions would also get this metadata)
  • Verify the empty metadata object {} when isOnboarding is false for teams is acceptable behavior

Link to Devin run: https://app.devin.ai/sessions/eb76f0a24ea447a983f1c90a6227234c
Requested by: @sean-brydon

…ing v3

When a user signs up to a team/org from onboarding v3, the subscription
now includes source: 'onboarding' in its metadata. This helps track
which subscriptions originated from the onboarding flow.

Changes:
- Add source: 'onboarding' to subscription_data.metadata in team checkout
  when isOnboarding is true
- Add source: 'onboarding' to subscription metadata for organization
  onboarding flow

Co-Authored-By: sean@cal.com <Sean@brydon.io>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@sean-brydon sean-brydon marked this pull request as ready for review January 9, 2026 14:27
@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Review Updated (UTC)
api-v2 Ignored Ignored Preview Jan 12, 2026 3:31am
cal Ignored Ignored Jan 12, 2026 3:31am
cal-companion Ignored Ignored Preview Jan 12, 2026 3:31am
cal-eu Ignored Ignored Jan 12, 2026 3:31am

@graphite-app graphite-app bot added core area: core, team members only consumer labels Jan 9, 2026
@graphite-app graphite-app bot requested a review from a team January 9, 2026 14:27
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@sean-brydon sean-brydon merged commit 58798f2 into main Jan 11, 2026
74 of 78 checks passed
@sean-brydon sean-brydon deleted the devin/onboarding-subscription-source-metadata-1767966491 branch January 11, 2026 21:49
Anshumancanrock pushed a commit to Anshumancanrock/cal.com that referenced this pull request Jan 12, 2026
…ing v3 (calcom#26619)

When a user signs up to a team/org from onboarding v3, the subscription
now includes source: 'onboarding' in its metadata. This helps track
which subscriptions originated from the onboarding flow.

Changes:
- Add source: 'onboarding' to subscription_data.metadata in team checkout
  when isOnboarding is true
- Add source: 'onboarding' to subscription metadata for organization
  onboarding flow

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants