diff --git a/.changeset/wicked-cases-sink.md b/.changeset/wicked-cases-sink.md new file mode 100644 index 00000000000..5cf13d980e4 --- /dev/null +++ b/.changeset/wicked-cases-sink.md @@ -0,0 +1,7 @@ +--- +'@clerk/clerk-js': minor +'@clerk/shared': minor +'@clerk/types': minor +--- + +[Billing Beta] Remove `statement_id` from the checkout resource. diff --git a/packages/clerk-js/src/core/modules/checkout/__tests__/manager.spec.ts b/packages/clerk-js/src/core/modules/checkout/__tests__/manager.spec.ts index d897309b08d..e9ef1a04b5d 100644 --- a/packages/clerk-js/src/core/modules/checkout/__tests__/manager.spec.ts +++ b/packages/clerk-js/src/core/modules/checkout/__tests__/manager.spec.ts @@ -10,7 +10,6 @@ const createMockCheckoutResource = (overrides: Partial status: 'pending', externalClientSecret: 'cs_test_123', externalGatewayId: 'gateway_123', - statement_id: 'stmt_123', totals: { totalDueNow: { amount: 1000, currency: 'USD', currencySymbol: '$', amountFormatted: '10.00' }, credit: { amount: 0, currency: 'USD', currencySymbol: '$', amountFormatted: '0.00' }, diff --git a/packages/clerk-js/src/core/resources/CommerceCheckout.ts b/packages/clerk-js/src/core/resources/CommerceCheckout.ts index d4114ecb24b..0ae7e3c9bfd 100644 --- a/packages/clerk-js/src/core/resources/CommerceCheckout.ts +++ b/packages/clerk-js/src/core/resources/CommerceCheckout.ts @@ -14,7 +14,6 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe id!: string; externalClientSecret!: string; externalGatewayId!: string; - statement_id!: string; paymentSource?: CommercePaymentSource; plan!: CommercePlan; planPeriod!: CommerceSubscriptionPlanPeriod; @@ -37,7 +36,6 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe this.id = data.id; this.externalClientSecret = data.external_client_secret; this.externalGatewayId = data.external_gateway_id; - this.statement_id = data.statement_id; this.paymentSource = data.payment_source ? new CommercePaymentSource(data.payment_source) : undefined; this.plan = new CommercePlan(data.plan); this.planPeriod = data.plan_period; diff --git a/packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts b/packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts index d1a5c9b6053..4ea2f874968 100644 --- a/packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts +++ b/packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts @@ -138,7 +138,6 @@ describe('useCheckout type tests', () => { | 'id' | 'externalClientSecret' | 'externalGatewayId' - | 'statement_id' | 'totals' | 'isImmediatePlanChange' | 'planPeriod' @@ -151,7 +150,6 @@ describe('useCheckout type tests', () => { | 'id' | 'externalClientSecret' | 'externalGatewayId' - | 'statement_id' | 'totals' | 'isImmediatePlanChange' | 'planPeriod' diff --git a/packages/shared/src/react/hooks/useCheckout.ts b/packages/shared/src/react/hooks/useCheckout.ts index 59f443668ab..64bd15b1f38 100644 --- a/packages/shared/src/react/hooks/useCheckout.ts +++ b/packages/shared/src/react/hooks/useCheckout.ts @@ -80,7 +80,6 @@ export const useCheckout = (options?: Params): __experimental_UseCheckoutReturn id: null, externalClientSecret: null, externalGatewayId: null, - statement_id: null, status: null, totals: null, isImmediatePlanChange: null, diff --git a/packages/types/src/commerce.ts b/packages/types/src/commerce.ts index b883887ccdc..2fd659e090e 100644 --- a/packages/types/src/commerce.ts +++ b/packages/types/src/commerce.ts @@ -1459,15 +1459,6 @@ export interface CommerceCheckoutResource extends ClerkResource { * ``` */ externalGatewayId: string; - /** - * @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. - * @example - * ```tsx - * - * ``` - */ - statement_id: string; /** * @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. diff --git a/packages/types/src/json.ts b/packages/types/src/json.ts index ee85a4fb648..1c3d415e48a 100644 --- a/packages/types/src/json.ts +++ b/packages/types/src/json.ts @@ -866,7 +866,6 @@ export interface CommerceCheckoutJSON extends ClerkResourceJSON { id: string; external_client_secret: string; external_gateway_id: string; - statement_id: string; payment_source?: CommercePaymentSourceJSON; plan: CommercePlanJSON; plan_period: CommerceSubscriptionPlanPeriod;