getUserBillingSubscription()
Gets the BillingSubscription for the given User.
function getUserBillingSubscription(userId: string): Promise<BillingSubscription>- Name
userId- Type
string- Description
The ID of the User to get the Billing Subscription for.
const userId = 'user_123'
const subscription = await clerkClient.billing.getUserBillingSubscription(userId)Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint GET /users/{user_id}/billing/subscription. See the BAPI reference for more information.
Feedback
Last updated on