---
title: "Stripe, Dodo and Creem"
description: "Sell through Stripe Managed Payments, Dodo Payments or Creem instead of Polar: what each merchant of record offers, the keys, the product ids setupBilling maps, how credits work, the webhook, what stays on Polar, and the account review."
canonical_url: "https://nuxt-backend.dev/docs/services/merchants"
---
# Stripe, Dodo and Creem

> Sell through Stripe Managed Payments, Dodo Payments or Creem instead of Polar: what each merchant of record offers, the keys, the product ids setupBilling maps, how credits work, the webhook, what stays on Polar, and the account review.

Version: nuxt-backend 0.6.x · Tab: Services · Kind: how-to · Status: experimental

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

- [Source](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/providers/index.ts)

Polar is the provider the billing layer is built on. Three other merchants of record sell through it too: Stripe Managed Payments, Dodo Payments and Creem. Each one is the seller in its own name, so it collects and remits sales tax and VAT and emails the receipts, as Polar does. Set `BILLING_PROVIDER`, give `setupBilling` the catalog and the provider's product ids, and the same `useBilling`, credits, quotas, checkout and `/billing/events` route run on it.

<warning>

**Early support.** Plans, the free plan, packs, credits, features, quotas, trials, checkout, the portal, plan changes, cancellation, order history and the webhook work on all three. Pause works on Dodo and Creem, and refunds and invoice links on Stripe and Dodo: [the table](#what-each-one-offers) has each provider's. Some calls are Polar's alone for now, and refuse with `unavailable` (reason `provider_unsupported`) on another provider: [the list](#what-stays-on-polar) is below.

</warning>

## What each one offers

Checked against each provider's docs on 2026-11-24.

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      Stripe Managed Payments
    </th>
    
    <th>
      Dodo Payments
    </th>
    
    <th>
      Creem
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      One-time purchases and subscriptions
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      Customer portal
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      Plan changes, with proration
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      Cancel at period end, and take it back
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes (taking it back is untested)
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      Pause and resume
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      Refunds through the API
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      No: refund in its dashboard
    </td>
  </tr>
  
  <tr>
    <td>
      Invoice or receipt link
    </td>
    
    <td>
      Yes
    </td>
    
    <td>
      Yes (the PDF itself)
    </td>
    
    <td>
      No: Creem emails each one
    </td>
  </tr>
  
  <tr>
    <td>
      Signed success redirect
    </td>
    
    <td>
      No
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Yes: <code>
        verifyCheckoutRedirect
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Webhook signature
    </td>
    
    <td>
      <code>
        Stripe-Signature
      </code>
    </td>
    
    <td>
      Standard Webhooks
    </td>
    
    <td>
      <code>
        creem-signature
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      API version
    </td>
    
    <td>
      <code>
        2026-04-22.dahlia
      </code>
      
      , pinned
    </td>
    
    <td>
      Unversioned
    </td>
    
    <td>
      <code>
        /v1
      </code>
    </td>
  </tr>
</tbody>
</table>

Stripe Managed Payments sells digital products only: software, SaaS and digital content. Each product needs a tax code that Stripe marks "Eligible for Managed Payments" ([set up](https://docs.stripe.com/payments/managed-payments/set-up)).

## Keys

The same env names Polar uses, plus the provider's name:

```dotenv
BILLING_PROVIDER=stripe          # stripe, dodo or creem; polar when unset
BILLING_ACCESS_TOKEN=sk_test_... # the provider's secret API key
BILLING_WEBHOOK_SECRET=whsec_... # the signing secret of the webhook endpoint
```

Use the test-mode key outside production and the live key on it. Dodo and Creem have a separate host for each mode, and the adapter picks it from `BACKEND_ENVIRONMENT`.

## The catalog and the product ids

Create each paid product in the provider's dashboard: a product with a monthly and a yearly price on Stripe, or one product per interval on Dodo and Creem, and one one-time product per credit pack. `billing sync` creates Polar's products only, so name the provider's ids in `setupBilling`, by catalog key and billing environment:

```ts [backend/billing.ts]
import { setupBilling } from 'nuxt-backend/billing'
import { components } from './_generated/api'
import definition from './billing.catalog'
import { email } from './email'

export const billing = setupBilling(components, {
  email,
  commerce: {
    definition,
    products: {
      sandbox: { 'pro': 'price_1Q…', 'pro:year': 'price_1R…', 'credits100': 'price_1S…' },
      production: { 'pro': 'price_1T…', 'pro:year': 'price_1U…', 'credits100': 'price_1V…' },
    },
  },
})
```

A plan's monthly price goes under the plan's key and its yearly one under `<plan>:year`; a pack goes under its key. On Stripe the id is the price's (`price_…`), on Dodo and Creem the product's. The free plan needs no id: it is the app's own, and every new billing entity starts on it with its welcome credits. A catalog key you give no id is simply not for sale.

The catalog stays the source of truth for what each product grants: the plan's features, quotas and credits per cycle, a pack's credits, the trial. After a deploy that changes it, run `npx convex run billing:syncProducts` so `getPricing` and `/pricing` read the new prices. Set the same prices in the provider's dashboard, because the provider charges what it holds.

## How credits work here

Polar keeps the credit balances on its meters. Stripe, Dodo and Creem have no such meters, so the backend component keeps them, in a ledger of grants:

- **A plan's credits** are granted when its invoice is paid, once per order, and the free plan's each month on the scheduler. A plan's grant without `rollover` ends the remainder of the grant before it.
- **A pack's credits** are granted when its order is paid, and kept.
- **A refund** of the whole order, or a dispute, takes its credits back, as far as the balance still holds them.

`spendCredits`, `useCredits`, metered AI and the quotas read and write the same balance as on Polar.

## The webhook

Point the provider's webhook endpoint at `https://<your deployment>.convex.site/billing/events`. `registerBackendRoutes` mounts the provider's handler there when `BILLING_PROVIDER` names one: there is nothing to wire. Subscribe to these events:

- **Stripe:** `checkout.session.completed`, `checkout.session.async_payment_succeeded`, `invoice.paid`, `customer.subscription.created`, `customer.subscription.updated`, `customer.subscription.deleted`, `refund.created`, `refund.updated`, `charge.dispute.created`. Set the endpoint's API version to `2026-04-22.dahlia`.
- **Dodo:** `payment.succeeded`, every `subscription.*` event, `refund.succeeded`, `refund.failed`, `dispute.opened`.
- **Creem:** `checkout.completed`, every `subscription.*` event, `refund.created`, `dispute.created`.

The route is the guarded one Polar's takes: it answers 403 to a delivery whose signature fails, 503 without a secret and 413 over 1 MB, skips a delivery it already handled, and logs each one. Each checkout carries the billing entity in its metadata, so a paid order or a subscription's change finds its entity, keeps the subscription and the order, grants the credits and refreshes the plan the app reads. A delivery that names no entity the app knows is acknowledged and logged as `billing.commerce_unknown_entity`: a checkout opened outside the app, from a payment link or the dashboard, carries none.

To react to an event yourself, pass `commerce.onEvent`. It runs after the package kept its records, with one neutral event: `order.paid`, `order.refunded`, `order.disputed` or `subscription.updated`. It must be idempotent, because providers retry until they get a 2xx.

```ts [backend/billing.ts]
commerce: {
  definition,
  products,
  onEvent: async (ctx, event) => {
    if (event.type === 'order.paid') await ctx.runMutation(internal.purchases.thank, { entityId: event.entityId ?? '' })
  },
},
```

Grant access when the order is paid, never on the success page: `useBilling` follows the webhook, as it does on Polar.

## What stays on Polar

These are Polar's for now. On another provider they refuse with `unavailable` (reason `provider_unsupported`), and the message names the call:

- Gifts and plan passes, and the `<GiftForm>` that sells them.
- Catalog discounts and a checkout's `discountId`, the cancel flow's pause and discount offers (it makes only its downgrade offer here), and the reverse trial.
- A pause that resumes on a date (`pauseSubscription({ resumesAt })`), and a checkout's `currency` in a catalog priced in more than one: each provider product sells in its own.
- Usage history (`getUsageHistory`), the admin Revenue view, referral rewards and withdrawal by the EU button.
- Taking back a plan change the provider scheduled, and `reportCost`, which records nothing.
- `npx nuxt-backend billing sync`, which writes Polar's products and ids.
- Refunds through the API on Creem, and an invoice link on Creem: refund in its dashboard, and Creem emails each receipt.

## Account review

Each provider reviews your business before it pays out. Start a week or two before launch:

- **Stripe:** activate the account, then turn on Managed Payments in the Dashboard. Keep the support email current: Stripe may refund a customer itself after 48 hours without your answer ([how it works](https://docs.stripe.com/payments/managed-payments/how-it-works)).
- **Dodo:** verify the business and the owner's identity, add a payout account, and list your website with its terms, privacy and refund pages.
- **Creem:** verify the store, and check that the product you sell is allowed.

Every review reads your site. Have the pricing, the terms, the privacy notice and the refund policy public before you apply, with the company name and address. [Legal pages](https://nuxt-backend.dev/docs/ship/compliance/privacy) prints them from `appConfig.backend.legal`.

## Related

- [Polar](https://nuxt-backend.dev/docs/services/polar), the provider the whole billing layer runs on.
- [Follow subscription law](https://nuxt-backend.dev/docs/ship/compliance/subscriptions), with the consent digital content needs in the EU.
- [Set up billing](https://nuxt-backend.dev/docs/build/billing/setup).


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
