Ir al contenido

API de consola: webhook

Esta página se genera a partir de server/api/openapi.yaml. Su contenido está en inglés; no la edites a mano.

Payment provider webhook receivers (raw body). Handlers: internal/console/webhook.

Stripe webhook receiver

operationId webhookStripe · auth: public

Not part of the web app’s API. Acknowledged with 200 only after the event row is committed; anything else than 200/400 makes the provider redeliver. No session, no CSRF.

Parameter In Type Required Description
Stripe-Signature header string no t=<timestamp>,v1=<HMAC-SHA256 of ‘<t>.<raw body>’>

The provider’s event, verbatim. The signature covers the raw bytes, so the handler reads the body unparsed.

Request body (required) application/json — object

Status Meaning Body
200 Stored (new or duplicate). Processing continues asynchronously. —
400 Bad signature, stale timestamp or unparseable body. application/json Error
default Error envelope. The HTTP status follows the error kind. application/json Error

Infini webhook receiver

operationId webhookInfini · auth: public

Not part of the web app’s API. Acknowledged with 200 only after the event row is committed; anything else than 200/400 makes the provider redeliver. No session, no CSRF.

Parameter In Type Required Description
X-Webhook-Timestamp header string no Unix timestamp.
X-Webhook-Event-Id header string no Provider event id.
X-Webhook-Signature header string no HMAC-SHA256 of ‘<timestamp>.<event id>.<raw body>’.

The provider’s event, verbatim. The signature covers the raw bytes, so the handler reads the body unparsed.

Request body (required) application/json — object

Status Meaning Body
200 Stored (new or duplicate). Processing continues asynchronously. —
400 Bad signature, stale timestamp or unparseable body. application/json Error
default Error envelope. The HTTP status follows the error kind. application/json Error

Mailer Worker event receiver (bounces, complaints)

operationId webhookMail · auth: public

Not part of the web app’s API. Called by the mailer Worker (workers/mailer) with the Email Sending events that stop further mail to an address. Each event is recorded once by event_id and its recipient is added to the suppression list; a redelivered batch changes nothing. Answers 404 unless MAIL_TRANSPORT=worker. No session, no CSRF.

Parameter In Type Required Description
X-Key-Id header string no Key id of the shared secret (MAIL_WORKER_KEY_ID).
X-Timestamp header string no Unix seconds.
X-Signature header string no hex(HMAC-SHA256(secret, timestamp + “\n” + “POST” + “\n” + “/webhooks/mail” + “\n” + sha256hex(raw body))).

The raw body is signed, so the handler reads it unparsed.

Request body (required) application/json — MailEventBatch

  • events (array of MailEvent, required, maxItems: 500)
    • event_id (string, required) — Cloudflare’s event id; the idempotency key.
    • kind (“bounce” | “complaint” | “suppressed”, required) — bounce = message.bounced (permanent or retries exhausted); complaint = message.complained (marked as spam); suppressed = message.rejected because Cloudflare has the recipient on its suppression list.
    • recipient (string, required)
    • message_id (string)
    • occurred_at (string)
    • reason (string) — SMTP response, bounce reason or rejection detail; may be empty.
Status Meaning Body
200 Recorded (new or duplicate events). —
400 Unparseable body or unknown event kind. application/json Error
401 Missing or invalid signature, unknown key id, or a timestamp more than 300 seconds off. application/json Error
default Error envelope. The HTTP status follows the error kind. application/json Error