API Documentation
RESTful API documentation for developers
https://api.lotstech.comAPI Key (Bearer token or X-API-Key header)
12
Authentication
All API requests require authentication using an API key. You can create an API key from your dashboard.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.lotstech.com/api/v1/lotstech/entitlements/acquirebilling
/api/v1/lotstech/entitlements/acquireAcquire Resource Entitlement
lotstech_entitlement_acquireAtomically acquire a named resource and assess its current UTC service day.
/api/v1/lotstech/create-checkout-linkCreate Checkout Link
lotstech_create_checkout_linkCreate a Polar checkout link for product purchase. Returns a checkout URL where users can complete payment. Supports monthly, yearly, and one-time (lifetime) billing cycles. For credits products with custom pricing ("Pay What You Want"), pass custom_amount to pre-fill the amount. The checkout link includes user email pre-fill and custom metadata for tracking.
/api/v1/lotstech/create-customer-portal-linkCreate Customer Portal Link
lotstech_create_customer_portal_linkCreate a Polar customer portal link for the signed-in user's paid plan, where they can upgrade, downgrade, switch billing cycle or cancel. Returns { available: false } for gift or credits-only accounts.
/api/v1/lotstech/project-productsGet Project Products
lotstech_get_project_productsGet all available products for a specific project (SaaS). Returns product listings with pricing details for monthly, yearly, and one-time purchases.
/api/v1/lotstech/user-subscriptionGet User Subscription
lotstech_get_user_subscriptionGet the authenticated user's active subscription for a specific project. Returns subscription status, billing cycle, and product details.
/api/v1/lotstech/entitlementsList Resource Entitlements
lotstech_entitlement_resourcesList active resource holdings owned by the authenticated payer.
/api/v1/lotstech/entitlements/projectProject Resource Entitlements
lotstech_entitlement_projectionProject every held resource against the contract active at a timestamp; use for cancellation and renewal previews.
/api/v1/lotstech/entitlements/quoteQuote Resource Entitlement
lotstech_entitlement_quoteQuote plan coverage and credit-funded overflow without changing state.
/api/v1/lotstech/entitlements/releaseRelease Resource Entitlement
lotstech_entitlement_release_v2Release a named resource; future daily billing stops and the product resource is not deleted.
credits
/api/v1/lotstech/deduct-user-creditsDeduct User Credits
lotstech_deduct_user_creditsDeduct credits from the authenticated user's balance for feature usage. Validates sufficient balance before deduction. Automatically calculates balance_after and sets transaction_type to 'usage'. Supports reference_type and reference_id for linking to external records.
/api/v1/lotstech/credit-historyGet Credit History
lotstech_get_credit_historyGet the authenticated user's credit transaction history with pagination. Can optionally filter by project_id to show only transactions for a specific SaaS. Returns all credit transactions including purchases, usage, refunds, bonuses, and admin adjustments. Shows which project consumed credits and when.
/api/v1/lotstech/user-creditsGet User Credits
lotstech_get_user_creditsGet the authenticated user's current credit balance. Credits are shared across all LOTS products and never expire.