Sell software globally. We handle taxes, compliance, payments, and payouts.
Website · Docs · API Reference · Discord · Twitter
CREEM is a Merchant of Record (MoR) that lets software companies sell globally without worrying about sales tax, VAT, compliance, or payment infrastructure. We act as the legal seller of your software, so you can focus on building.
What we handle for you:
- 🌍 Global tax compliance across 140+ countries (US state taxes, EU VAT, UK VAT, and more)
- 💳 Payment processing with optimized checkout experiences
- 🔄 Subscription management with trials, upgrades, downgrades, and dunning
- 💸 Automated payouts to your bank account
- 📊 Revenue analytics and reporting
- 🛡️ Fraud protection and chargeback handling
- 🏪 Storefronts for no-code product pages
- 🤝 Affiliate programs with built-in tracking and payouts
This is a pnpm monorepo containing all of CREEM's open-source packages, SDKs, and documentation.
creem/
├── packages/
│ ├── creem-sdk/ # Official TypeScript SDK (auto-generated via Speakeasy)
│ ├── creem-io/ # Lightweight TypeScript wrapper (framework-agnostic)
│ ├── nextjs/ # Next.js integration (@creem_io/nextjs)
│ ├── better-auth/ # Better Auth plugin (@creem_io/better-auth)
│ ├── convex/ # Convex integration (@creem_io/convex)
│ ├── webhook-types/ # Shared webhook type definitions
│ └── docs/ # Documentation site (Mintlify)
├── .github/workflows/ # CI, release, and SDK generation pipelines
├── turbo.json # Turborepo build configuration
└── pnpm-workspace.yaml # Workspace package definitions
| Package | npm | Description |
|---|---|---|
creem |
Official TypeScript SDK with full API coverage, MCP server, and standalone functions | |
creem_io |
Lightweight wrapper SDK, framework-agnostic, zero dependencies | |
@creem_io/nextjs |
Next.js integration with React components and webhook handlers | |
@creem_io/better-auth |
Better Auth plugin for payments and subscription management | |
@creem_io/convex |
Convex billing component with backend helpers and React/Svelte widgets | |
@creem_io/webhook-types |
Shared TypeScript types for webhook events |
# Official SDK (recommended for most use cases)
npm install creem
# Or the lightweight wrapper
npm install creem_io
# Next.js integration
npm install @creem_io/nextjs
# Better Auth plugin
npm install @creem_io/better-auth
# Convex integration
npm install @creem_io/conveximport { Creem } from "creem";
const creem = new Creem({
apiKey: process.env.CREEM_API_KEY,
});
const checkout = await creem.checkouts.create({
productId: "prod_123",
successUrl: "https://yourapp.com/success",
});
// Redirect your customer to checkout.checkoutUrlimport { Creem } from "creem_io";
const creem = new Creem({ apiKey: process.env.CREEM_API_KEY });
// Verify and parse webhook payload
const event = creem.webhooks.verify(rawBody, signature, webhookSecret);
switch (event.eventType) {
case "checkout.completed":
// Provision access
break;
case "subscription.canceled":
// Revoke access
break;
}// app/api/checkout/route.ts
import { createCheckout } from "@creem_io/nextjs/server";
export async function POST() {
const checkout = await createCheckout({
productId: "prod_123",
successUrl: "/success",
});
return Response.redirect(checkout.checkoutUrl);
}// app/api/webhook/creem/route.ts
import { handleWebhook } from "@creem_io/nextjs/server";
export const POST = handleWebhook({
onCheckoutCompleted: async (event) => {
// Provision access for the customer
},
onSubscriptionCanceled: async (event) => {
// Revoke access
},
});The full documentation lives in packages/docs and is deployed at docs.creem.io.
Built with Mintlify, it covers:
- Getting Started guides for new merchants
- API Reference with interactive examples
- SDK guides for every package in this repo
- Webhook events and payload schemas
- MoR explainers on tax compliance and payouts
# Install Mintlify CLI
npm i -g mintlify
# Start local dev server
cd packages/docs
mintlify devCREEM provides llms.txt and llms-full.txt for AI agents and LLMs to consume structured documentation. We also ship Skill Files for agent frameworks that support them.
# Clone the repo
git clone https://github.com/armitage-labs/creem.git
cd creem
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Type check
pnpm typecheckThis repo uses Turborepo for orchestrating builds across packages.
# Build everything
pnpm build
# Build a specific package
pnpm turbo build --filter=creem
# Run tests for a specific package
pnpm turbo test --filter=@creem_io/better-auth
# Format code
pnpm format
# Check formatting
pnpm format:checkWe use Changesets for versioning and publishing.
# Create a changeset after making changes
pnpm changeset
# Version packages (CI does this automatically)
pnpm version-packages
# Publish (CI does this automatically)
pnpm release┌─────────────────────────────────────────────────┐
│ Your Application │
├──────────┬──────────┬──────────┬────────────────┤
│ creem │ creem_io │ nextjs │ better-auth │
│ (SDK) │(wrapper) │ (React) │ (plugin) │
├──────────┴──────────┴──────────┴────────────────┤
│ @creem_io/webhook-types │
├──────────────────────────────────────────────────┤
│ CREEM API (v1) │
│ https://api.creem.io/v1 │
└──────────────────────────────────────────────────┘
creem(SDK): Auto-generated from the OpenAPI spec via Speakeasy. Full API coverage, retry logic, MCP server support. This is the recommended SDK for most use cases.creem_io(wrapper): Hand-written lightweight SDK with zero dependencies. Framework-agnostic, works anywhere Node.js runs. Ideal for minimal setups or when you want full control.@creem_io/nextjs: React components and server utilities built specifically for Next.js App Router. Drop-in checkout buttons, webhook route handlers, and subscription access helpers.@creem_io/better-auth: Plugin for the Better Auth framework. Syncs CREEM customers with your auth users, manages subscriptions in your database, and handles webhooks automatically.@creem_io/webhook-types: Shared TypeScript type definitions for all CREEM webhook events. Used internally by other packages.
| Workflow | Trigger | Description |
|---|---|---|
| CI | Push/PR to main |
Builds, typechecks, tests, and lints changed packages |
| Release | Push to main |
Creates release PRs via Changesets, publishes to npm |
| SDK Generation | Daily / manual | Regenerates the creem SDK from the latest OpenAPI spec |
| Docs Deploy | Changes to packages/docs |
Deploys documentation to docs.creem.io via Mintlify |
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a branch for your feature or fix
git checkout -b feat/my-feature
- Make your changes and add tests where appropriate
- Create a changeset if your change affects a published package
pnpm changeset
- Run checks to make sure everything passes
pnpm build && pnpm test && pnpm typecheck
- Open a Pull Request against
main
- Follow the existing code style (Prettier is configured)
- Write tests for new functionality
- Keep PRs focused on a single change
- Update documentation for user-facing changes
- Use conventional commits for commit messages
creem(SDK): This package is auto-generated. Don't edit files insrc/directly. Instead, update the OpenAPI spec or Speakeasy configuration.packages/docs: Documentation uses Mintlify MDX format. API reference pages are generated fromopenapi.json. See the docs README for details.creem_io: When adding new API resources, follow the existing pattern inresources/and add corresponding types intypes/.
- 💬 Discord for questions and discussion
- 🐛 GitHub Issues for bug reports
- 💡 Feature Requests on Featurebase
- 🐦 Twitter/X for updates
This project is licensed under the MIT License.