REST API

# Webhook Deliveries API

List an endpoint's deliveries, inspect one, and resend what failed while your endpoint was down.

## Overview

Every event Manza sends to a webhook endpoint is a **delivery**. Failed deliveries are retried automatically for about 28 hours (see the retry policy in the [Webhooks guide](https://za.manza.finance/docs/webhooks)). When your endpoint was down for longer, or you fixed a bug in your handler, retry the failed deliveries yourself with the endpoints below.

Only failed deliveries can be retried. A delivery that succeeded is never resent: your handler already acted on it. Retried events keep their `X-Manza-Event-Id`, so your duplicate check still applies.

## Required scopes

| Endpoint | Scope |
| --- | --- |
| List / Get webhook deliveries | `webhook_endpoints:read` |
| Retry one delivery / Retry failed deliveries | `webhook_endpoints:write` |

## Webhook delivery object

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique identifier (UUIDv7) |
| `endpoint_id` | string | The webhook endpoint it was sent to |
| `event_type` | string | The event, for example payment_link.paid |
| `event_id` | string | The X-Manza-Event-Id of the event, or null |
| `status` | string | pending, succeeded or failed |
| `attempts` | integer | Attempts made so far |
| `max_attempts` | integer | Attempts allowed before the delivery is failed |
| `response_code` | integer | HTTP status of the last attempt, or null |
| `response_time_ms` | integer | Duration of the last attempt in milliseconds, or null |
| `next_attempt_at` | string | ISO 8601 timestamp the next attempt is due, or null |
| `last_attempted_at` | string | ISO 8601 timestamp of the last attempt, or null |
| `completed_at` | string | ISO 8601 timestamp it succeeded or failed, or null |
| `created_at` | string | ISO 8601 timestamp |
| `payload` | object | The JSON body sent. Get only; null for a payment.authorization_requested delivery unless the key has transfers:authorize |
| `response_body` | string | Your endpoint's response body to the last attempt, or the connection error when there was no response; truncated, or null. Get only |

## List webhook deliveries

`GET` `/api/webhook_endpoints/:id/deliveries`

Newest first, with cursor pagination (`cursor`, `limit` 1–100, default 25). Filter with `status`: `failed`, `pending` or `succeeded`. Any other value answers `400`. List items leave out `payload` and `response_body`; get a delivery for those.

cURL

CLI

JavaScript

Ruby

Python

Go

Rust

Elixir

Crystal

PHP

```console
curl "https://za.manza.finance/api/webhook_endpoints/019dde72-02ed-7a23-aaca-98c40c48e6b6/deliveries?status=failed" \
  -H "Authorization: Bearer sk_live_..."
```

```console
manza webhook-deliveries list 019dde72-02ed-7a23-aaca-98c40c48e6b6 --status failed
```

```javascript
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookDeliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", { status: "failed" });
```

```ruby
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status: "failed")
```

```python
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status="failed")
```

```go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

page, err := client.WebhookDeliveries.List(ctx, "019dde72-02ed-7a23-aaca-98c40c48e6b6",
    manza.WebhookDeliveryListParams{Status: "failed"})
```

```rust
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let params = manza::WebhookDeliveryListParams { status: Some("failed".into()), ..Default::default() };
let page = client.webhook_deliveries().list("019dde72-02ed-7a23-aaca-98c40c48e6b6", params)?;
```

```elixir
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, page} = Manza.WebhookDeliveries.list(client, "019dde72-02ed-7a23-aaca-98c40c48e6b6", status: "failed")
```

```crystal
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

page = client.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status: "failed")
```

```php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$page = $client->webhookDeliveries->list('019dde72-02ed-7a23-aaca-98c40c48e6b6', status: 'failed');
```

```json
{
  "data": [
    {
      "id": "019dde72-0538-7795-a0b2-48c7097e9827",
      "endpoint_id": "019dde72-02ed-7a23-aaca-98c40c48e6b6",
      "event_type": "payment_link.paid",
      "event_id": "019dde72-0a11-7c3e-9d52-3f6b1e0a4c21",
      "status": "failed",
      "attempts": 8,
      "max_attempts": 8,
      "response_code": 503,
      "response_time_ms": 10012,
      "next_attempt_at": null,
      "last_attempted_at": "2026-04-30T09:12:00Z",
      "completed_at": "2026-04-30T09:12:10Z",
      "created_at": "2026-04-29T05:10:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Get webhook delivery

`GET` `/api/webhook_deliveries/:id`

One delivery, with the `payload` sent and your endpoint's `response_body`.

cURL

CLI

JavaScript

Ruby

Python

Go

Rust

Elixir

Crystal

PHP

```console
curl "https://za.manza.finance/api/webhook_deliveries/019dde72-0538-7795-a0b2-48c7097e9827" \
  -H "Authorization: Bearer sk_live_..."
```

```console
manza webhook-deliveries get 019dde72-0538-7795-a0b2-48c7097e9827
```

```javascript
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookDeliveries.get("019dde72-0538-7795-a0b2-48c7097e9827");
```

```ruby
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
```

```python
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
```

```go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

delivery, err := client.WebhookDeliveries.Get(ctx, "019dde72-0538-7795-a0b2-48c7097e9827")
```

```rust
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let delivery = client.webhook_deliveries().get("019dde72-0538-7795-a0b2-48c7097e9827")?;
```

```elixir
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, delivery} = Manza.WebhookDeliveries.get(client, "019dde72-0538-7795-a0b2-48c7097e9827")
```

```crystal
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

delivery = client.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
```

```php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$delivery = $client->webhookDeliveries->get('019dde72-0538-7795-a0b2-48c7097e9827');
```

## Retry webhook delivery

`POST` `/api/webhook_deliveries/:id/retry`

Queues one failed delivery for one more attempt and answers `202 Accepted`. It is refused with `422 state_error` when the delivery did not fail, when its endpoint is disabled, or when it is a `payment.authorization_requested` challenge that can no longer be answered (answered, declined, or past its one-hour window).

cURL

CLI

JavaScript

Ruby

Python

Go

Rust

Elixir

Crystal

PHP

```console
curl -X POST "https://za.manza.finance/api/webhook_deliveries/019dde72-0538-7795-a0b2-48c7097e9827/retry" \
  -H "Authorization: Bearer sk_live_..."
```

```console
manza webhook-deliveries retry 019dde72-0538-7795-a0b2-48c7097e9827
```

```javascript
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookDeliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827");
```

```ruby
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
```

```python
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
```

```go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

result, err := client.WebhookDeliveries.Retry(ctx, "019dde72-0538-7795-a0b2-48c7097e9827")
```

```rust
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let result = client.webhook_deliveries().retry("019dde72-0538-7795-a0b2-48c7097e9827")?;
```

```elixir
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, result} = Manza.WebhookDeliveries.retry(client, "019dde72-0538-7795-a0b2-48c7097e9827")
```

```crystal
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

