Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions .changeset/wicked-cases-sink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/clerk-js': minor
'@clerk/shared': minor
'@clerk/types': minor
---

[Billing Beta]: Remove `statement_id` from the checkout resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove square-bracket syntax – it creates a link reference and hides the description.

In Markdown, [Billing Beta]: … is parsed as a link reference definition, so the rendered body will be empty and the changeset description will not appear in release notes.
Replace the brackets with plain text.

-[Billing Beta]: Remove `statement_id` from the checkout resource.
+Billing Beta: Remove `statement_id` from the checkout resource.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[Billing Beta]: Remove `statement_id` from the checkout resource.
Billing Beta: Remove `statement_id` from the checkout resource.
🤖 Prompt for AI Agents
In .changeset/wicked-cases-sink.md at line 7, the changeset description uses
square brackets around "Billing Beta" which Markdown interprets as a link
reference, causing the description to be hidden in release notes. Remove the
square brackets and replace "[Billing Beta]" with plain text "Billing Beta" to
ensure the description is visible.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const createMockCheckoutResource = (overrides: Partial<CommerceCheckoutResource>
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' },
Expand Down
2 changes: 0 additions & 2 deletions packages/clerk-js/src/core/resources/CommerceCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ describe('useCheckout type tests', () => {
| 'id'
| 'externalClientSecret'
| 'externalGatewayId'
| 'statement_id'
| 'totals'
| 'isImmediatePlanChange'
| 'planPeriod'
Expand All @@ -151,7 +150,6 @@ describe('useCheckout type tests', () => {
| 'id'
| 'externalClientSecret'
| 'externalGatewayId'
| 'statement_id'
| 'totals'
| 'isImmediatePlanChange'
| 'planPeriod'
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/react/hooks/useCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 0 additions & 9 deletions packages/types/src/commerce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* <ClerkProvider clerkJsVersion="x.x.x" />
* ```
*/
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.
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading