---
title: "Replay a gateway webhook whose processing failed"
description: "Re-runs reconciliation for a webhook left at outcome: error or outcome: ignored."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/webhooks/replay-a-gateway-webhook-whose-processing-failed"
---
# Replay a gateway webhook whose processing failed

> Re-runs reconciliation for a webhook left at outcome: error or outcome: ignored.

<api-operation method="POST" path="/v1/businesses/{biz}/gateway_webhooks/{id}/replay">
<template v-slot:docs="">

Re-runs reconciliation for a webhook left at `outcome: error` or `outcome: ignored`. A failed event is answered 502 and also retried by us, independent of the gateway: about 25 tries over about 4 days. If the last try fails, the webhook's `error` ends with a note that automatic retries stopped, and this call runs it again.

A `processed` row never replays: re-running it would re-execute handlers that book money. A replay that finds the event already settled by a concurrent retry answers `duplicate`. The signature is NOT re-verified and cannot be (stored headers are redacted and the raw bytes are gone), so this consumes the normalized event recorded at ingest — the row exists only because verification passed then. Events from before that field existed are refused with 409.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The gateway webhook's id.
    </td>
  </tr>
</tbody>
</table>

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        replayed
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      True if the webhook was processed again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        outcome
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The outcome of processing the webhook again. One of <code>
        processed
      </code>
      
      , <code>
        ignored
      </code>
      
      , <code>
        duplicate
      </code>
      
      , <code>
        error
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        webhook
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The stored webhook.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Replayed
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No such gateway webhook
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Not in a replayable state (<code>
        processed
      </code>
      
       or still in flight, or predates the stored normalized event)
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/gateway_webhooks/XXXXXXXXXXXX01/replay" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "replayed": false,
  "outcome": "processed",
  "webhook": {}
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such gateway webhook"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "conflict_error",
    "message": "Not in a replayable state (processed or still in flight, or predates the stored normalized event)"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
