Skip to content

Commit 3d1d871

Browse files
fix(types,clerk-js): Remove statement_id from the checkout resource (#6437)
Co-authored-by: Bryce Kalow <[email protected]>
1 parent 7a46679 commit 3d1d871

File tree

7 files changed

+7
-16
lines changed

7 files changed

+7
-16
lines changed

.changeset/wicked-cases-sink.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
'@clerk/shared': minor
4+
'@clerk/types': minor
5+
---
6+
7+
[Billing Beta] Remove `statement_id` from the checkout resource.

packages/clerk-js/src/core/modules/checkout/__tests__/manager.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const createMockCheckoutResource = (overrides: Partial<CommerceCheckoutResource>
1010
status: 'pending',
1111
externalClientSecret: 'cs_test_123',
1212
externalGatewayId: 'gateway_123',
13-
statement_id: 'stmt_123',
1413
totals: {
1514
totalDueNow: { amount: 1000, currency: 'USD', currencySymbol: '$', amountFormatted: '10.00' },
1615
credit: { amount: 0, currency: 'USD', currencySymbol: '$', amountFormatted: '0.00' },

packages/clerk-js/src/core/resources/CommerceCheckout.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe
1414
id!: string;
1515
externalClientSecret!: string;
1616
externalGatewayId!: string;
17-
statement_id!: string;
1817
paymentSource?: CommercePaymentSource;
1918
plan!: CommercePlan;
2019
planPeriod!: CommerceSubscriptionPlanPeriod;
@@ -37,7 +36,6 @@ export class CommerceCheckout extends BaseResource implements CommerceCheckoutRe
3736
this.id = data.id;
3837
this.externalClientSecret = data.external_client_secret;
3938
this.externalGatewayId = data.external_gateway_id;
40-
this.statement_id = data.statement_id;
4139
this.paymentSource = data.payment_source ? new CommercePaymentSource(data.payment_source) : undefined;
4240
this.plan = new CommercePlan(data.plan);
4341
this.planPeriod = data.plan_period;

packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ describe('useCheckout type tests', () => {
138138
| 'id'
139139
| 'externalClientSecret'
140140
| 'externalGatewayId'
141-
| 'statement_id'
142141
| 'totals'
143142
| 'isImmediatePlanChange'
144143
| 'planPeriod'
@@ -151,7 +150,6 @@ describe('useCheckout type tests', () => {
151150
| 'id'
152151
| 'externalClientSecret'
153152
| 'externalGatewayId'
154-
| 'statement_id'
155153
| 'totals'
156154
| 'isImmediatePlanChange'
157155
| 'planPeriod'

packages/shared/src/react/hooks/useCheckout.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export const useCheckout = (options?: Params): __experimental_UseCheckoutReturn
8080
id: null,
8181
externalClientSecret: null,
8282
externalGatewayId: null,
83-
statement_id: null,
8483
status: null,
8584
totals: null,
8685
isImmediatePlanChange: null,

packages/types/src/commerce.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,15 +1459,6 @@ export interface CommerceCheckoutResource extends ClerkResource {
14591459
* ```
14601460
*/
14611461
externalGatewayId: string;
1462-
/**
1463-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
1464-
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
1465-
* @example
1466-
* ```tsx
1467-
* <ClerkProvider clerkJsVersion="x.x.x" />
1468-
* ```
1469-
*/
1470-
statement_id: string;
14711462
/**
14721463
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
14731464
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.

packages/types/src/json.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,6 @@ export interface CommerceCheckoutJSON extends ClerkResourceJSON {
866866
id: string;
867867
external_client_secret: string;
868868
external_gateway_id: string;
869-
statement_id: string;
870869
payment_source?: CommercePaymentSourceJSON;
871870
plan: CommercePlanJSON;
872871
plan_period: CommerceSubscriptionPlanPeriod;

0 commit comments

Comments
 (0)