Engineering

Polar.sh SaaS Boilerplate: The Developer-First Stripe Alternative, Pre-Integrated

T

Touseef Ibn Khaleel

Indie Hacker

May 8, 2026
11 min read
Polar.sh SaaS Boilerplate: The Developer-First Stripe Alternative, Pre-Integrated

The Payment Stack Problem Every Indie Hacker Faces

Payment integration is one of the first real roadblocks in building a SaaS. Not because it's technically complex in the abstract — accepting a payment isn't hard. But because the full picture includes:

  • Setting up a merchant account and verifying your identity
  • Configuring webhooks and verifying webhook signatures
  • Handling subscription lifecycle events (created, updated, canceled, payment failed)
  • Storing and updating subscription state in your database
  • Calculating and remitting VAT or sales tax if you're selling to customers in the EU or specific US states
  • Building a customer portal so users can manage their subscription
  • Testing all of this in a sandbox environment before going live

Most tutorials cover the happy path — charge a card, get money. The operational reality of running a SaaS payment stack is significantly broader.

This is where Polar comes in — and why ShipQuick ships with Polar pre-integrated rather than defaulting to Stripe.


What Is Polar.sh?

Polar.sh is a developer-first billing and funding platform. It started as a way for open-source developers to accept funding from their GitHub repositories, and evolved into a full-featured payment platform for developer tools, indie SaaS products, and creator businesses.

Polar handles:

  • Subscriptions — recurring billing with automatic retry on failed payments
  • One-time purchases — sell a product, a license, or a lifetime deal
  • Digital products — sell access to GitHub repositories (exactly how ShipQuick itself works), files, or custom benefits
  • VAT/GST compliance — automatic calculation and remittance for global sales (more on this below)
  • Customer portal — users can manage their own subscriptions without you building custom UI
  • Developer-native UX — the Polar dashboard is built for developers, not finance teams

Why Polar Over Stripe for Indie Hackers

Stripe is the payment infrastructure backbone of the internet. It's excellent software with comprehensive documentation and supports virtually every use case imaginable. The question isn't whether Stripe is good — it is. The question is whether it's optimized for the indie hacker building their first SaaS.

The Stripe Complexity Tax

When you integrate Stripe directly, you make choices:

  • Stripe Checkout or custom payment form?
  • Stripe Billing or manual subscription management?
  • Stripe Tax or handle VAT yourself?
  • Stripe Customer Portal or build your own?
  • Stripe webhooks or polling?

Each of these is a decision with trade-offs, documentation to read, and code to write. A typical Stripe integration for a subscription SaaS involves managing: Customers, Products, Prices, Subscriptions, PaymentIntents, SetupIntents, Invoices, and WebhookEndpoints — each with their own API conventions.

Polar's API surface is smaller. You create products, you link checkout sessions, and you handle three core webhook events: subscription created, subscription updated, subscription canceled. The operational overhead is materially lower.

Automatic VAT/GST Handling

This is the detail that catches indie hackers off guard. If you sell to customers in the European Union, you are responsible for calculating and remitting VAT — a different rate in each of the 27 EU member states. In the US, sales tax rules vary by state. In Australia, there's GST. The list goes on.

Stripe Tax handles this, but it's an add-on that requires configuration, and you still need to file returns in relevant jurisdictions. The compliance burden doesn't disappear — it just gets calculated for you.

Polar handles VAT and GST automatically. They are the Merchant of Record, which means they take on the legal responsibility for tax compliance in jurisdictions where they operate. You sell to a customer in Germany; Polar calculates and remits German VAT. You don't think about it.

For an indie hacker selling globally without a finance team or an accounting firm on retainer, this is significant. One fewer category of regulatory exposure to manage.

GitHub Integration and the Developer Audience

Polar's native GitHub integration is a meaningful advantage if your product targets developers. When a customer purchases access to a GitHub repository (software licenses, starter kits, private packages), Polar handles the automatic GitHub repository invite — no manual access management, no custom webhook to write, no support email from a customer who didn't receive their invite.

ShipQuick itself uses this: when you purchase ShipQuick, Polar automatically grants you access to the private GitHub repository. It's the correct behavior, and it requires zero custom code.


How ShipQuick Integrates Polar

ShipQuick ships with Polar fully wired up. Here's what's pre-built:

Checkout Flow

