> ## 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 Checkout delayed payment failed

> Run an automation when a delayed Checkout Session payment fails.

Use `stripe.onCheckoutSessionAsyncPaymentFailed` when Stripe reports that a delayed payment method failed after Checkout completed.

## Example

```ts automations/stripe-on-checkout-delayed-payment-failed.automation.ts theme={null}
import { automation } from "automate.ax"
import { stripe } from "automate.ax/stripe"

export default automation("Checkout delayed payment failed", () => {
  const event = stripe.onCheckoutSessionAsyncPaymentFailed()

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

Optional static `account` defaults to the project binding.

## Trigger data

Returns the complete Stripe Event envelope with `type: "checkout.session.async_payment_failed"`. The typed `data.object` is the Checkout Session whose delayed payment failed.

See [On Stripe event](/reference/integrations/stripe/triggers/on-stripe-event) for signature verification, ordering, account permissions, and delivery behavior.
