All skills

Billing emails

billing-emails
PaidPaymentsVersion 1.0.0

The subscription emails Creem leaves to you (welcome, failed payment, cancellation, reminders), queued from signed webhooks and sent once each through Resend, SES or SMTP.

Full description

Adds the subscription emails Creem does not send itself - welcome, trial ending, yearly renewal reminder, failed payment with one follow-up, cancellation scheduled (with resume link) and subscription ended - driven by Creem webhooks through a deduplicated outbox, so retried or resent webhooks never email twice and a later payment cancels the dunning follow-up. Sends through Resend, Amazon SES (SigV4, no SDK) or Mailpit for local testing, with a fresh Creem customer-portal link in every email. Ships Next.js App Router routes (webhook, cron, dev preview), SQLite or Postgres outbox, a zero-dependency core, 19 offline tests built on real Creem test-mode payloads, a template check, an email preview and checker, and an SPF/DKIM/DMARC check. Use when the user wants billing, dunning, renewal, trial or cancellation emails for a Creem subscription.

A sample Next.js app in Creem test mode with Mailpit as the inbox: a real test purchase and cancellation through creem listen, then a failed renewal replayed from Creem's past_due shape. · Recorded 2026-11-03

  1. 1Subscribe at $9 a month and pay in the Creem test checkout with the test card (sped up 2.5x)
  2. 2The cron route sends the queued welcome email: renewal date December 3, 2026 and a link to the customer portal
  3. 3Cancel at period end: Creem sends subscription.scheduled_cancel and the email says access lasts until December 3, 2026, with a resume button
  4. 4Terminal: 19 tests pass; a replayed past_due event queues the email and a 3-day follow-up, the cron sends one, and a later subscription.paid cancels the follow-up
  5. 5The payment-failed email in the inbox, with an Update payment method button

Previews

What it does

The subscription emails Creem leaves to you (welcome, failed payment, cancellation, reminders), queued from signed webhooks and sent once each through Resend, SES or SMTP.

  • Six templates mapped to Creem events: welcome, trial ending, renewal reminder, payment failed (plus one follow-up), cancel scheduled, subscription ended. No receipts: Creem already sends those
  • The webhook only verifies the creem-signature and writes to an outbox; a cron route sends what is due. Stable dedupe keys mean a Creem retry or a manual resend never sends twice
  • A successful retry cancels the pending payment-failed follow-up, and a resume brings back the renewal reminder that the cancel removed
  • Each send asks Creem for a fresh customer portal link, passes the dedupe key as the provider's idempotency key, and backs off on 429 and 5xx
  • Senders for Resend, Amazon SES (SigV4, no SDK), Mailpit/SMTP and a log sender; SQLite or Postgres outbox; plain-text part, preheader and a rendered-email check for every template
  • Scripts: 19 offline tests on real Creem payloads, email previews, signed event replay against localhost, and an SPF/DKIM/DMARC check for your sending domain
Try it with this prompt
Use the billing-emails skill to add the subscription emails to my Next.js app on Creem: welcome, failed payment and cancellation, sent through Resend from billing@mail.myapp.com.

Full instructions are included with purchase

This is a paid skill. Buy it on its own or get every skill with a plan. Buyers download it from this page or their account.

Outline

  1. 01When to use / when not to
  2. 02What you get
  3. 03Steps
  4. 04Rules
  5. 05Done when
  6. 06Troubleshooting

What's inside

30 files: SKILL.md, 7 scripts, 12 references, 9 templates and assets, 1 tests.

billing-emails/
  • SKILL.md10.2 KB
  • assets/(9)48.5 KB
    • lib/(1)34.4 KB
      • billing-emails-core.mjs34.4 KB
    • nextjs/(8)14.2 KB
      • src/(6)13.2 KB
        • app/(3)4.6 KB
          • api/(2)2.6 KB
            • cron/(1)1.2 KB
              • billing-emails/(1)1.2 KB
                • route.ts1.2 KB
            • webhooks/(1)1.4 KB
              • creem/(1)1.4 KB
                • route.ts1.4 KB
          • dev/(1)2.0 KB
            • emails/(1)2.0 KB
              • page.tsx2.0 KB
        • lib/(3)8.5 KB
          • billing-emails-core.d.mts5.4 KB
          • billing-emails-pg.ts618 B
          • billing-emails.ts2.5 KB
      • .env.example937 B
      • vercel.json84 B
  • references/(12)31.7 KB
    • fixtures/(9)21.1 KB
      • checkout.completed.json2.6 KB
      • constructed.subscription.paid.yearly.json2.8 KB
      • constructed.subscription.past_due.json2.1 KB
      • constructed.subscription.trialing.json2.1 KB
      • README.md1.2 KB
      • subscription.active.json2.0 KB
      • subscription.canceled.json2.7 KB
      • subscription.paid.json2.8 KB
      • subscription.scheduled_cancel.json2.8 KB
    • copy-rules.md2.4 KB
    • creem-events.md5.7 KB
    • deliverability.md2.6 KB
  • scripts/(8)31.3 KB
    • template-check/(1)5.1 KB
      • routes.test.ts5.1 KB
    • _cli.mjs2.1 KB
    • check_dns.mjs3.5 KB
    • check_nextjs_template.sh2.2 KB
    • preview_emails.mjs2.0 KB
    • replay_event.mjs2.1 KB
    • selftest.mjs12.9 KB
    • send_test_emails.mjs1.3 KB

Questions

What does Billing emails do?

The subscription emails Creem leaves to you (welcome, failed payment, cancellation, reminders), queued from signed webhooks and sent once each through Resend, SES or SMTP.

Which agents does it work with?

Claude Code, Codex, Cursor and any other agent that reads the Agent Skills format (a folder with SKILL.md). Paste the install prompt into your agent, or unzip the folder into its skills directory.

What is in the download?

30 files: SKILL.md, 7 scripts, 12 references, 9 templates and assets, 1 tests.

How much is it?

$6.99 one-time on its own, with 12 months of updates. Yearly and lifetime plans include every paid skill.

Can I get a refund?

A first payment can be refunded in full within 14 days if no paid skill was downloaded. After a download, no refund unless a skill is defective and we can't fix it.

How do updates work?

One-time purchases get 12 months of updates; yearly and lifetime get updates while active. Download again from this page or your account. Current version: 1.0.0.