Monetization & Billing
34. Site & Project Monetization Models
Monetize developer tools and SaaS platforms with Merchant of Record tax handling, subscription checkouts, paywalled feature gates, and usage metering.
monetization.ts
import { Polar } from '@polar-sh/sdk';
import { Resend } from 'resend';
const polar = new Polar({ accessToken: process.env.POLAR_ACCESS_TOKEN });
const resend = new Resend(process.env.RESEND_API_KEY);
// Polar.sh Merchant of Record (MoR) automated subscription & checkout checkout session
export async function createCheckout(customerEmail: string, productId: string) {
const checkout = await polar.checkouts.custom.create({
productId,
customerEmail,
successUrl: 'https://web-engine26.pages.dev/success?session_id={CHECKOUT_ID}'
});
return checkout.url;
}Site & Project Monetization Models
Monetizing developer software tools, SaaS products, and open-source packages requires choosing between Merchant of Record platforms, direct payment gateways, and usage-based billing.
- Merchant of Record (MoR) vs Direct Gateway: An MoR (such as Polar.sh) acts as the legal reseller, assuming all worldwide tax liabilities (EU VAT, US sales tax) so developers don't have to register across dozens of jurisdictions.
- Tiered Pro Paywalls: Protect premium server endpoints and client features with cryptographic session entitlements.
- Usage Metering: Bill consumers precisely for compute or API calls using Redis atomic counters synced to billing webhooks.
Monetization Strategy Explorer Business Models
Merchant of Record (Polar.sh / LemonSqueezy)
Provider: Polar.sh / LemonSqueezy
Global Tax & VAT Handling:
100% Automated (Global VAT, GST, Sales Tax handled by MoR)
Payout & Revenue Flow:
Direct bank transfer / Stripe Connect
Best For:
Solo developers, open-source creators selling Pro tiers or licenses globally without corporate tax entities