URL Utilities

getUrl
function
Get the full URL path based on your site URL and locale settings.

Request Utilities

getIP
function
Extract the client IP address from incoming requests, supporting both Cloudflare and Vercel deployments.

Logging

createLog
function
Create a log entry in the database for tracking and monitoring.

Purchase Management

Purchase Utilities

findConfiguredPurchase
function
Get the configuration object for a purchase.
getPurchaseName
function
Get the configured name for a purchase.
hasActivePurchase
function
Check if a user has an active purchase for a specific product.

Subscription Utilities

findConfiguredPlan
function
Get the configuration object for a subscription plan.
getPlanName
function
Get the configured name for a subscription plan.
hasActivePlan
function
Check if a user has an active subscription for a specific plan.