The @creem_io/better-auth/server entry point provides direct Creem helpers for code that does not
need to go through a Better Auth endpoint.
These helpers use your secret API key and must run on the server. They do not automatically infer
the signed-in user. Authenticate the request and authorize every customer or subscription ID
before calling them.
Create a checkout
Unlike the client endpoint, the direct helper requires customer information because it has no
Better Auth session to inspect.
Open the customer portal
Verify that the stored customer ID belongs to the authenticated account.
Manage subscriptions
Search transactions
Create a raw SDK client
Use createCreemClient() when the helper functions do not cover the API operation you need:
For general SDK coverage, see the TypeScript SDK documentation.
Utility functions
The server entry point also exports:
checkSubscriptionAccess() and getActiveSubscriptions() are also exported, but their database
mode expects a raw query-builder interface that is not compatible with every Better Auth adapter.
Prefer the authenticated hasAccessGranted() endpoint or query your own database through its
supported adapter API.