Skip to content

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

Merged
dstaley merged 12 commits into
ds.feat/billing-discountsfrom
ds.feat/promo-codes
Aug 5, 2026
Merged

feat(clerk-js,localizations,shared,ui): Add support for promo codes at checkout#9317
dstaley merged 12 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-05 at 11 23 11@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: 387444c

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 5, 2026 5:04pm
swingset Ready Ready Preview Aug 5, 2026 5:04pm

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: 387444c

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-05T17:08:35.386Z

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.26.0
Recommended bump: MINOR → 4.27.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;
// ... 1843 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 and after snippets are structurally identical at the visible boundaries; the only difference is '1991 lines elided' vs '1996 lines elided', indicating ~5 new fields were added. __internal_LocalizationResource is used only as the source type for LocalizationResource which extends DeepPartial<DeepLocalizationWithoutObjects<__internal_LocalizationResource>>, making the resolved consumer-facing type a deeply partial (all-optional) version — so consumers reading LocalizationResource are never required to supply the new fields, and adding optional output fields is non-breaking.

🟢 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 387444c.

@dstaley
dstaley force-pushed the ds.feat/billing-discounts branch from 53e7936 to 6af04e8 Compare August 3, 2026 20:08
@dstaley
dstaley force-pushed the ds.feat/promo-codes branch from d527677 to 43a1425 Compare August 3, 2026 20:08
@dstaley
dstaley force-pushed the ds.feat/billing-discounts branch from 6af04e8 to 73f5daf Compare August 3, 2026 20:13
@dstaley
dstaley force-pushed the ds.feat/promo-codes branch from 43a1425 to ca5eb62 Compare August 3, 2026 20:13
@github-actions github-actions Bot added the react label Aug 3, 2026
@dstaley
dstaley merged commit 4e89c8c into ds.feat/billing-discounts Aug 5, 2026
47 of 52 checks passed
@dstaley
dstaley deleted the ds.feat/promo-codes branch August 5, 2026 20:08
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