> ## 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.

# Cancel SetupIntent

> Cancel a Stripe SetupIntent that is no longer needed.

Use `stripe.cancelSetupIntent` to abandon a setup flow in a cancelable state.

```ts automations/stripe-cancel-setup-intent.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { stripe } from "automate.ax/stripe"

export default automation("Cancel SetupIntent", () => {
  onDashboardRun({ title: "Cancel SetupIntent" })
  stripe.cancelSetupIntent({
    setupIntentId: "seti_123",
    cancellationReason: "requested_by_customer",
  })
})
```

## Inputs

`setupIntentId` is required. Stripe accepts `abandoned`, `duplicate`, or `requested_by_customer` as the cancellation reason when applicable.

## Output

Returns the canceled SetupIntent.
