Documentation Index
Fetch the complete documentation index at: https://docs.getlaunch.it/llms.txt
Use this file to discover all available pages before exploring further.
URL Utilities
Get the full URL path based on your site URL and locale settings.
The path to append to the base URL
The locale to use for i18n routing. Will default to the user’s locale if not provided and language routing is enabled.
The complete URL path including the site URL and locale if i18n routing is enabled
Request Utilities
Extract the client IP address from incoming requests, supporting both Cloudflare and Vercel deployments.
The incoming Next.js request object
Logging
Create a log entry in the database for tracking and monitoring.
The source of the log entry
Additional logging options
Purchase Management
Purchase Utilities
Get the configuration object for a purchase.
The purchase database object
The configuration object for the purchase
Get the configured name for a purchase.
The purchase database object
The configured name of the purchase
Check if a user has an active purchase for a specific product.
purchases
Purchase[] | null
required
Array of user’s purchases
configPurchase
OneTimePurchaseProduct
required
The product configuration to check against
The active purchase object if found, undefined otherwise
Subscription Utilities
Get the configuration object for a subscription plan.
subscription
Subscription | null
required
The subscription database object
The configuration object for the subscription plan
Get the configured name for a subscription plan.
subscription
Subscription | null
required
The subscription database object
The configured name of the subscription plan
Check if a user has an active subscription for a specific plan.
subscription
Subscription | null
required
The subscription database object
configPlan
SubscriptionProduct
required
The plan configuration to check against
True if the user has an active subscription for the specified plan