ingestlayer/recipes

Track canceled subscriptions

Catch every cancellation with the plan, the tenure, and the reason attached — so the team can reach out while the relationship is still warm.

the event

Emit subscription.canceled once; route it anywhere below.

  • customer_idstring
  • planstring
  • mrrnumberminor units lost
  • reasonstringfree text, optional
  • tenure_daysnumber
emit subscription.canceled
import { ingest } from "@ingestlayer/sdk";

await ingest("subscription.canceled", {
  customer_id: sub.customer,
  plan:        sub.plan.nickname,
  mrr:         sub.plan.amount,
  reason:      survey.reason,
  tenure_days: daysSince(sub.created),
}, {
  idempotencyKey: sub.id,
});

send it to