ShipQuick includes a checkout page that creates a Polar checkout session server-side and redirects the customer. The product ID, price, and checkout parameters are configurable via environment variables — no hardcoded values to hunt down.

Webhook Handler

The Polar webhook handler in ShipQuick:

  1. Verifies the webhook signature (prevents spoofed events)
  2. Parses the event type
  3. Updates the user's subscriptionStatus and subscriptionId in MongoDB based on the event
  4. Handles these core events: subscription.created, subscription.updated, subscription.canceled, order.created

This is the part that takes most developers half a day to get right when building from scratch. In ShipQuick, it's done.

Subscription State in the Database

The MongoDB user model includes subscriptionStatus, subscriptionId, and polarCustomerId fields. The webhook handler keeps these fields synchronized with Polar's state automatically.

Your application code can check user.subscriptionStatus === 'active' to gate access to paid features — a clean, simple check with no additional API calls at runtime.

Purchase Success and Failure Pages

ShipQuick includes pre-built success and failure pages for the post-checkout flow, with appropriate messaging and next-step guidance for new customers.


The Polar + TanStack Start Combination

One reason ShipQuick integrates Polar particularly cleanly is TanStack Start's server function model. Webhook handlers in TanStack Start are explicit server functions — typed, isolated, and easy to test independently of the UI.

Compare this to Next.js, where webhook handlers live in app/api/webhook/route.ts and require understanding the App Router's handling of dynamic routes, request body parsing, and the interaction between Edge and Node.js runtimes.

In ShipQuick, the Polar webhook server function is:

// Simplified illustration
export const polarWebhookHandler = createServerFn('POST', async ({ request }) => {
  const payload = await request.text()
  const signature = request.headers.get('polar-signature')
  
  // Verify signature
  // Parse event
  // Update MongoDB user document
  // Return 200
})

The logic is in one place, the types flow from the Polar SDK, and the MongoDB update uses the same Mongoose models the rest of your application uses. There's no separate "API layer" to maintain.


Polar for Real Products: ShipQuick Case Studies

Proofly — A video testimonial platform with a free tier, a monthly subscription ($15/mo), and a lifetime deal. Polar handles all three pricing models in a single integration. When a user upgrades from free to the Studio plan, Polar fires a subscription.created event, and ShipQuick's webhook handler updates their subscriptionStatus to active. The feature gate check in the application is a single boolean.

Deen — Built on ShipQuick, the Polar integration provides the payment infrastructure for future premium features. The webhook handler and subscription model are already in place, so adding paid features is a matter of adding a gate check — the payment plumbing is done.


Getting Started With Polar in ShipQuick

To go from zero to accepting payments:

  1. Create a Polar account (free)
  2. Create your products and pricing in the Polar dashboard
  3. Add your Polar API key and webhook secret to .env.local
  4. Set your Product ID in the environment variables
  5. Deploy and test with Polar's sandbox environment

The ShipQuick documentation covers each environment variable in detail, including the exact webhook events to enable in the Polar dashboard and how to test the full subscription flow locally using Polar's sandbox mode.


Polar vs Stripe: The Honest Summary

Concern Polar Stripe
API complexity Low High (many primitives)
VAT/GST handling Automatic (MoR) Stripe Tax (add-on, you still file)
GitHub repo delivery Native Build it yourself
Customer portal Included Included
Developer UX Native focus Enterprise + developer
Ecosystem size Growing Very large
Documentation Excellent Comprehensive
Best for Indie hackers, dev tools Scale-ups, complex billing

Stripe is the better choice if you're building complex billing logic — metered billing, usage-based pricing with complex tiers, multi-currency with manual FX rates, or deeply customized checkout flows. At that level of complexity, Stripe's comprehensive API surface pays off.

Polar is the better choice if you're an indie hacker who wants to accept subscriptions and one-time payments, sell globally without thinking about VAT, and spend your time building the product rather than maintaining payment infrastructure.

ShipQuick is built for the second scenario.


Start Accepting Payments Today

ShipQuick ships with Polar configured, the webhook handler written, the database models updated, and the checkout flow tested. You configure three environment variables and you're accepting real payments.

For a comparison with other payment approaches in the boilerplate market, see ShipQuick vs ShipFast (which uses Stripe) and ShipQuick vs MakerKit (also Stripe).

Share this article

Newsletter

Get the latest updates and articles directly in your inbox.