Skip to content

fix(billing): refuse self-serve Enterprise checkout with a client error - #10469

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/enterprise-self-serve-checkout-500
Nov 27, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/enterprise-self-serve-checkout-500

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Self-serve checkout (/subscription/upgrade) now refuses plan: 'enterprise' with a 400 before taking the checkout admission claim
  • Enterprise is issued by the team with its own Stripe price and metadata. The Stripe plugin's placeholder price can never check out, and its write of enterprise onto a pending subscription row failed the check_enterprise_metadata constraint, so the caller got a 500

Type of Change

  • Bug fix

Testing

  • lib/billing/authorization.test.ts: Enterprise refused with a 400, Pro and Team admitted. The refusal case fails with the guard removed
  • biome, check:api-validation:strict, check:test-patterns

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Enterprise is issued by the team with its own Stripe price and metadata. A self-serve upgrade
naming it wrote the plan onto a pending subscription row, which the Enterprise metadata
constraint rejected, and the caller got a 500. The checkout hook now refuses it with a 400
before taking the admission claim.
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 27, 2026 10:59pm UTC

Request Review

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Refuses self-serve Enterprise checkout with a 400 before claiming checkout admission.

  • Self-serve Enterprise checkout now stops with a client error.

Reviews (1) · Last reviewed commit: "fix(billing): refuse self-serve Enterpri..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 055c1a6 into staging Nov 27, 2026
83 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/enterprise-self-serve-checkout-500 branch November 27, 2026 23:06

This branch was previously deployed

1 inactive deployment
Preview — 4f2bd34e Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant