Branded transactional receipts & licensing for Polar.sh merchant of record and micro-SaaS sales
Deliver pixel-perfect, custom-branded purchase receipts, license keys, and onboarding access emails from your own domain when customers buy through Polar.sh. Powered by Dual-DKIM, pre-send bounce defense, and 6,000 free monthly emails.
Drop into your application in under 60 seconds
Native typed interfaces with zero unnecessary dependencies. Built for standard fetch and modern edge runtimes.
// app/api/webhooks/polar/route.ts
// Listen to Polar.sh order.created events to send branded React Email receipts
import { Webhook } from 'svix';
import { headers } from 'next/headers';
import { SadaSend } from 'sadasend';
const sadasend = new SadaSend({ apiKey: process.env.SADASEND_API_KEY! });
export async function POST(req: Request) {
const headerPayload = await headers();
const svixId = headerPayload.get('webhook-id') || headerPayload.get('svix-id');
const svixTimestamp = headerPayload.get('webhook-timestamp') || headerPayload.get('svix-timestamp');
const svixSignature = headerPayload.get('webhook-signature') || headerPayload.get('svix-signature');
const payload = await req.json();
const body = JSON.stringify(payload);
const wh = new Webhook(process.env.POLAR_WEBHOOK_SECRET!);
let evt: { type: string; data: { customer: { email: string; name?: string }; product: { name: string }; amount: number; currency: string } };
try {
evt = wh.verify(body, {
'svix-id': svixId!,
'svix-timestamp': svixTimestamp!,
'svix-signature': svixSignature!,
}) as typeof evt;
} catch {
return new Response('Invalid webhook signature', { status: 400 });
}
if (evt.type === 'order.created') {
const { customer, product, amount, currency } = evt.data;
const formattedPrice = (amount / 100).toFixed(2);
await sadasend.emails.send({
from: 'billing@yourdomain.com',
to: customer.email,
subject: `Receipt for your purchase of ${product.name}`,
html: `<p>Hi ${customer.name || 'there'},</p>
<p>Thank you for purchasing <strong>${product.name}</strong>!</p>
<p>Total Paid: ${formattedPrice} ${currency.toUpperCase()}</p>
<p>Your license key and onboarding access are now active.</p>`,
verifyBeforeSend: true,
});
}
return new Response('OK', { status: 200 });
}Verify Polar.sh Svix webhooks on order.created and dispatch branded receipts from your own domain in sub-150ms with pre-send bounce defense.
Engineered for high deliverability and zero incident risk
Every layer from synchronous request validation to per-key rate limits is designed to keep critical transactional dispatches fast, reliable, and contained.
Branded Custom Domain Delivery
Send transactional receipts and license keys from billing@yourdomain.com with Dual-DKIM rather than generic platform notifications.
Sub-150ms Order-to-Inbox Dispatch
High-throughput MX connection pooling delivers receipts and access keys before customers even close the checkout confirmation window.
React Email Template Support
Render modular, responsive HTML receipts with dynamic itemized breakdowns, currency formatting, and tax details using @react-email/render.
SpendGuard™ Balance Ceilings
Safeguard viral product launches from runaway webhook loops or sudden egress spikes with SadaSend’s server-enforced $0 balance floor.
SadaSend vs Default Stripe / Unbranded Mail
Why indie SaaS founders route Polar.sh purchase webhooks through SadaSend instead of relying on default unbranded notifications.
| Feature & Capability | SadaSend | Default Stripe / Unbranded Mail |
|---|---|---|
| Custom Domain Invoicing | 100% Your Domain (Dual-DKIM) | Shared unbranded envelope |
| Sub-150ms License Dispatch | Instant edge injection | Queued behind bulk blasts |
| In-Flight Pre-Send Bounce Shield | Yes (blocks dead mailboxes) | No (penalized on bounce) |
| Free Monthly Allowance | 6,000 / mo | Limited trial or paid add-on |
| Outbound Balance Protection | SpendGuard ($0 floor) | Uncapped billing exposure |
Verified as of November 2026. Competitor features and pricing are based on public documentation and may vary.
Start with 6,000 emails every month at zero cost
No artificial paywalls on security. Unlike providers that reserve recipient allowlists and approval workflows for enterprise tiers, every SadaSend account receives full safety controls from day one.
Everything you need to know about polar.sh email receipts
Clear, transparent answers on deliverability, API authentication, and rate limits.
Related developer guides and architectural tutorials
Explore step-by-step production implementation blueprints, benchmarks, and protocols.
REST API Reference & Endpoints
Complete REST API reference for sending emails, managing API keys, tracking delivery events, and configuring recipient allowlists with low latency.
React Email Templates & Integration
How to build, preview, and send transactional emails using React Email and JSX components with zero-bleed preheaders and Outlook MSO support on SadaSend.
Official Client SDKs (TypeScript & Python)
Official zero-dependency client SDKs for SadaSend. TypeScript and Python packages are live on npm and PyPI with typed results and auto-idempotency.
How to Build Branded Polar.sh Email Receipts and License Delivery (2026 Guide)
A production-ready walkthrough for building branded Polar.sh purchase receipts, license delivery, and subscription notifications with Next.js 15 and React Email.
Better-Auth Email Verification Setup: The Complete 2026 Guide
A production-ready walkthrough for wiring Better-Auth email verification, password resets, and magic links with SadaSend and React Email in Next.js 15 and Bun.
Sending Transactional Email in Next.js 15 (App Router & React Email)
Render responsive React components to clean HTML strings and dispatch them via Next.js 15 Server Actions with zero external SMTP dependencies.