The access endpoint tells you whether a customer is entitled to use a product — either because they have an active subscription or because they made a confirmed one-time payment. This is the check the AI SDK, LangChain, and UploadThing adapters run automatically, but you can call it directly from your own server-side logic.
Present when type is "subscription". The subscription status (active, trialing, or paused). Subscriptions scheduled to cancel remain active until current_period_end.
The @stellartools/core SDK exposes this as customers.access.verify(customerId, productId):
import { StellarTools } from "@stellartools/core";const stellar = new StellarTools({ api_key: process.env.STELLAR_TOOLS_API_KEY! });const { has_access, grant } = await stellar.customers.access.verify("cus_xxx", "prod_xxx");if (!has_access) { throw new Error("Customer does not have access to this product");}// grant.type tells you whether it's a subscription or one-time paymentif (grant?.type === "subscription") { console.log("Active subscription:", grant.subscription_id);}