Skip to main content
Docs

getOrganizationBillingSubscription()

Warning

This API is experimental and subject to change while Clerk Billing is under Beta. To mitigate potential disruptions, we recommend pinning your SDK and clerk-js package versions.

Retrieves an organization's billing subscription. Returns a CommerceSubscription.

function getOrganizationBillingSubscription(organizationId: string): Promise<CommerceSubscription>

Note

Importing clerkClient varies based on your framework. Refer to the Backend SDK overview for usage details, including guidance on how to access the userId and other properties.

const organizationId = 'org_123'

const subscription = await clerkClient.billing.getOrganizationBillingSubscription(organizationId)

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint GET /organizations/{organization_id}/billing/subscription. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on