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

# Update refund

> Update metadata on a Stripe refund.

Use `stripe.updateRefund` to update metadata on a Stripe refund.

## Example

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

export default automation("Update refund", () => {
  onDashboardRun({ title: "Update refund" })

  stripe.updateRefund({
    refundId: "re_123",
    metadata: { ticketId: "support_123" },
  })
})
```

## Inputs

`refundId` is required and accepts any valid Stripe Refund ID. Stripe documents `re_`, `rcb_`, and `pyr_` Refund ID families. Stripe refund updates support metadata. `idempotencyKey` is optional.

Inputs use camel case and accept compatible signals. Automate.ax converts provider fields to Stripe's wire format. Metadata keys remain unchanged.

## Output

Returns the updated Stripe Refund. Output fields use camel case.
