> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On Stripe invoice overdue

> Run an automation when a Stripe invoice becomes overdue.

Use `stripe.onInvoiceOverdue` to run an automation when a Stripe invoice becomes overdue.

## Example

```ts automations/stripe-on-stripe-invoice-overdue.automation.ts theme={null}
import { automation } from "automate.ax"
import { stripe } from "automate.ax/stripe"

export default automation("On Stripe invoice overdue", () => {
  const event = stripe.onInvoiceOverdue()

  event.transform(({ id, data }) => ({
    eventId: id,
    stripeObjectId: data.object.id,
  }))
})
```

Optional static `account` defaults to the project binding.

## Trigger data

Returns the complete Stripe Event envelope with `type: "invoice.overdue"`. The typed `data.object` contains the Stripe resource for this event.

Stripe generates `invoice.overdue` only when a [Stripe Billing Automation](https://docs.stripe.com/billing/automations) sends that webhook after an invoice becomes overdue.

Automate.ax verifies Stripe's signature against the exact request body before accepting an event. Event fields use camel case, while metadata keys remain unchanged. Stripe doesn't guarantee event delivery order, so use `id`, resource IDs, and timestamps when coordinating related events.

See [On Stripe event](/reference/integrations/stripe/triggers/on-stripe-event) for the shared envelope and delivery behavior.
