Skip to content

feat(clerk-js,localizations,shared,ui): Add support for promo codes at checkout - #9317

Open
dstaley wants to merge 6 commits into
ds.feat/billing-discountsfrom
ds.feat/promo-codes
Open

feat(clerk-js,localizations,shared,ui): Add support for promo codes at checkout#9317
dstaley wants to merge 6 commits into
ds.feat/billing-discountsfrom
ds.feat/promo-codes

Conversation

@dstaley

@dstaley dstaley commented Aug 3, 2026

Copy link
Copy Markdown
Member

Description

This PR adds support for applying/removing promo codes from checkout.

CleanShot 2026-08-03 at 14 42 58@2x

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Stack created with GitHub Stacks CLIGive Feedback 💬

@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9ed2677

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@clerk/localizations Minor
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/ui Minor
@clerk/react Patch
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/headless Patch
@clerk/hono Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/swingset Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 3, 2026 9:05pm
swingset Ready Ready Preview Aug 3, 2026 9:05pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9317

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9317

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9317

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9317

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9317

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9317

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9317

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9317

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9317

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9317

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9317

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9317

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9317

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9317

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9317

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9317

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9317

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9317

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9317

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9317

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9317

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9317

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9317

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9317

commit: 9ed2677

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-03T21:07:54.034Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 1
🟢 Additions 2

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.25.10
Recommended bump: MINOR → 4.26.0

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: __internal_LocalizationResource
// ... 222 unchanged lines elided ...
        };
      };
      checkout: {
+       addPromoCode: LocalizationValue;
+       applyPromoCode: LocalizationValue;
+       discount: LocalizationValue;
+       promoCodePlaceholder: LocalizationValue;
+       removePromoCode: LocalizationValue;
        title: LocalizationValue;
        title__paymentSuccessful: LocalizationValue;
        title__subscriptionSuccessful: LocalizationValue;
// ... 1839 unchanged lines elided ...

Static analyzer: Breaking change in type alias __internal_LocalizationResource: Type changed: {locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca…{locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca…

🤖 AI review (reclassified as non-breaking) (72%): The before/after snippets are structurally identical at the visible boundaries; the elided section grew by ~5 lines (1987→1992), which indicates new fields were added to __internal_LocalizationResource. Since LocalizationResource is declared as DeepPartial<DeepLocalizationWithoutObjects<__internal_LocalizationResource>>, consumers only read (output) or optionally supply partial values of this type, so adding new required fields to the internal source type does not break existing consumers who are not required to supply those fields.

🟢 Additions (2)

Added: BillingNamespace.updateCheckout
+ updateCheckout: (params: UpdateCheckoutParams) => Promise<BillingCheckoutResource>;

Added property BillingNamespace.updateCheckout

Added: UpdateCheckoutParams
+ type UpdateCheckoutParams = WithOptionalOrgType<{
+   id: string;
+   promoCode: string;
+ }>;

Added type alias UpdateCheckoutParams


Report generated by Break Check

Last ran on 9ed2677.

@dstaley
dstaley force-pushed the ds.feat/promo-codes branch from 43a1425 to ca5eb62 Compare August 3, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant