ingestlayer/recipes

Track new subscriptions

Know the second a customer starts paying — which plan, how much, monthly or annual — so revenue moments reach the team while they still feel like wins.

the event

Emit subscription.created once; route it anywhere below.

  • customer_idstring
  • planstringpro | scale
  • mrrnumberminor units
  • intervalstringmonth | year
  • trialbooleanconverted from trial
emit subscription.created
import { ingest } from "@ingestlayer/sdk";

await ingest("subscription.created", {
  customer_id: sub.customer,
  plan:        sub.plan.nickname,
  mrr:         sub.plan.amount,
  interval:    sub.plan.interval,
  trial:       sub.trial_end != null,
}, {
  idempotencyKey: sub.id,
});

send it to