The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
/*
* Copyright 2025 Daytona Platforms Inc.
* Modified by BoxLite AI, 2025-2026
* SPDX-License-Identifier: AGPL-3.0
*/
import { useQuery } from '@tanstack/react-query'
import { useApi } from '../useApi'
import { useConfig } from '../useConfig'
import { queryKeys } from './queryKeys'
export const useOrganizationBillingPortalUrlQuery = ({
organizationId,
enabled = true,
}: {
organizationId: string
enabled?: boolean
}) => {
const { billingApi } = useApi()
const config = useConfig()
return useQuery<string | null>({
queryKey: queryKeys.billing.portalUrl(organizationId),
queryFn: () => billingApi.getOrganizationBillingPortalUrl(organizationId),
enabled: Boolean(enabled && organizationId && config.billingApiUrl),
})
}