result = client.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
```

```php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$result = $client->webhookDeliveries->retry('019dde72-0538-7795-a0b2-48c7097e9827');
```

```json
{
  "delivery_id": "019dde72-0538-7795-a0b2-48c7097e9827",
  "status": "queued"
}
```

## Retry failed webhook deliveries

`POST` `/api/webhook_endpoints/:id/retry_failed`

Queues a retry of the endpoint's failed deliveries from the last 7 days, oldest first and at most 500, and answers `202 Accepted` with how many it will try. They go out spread a second apart, except a transfer challenge, which goes out at once. A challenge nobody can answer any more is skipped. The endpoint must be active; a second request while one is queued is ignored.

cURL

CLI

JavaScript

Ruby

Python

Go

Rust

Elixir

Crystal

PHP

```console
curl -X POST "https://za.manza.finance/api/webhook_endpoints/019dde72-02ed-7a23-aaca-98c40c48e6b6/retry_failed" \
  -H "Authorization: Bearer sk_live_..."
```

```console
manza webhook-endpoints retry-failed 019dde72-02ed-7a23-aaca-98c40c48e6b6
```

```javascript
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookEndpoints.retryFailed("019dde72-02ed-7a23-aaca-98c40c48e6b6");
```

```ruby
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
```

```python
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
```

```go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

result, err := client.WebhookEndpoints.RetryFailed(ctx, "019dde72-02ed-7a23-aaca-98c40c48e6b6")
```

```rust
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let result = client.webhook_endpoints().retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")?;
```

```elixir
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, result} = Manza.WebhookEndpoints.retry_failed(client, "019dde72-02ed-7a23-aaca-98c40c48e6b6")
```

```crystal
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

result = client.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
```

```php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$result = $client->webhookEndpoints->retryFailed('019dde72-02ed-7a23-aaca-98c40c48e6b6');
```

```json
{
  "status": "queued",
  "count": 42
}
```

## Error responses

| Scenario | Status | Type | Param |
| --- | --- | --- | --- |
| Missing or invalid API key | 401 | `authentication_error` | — |
| Missing required scope | 403 | `insufficient_scope` | — |
| Endpoint or delivery not found | 404 | `not_found_error` | — |
| Unknown status filter | 400 | `validation_error` | `status` |
| Retry a delivery that did not fail | 422 | `state_error` | — |
| Retry on a disabled endpoint | 422 | `state_error` | — |
| Retry a closed transfer challenge | 422 | `state_error` | — |