Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/nasty-shirts-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/clerk-js': minor
'@clerk/types': minor
---

[Billing Beta] Update checkout.status type to be `'needs_confirmation' | 'completed'` instead of `string`.
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/CommerceCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe
plan!: CommercePlan;
planPeriod!: CommerceSubscriptionPlanPeriod;
planPeriodStart!: number | undefined;
status!: string;
status!: 'needs_confirmation' | 'completed';
totals!: CommerceCheckoutTotals;
isImmediatePlanChange!: boolean;

Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/commerce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ export interface CommerceCheckoutResource extends ClerkResource {
* <ClerkProvider clerkJsVersion="x.x.x" />
* ```
*/
status: string;
status: 'needs_confirmation' | 'completed';
/**
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ export interface CommerceCheckoutJSON extends ClerkResourceJSON {
plan: CommercePlanJSON;
plan_period: CommerceSubscriptionPlanPeriod;
plan_period_start?: number;
status: string;
status: 'needs_confirmation' | 'completed';
totals: CommerceCheckoutTotalsJSON;
is_immediate_plan_change: boolean;
}
Expand Down
Loading