Skip to main content

getOrganizationBillingSubscription()

Important

Billing regularly introduces new features and UI changes to Clerk's components. If you'd like to remain on a specific version of Clerk's components or SDK, you can follow the steps in the pinning documentation.

Retrieves an Organization's Billing Subscription. Returns a BillingSubscription.

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

Note

Using clerkClient varies based on the SDK you're using. Refer to the 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