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

EndpointScope
List / Get webhook deliverieswebhook_endpoints:read
Retry one delivery / Retry failed deliverieswebhook_endpoints:write

Webhook delivery object#

FieldTypeDescription
idstringUnique identifier (UUIDv7)
endpoint_idstringThe webhook endpoint it was sent to
event_typestringThe event, for example payment_link.paid
event_idstringThe X-Manza-Event-Id of the event, or null
statusstringpending, succeeded or failed
attemptsintegerAttempts made so far
max_attemptsintegerAttempts allowed before the delivery is failed
response_codeintegerHTTP status of the last attempt, or null
response_time_msintegerDuration of the last attempt in milliseconds, or null
next_attempt_atstringISO 8601 timestamp the next attempt is due, or null
last_attempted_atstringISO 8601 timestamp of the last attempt, or null
completed_atstringISO 8601 timestamp it succeeded or failed, or null
created_atstringISO 8601 timestamp
payloadobjectThe JSON body sent. Get only; null for a payment.authorization_requested delivery unless the key has transfers:authorize
response_bodystringYour 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.

request.sh
curl "https://ma.manza.dev/api/webhook_endpoints/019dde72-02ed-7a23-aaca-98c40c48e6b6/deliveries?status=failed" \
  -H "Authorization: Bearer sk_live_..."
manza
manza webhook-deliveries list 019dde72-02ed-7a23-aaca-98c40c48e6b6 --status failed
app.js
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" });
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status: "failed")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status="failed")
main.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"})
main.rs
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)?;
app.exs
{: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")
app.cr
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

page = client.webhook_deliveries.list("019dde72-02ed-7a23-aaca-98c40c48e6b6", status: "failed")
app.php
use Manza\Client;

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

$page = $client->webhookDeliveries->list('019dde72-02ed-7a23-aaca-98c40c48e6b6', status: 'failed');
response.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.

request.sh
curl "https://ma.manza.dev/api/webhook_deliveries/019dde72-0538-7795-a0b2-48c7097e9827" \
  -H "Authorization: Bearer sk_live_..."
manza
manza webhook-deliveries get 019dde72-0538-7795-a0b2-48c7097e9827
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookDeliveries.get("019dde72-0538-7795-a0b2-48c7097e9827");
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
main.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")
main.rs
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")?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

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

client = Manza::Client.new # reads MANZA_API_KEY

delivery = client.webhook_deliveries.get("019dde72-0538-7795-a0b2-48c7097e9827")
app.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).

request.sh
curl -X POST "https://ma.manza.dev/api/webhook_deliveries/019dde72-0538-7795-a0b2-48c7097e9827/retry" \
  -H "Authorization: Bearer sk_live_..."
manza
manza webhook-deliveries retry 019dde72-0538-7795-a0b2-48c7097e9827
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookDeliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827");
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
main.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")
main.rs
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")?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

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

client = Manza::Client.new # reads MANZA_API_KEY

result = client.webhook_deliveries.retry("019dde72-0538-7795-a0b2-48c7097e9827")
app.php
use Manza\Client;

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

$result = $client->webhookDeliveries->retry('019dde72-0538-7795-a0b2-48c7097e9827');
retry.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.

request.sh
curl -X POST "https://ma.manza.dev/api/webhook_endpoints/019dde72-02ed-7a23-aaca-98c40c48e6b6/retry_failed" \
  -H "Authorization: Bearer sk_live_..."
manza
manza webhook-endpoints retry-failed 019dde72-02ed-7a23-aaca-98c40c48e6b6
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.webhookEndpoints.retryFailed("019dde72-02ed-7a23-aaca-98c40c48e6b6");
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
main.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")
main.rs
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")?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

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

client = Manza::Client.new # reads MANZA_API_KEY

result = client.webhook_endpoints.retry_failed("019dde72-02ed-7a23-aaca-98c40c48e6b6")
app.php
use Manza\Client;

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

$result = $client->webhookEndpoints->retryFailed('019dde72-02ed-7a23-aaca-98c40c48e6b6');
retry_failed.json
{
  "status": "queued",
  "count": 42
}

Error responses#

ScenarioStatusTypeParam
Missing or invalid API key401authentication_error—
Missing required scope403insufficient_scope—
Endpoint or delivery not found404not_found_error—
Unknown status filter400validation_errorstatus
Retry a delivery that did not fail422state_error—
Retry on a disabled endpoint422state_error—
Retry a closed transfer challenge422state_error—