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

# processPayoutForWebhookWorkflow

> Apply a payout provider webhook event to the matching account or payout.

Maps a normalized provider webhook action to a status update: account events set the payout account to `active`, `restricted`, or `rejected`; payout events set the payout to `processing`, `paid`, `failed`, or `canceled`. Unsupported actions (or events without an ID) are ignored. Triggered by the `payout-webhook` subscriber after the payout provider parses the raw webhook payload.

## Usage

```ts theme={null}
import { processPayoutForWebhookWorkflow } from "@mercurjs/core/workflows"

await processPayoutForWebhookWorkflow(container).run({
  input: {
    action: "payout.paid",
    data: { id: "payout_123" },
  },
})
```

## Input

<ParamField body="action" type="string" required>One of `account.activated`, `account.restricted`, `account.rejected`, `payout.processing`, `payout.paid`, `payout.failed`, `payout.canceled`, `not_supported`.</ParamField>

<ParamField body="data" type="object">
  Event target; nothing happens when omitted.

  <Expandable title="properties">
    <ParamField body="id" type="string" required>The ID of the payout account (for `account.*` actions) or the payout (for `payout.*` actions).</ParamField>
  </Expandable>
</ParamField>

## Result

<ResponseField name="result" type="void">No return value; the matching account or payout status is updated as a side effect.</ResponseField>
