Skip to main content
Fires when a customer’s account falls behind on an invoice. Track it once per invoice, then use it to start collection flows and to count accounts at risk of involuntary churn. Upstack doesn’t generate this SaaS event for you, so your app or billing webhook has to send it. Use it alongside payment_failed, not instead of it. payment_failed fires on every failed charge attempt, so one invoice can produce several. invoice_past_due marks the moment the account itself is behind on payment.

JavaScript

Track it from the browser when your app first learns the invoice is past due, for example when it renders a billing banner. Pass a stable eventId as the third argument so repeat page loads count as one event.

Server-side

Billing changes usually reach you as webhooks, where window._upstack() isn’t available. Send the event from your server with POST /tr/api/events instead. The API key needs the events:write scope. This Express handler watches Stripe’s customer.subscription.updated event. When the subscription status is past_due, it looks up the subscription’s latest invoice and sends invoice_past_due to Upstack.
Stripe sends customer.subscription.updated for any change to the subscription, so a past-due subscription can trigger the handler more than once. The eventId takes care of that: Upstack skips an event whose eventId it has already seen in the last 30 days, so each invoice is counted once. If you bill with invoices that have a due date instead of automatic charges, Stripe’s invoice.overdue event is the closer match. It fires a set number of days after an invoice’s due date, and you choose the number of days in Stripe’s billing automations. Its payload is the invoice itself, so you can skip the stripe.invoices.retrieve call.

Properties

Upstack doesn’t reject an invoice_past_due event with missing properties, but send accountId and invoiceId so you can tell events apart later.
Send value as well as amount if you want the money owed to show in reports. Upstack’s Invoice Past Due Value measure adds up value. It ignores amount.

When to fire

  • A subscription’s status changes to past_due (Stripe customer.subscription.updated)
  • An invoice with a due date is still unpaid after that date (Stripe invoice.overdue)
  • Your own billing system flags an invoice as overdue
Don’t fire it on each failed charge. That’s payment_failed.

Where it goes

  • Reports. Three measures are available on custom dashboards: Invoice Past Due (count), Invoice Past Due Value, and Cost per Invoice Past Due.
  • Klaviyo. Sent by default as the metric Invoice Past Due - Upstack, so you can start a collection flow from it. See Klaviyo.
  • Meta, Microsoft Ads and Reddit. Sent by default as a custom event named invoice_past_due. Meta needs the custom event approved before you can optimize on it. See How to approve Meta custom events.
  • Other destinations. Not sent by default. Add it on the destination’s Event Mappings tab with a destination event mapping. LinkedIn, Snapchat, AppLovin, and NewsBreak can’t receive custom events.

payment_failed

Each failed charge attempt, usually before the invoice goes past due

invoice_paid

The invoice is settled and the account recovers

invoice_created

The invoice is issued

subscription_churned

The subscription ends after collection fails
For every SaaS event in one place, see the SaaS events reference.