Typescript SDK
Type-safe SDK for the Creem API – manage SaaS subscriptions, products, and revenue in TypeScript/Node.js environments.
The Creem TypeScript SDK is available as an npm package for seamless integration with your TypeScript and Node.js projects. The SDK is also available on GitHub for those who prefer to explore the source code directly.
Installation
Install with your preferred package manager:
Note: If using Yarn, install
zod
as a peer dependency.
Quick Start
Functions Overview
The SDK exposes all major Creem API resources and operations:
- Products:
retrieveProduct
,createProduct
,searchProducts
- Customers:
retrieveCustomer
,generateCustomerLinks
- Subscriptions:
retrieveSubscription
,cancelSubscription
,updateSubscription
,upgradeSubscription
- Checkout:
retrieveCheckout
,createCheckout
- Licenses:
activateLicense
,deactivateLicense
,validateLicense
- Discounts:
retrieveDiscount
,createDiscount
,deleteDiscount
- Transactions:
searchTransactions
You can find a detailed documentation of all functions and their parameters in the SDK README
Server Selection (Test Mode)
Use a specific server by index or URL, by default the SDK will use the production server:
Example: Deleting a Discount
Retry Strategy
Override retry behavior per call or globally:
Standalone Functions
All SDK methods are also available as named imports for minimal bundle size:
References
For feedback or issues, open a PR or issue on the Creem SDK GitHub.