Skip to main content
POST
GoCardless webhook receiver (platform account)
This endpoint receives webhook deliveries from GoCardless for the platform’s own GoCardless account. Unlike the Razorpay and Stripe receivers, each GoCardless delivery batches many events; Recurso verifies the whole body once and then processes (and deduplicates) each event individually. Workspaces that connected their own GoCardless account use the per-connection receiver instead.
This endpoint verifies the delivery using the platform’s GOCARDLESS_WEBHOOK_SECRET. Configure the URL https://api.recurso.dev/webhooks/gocardless in the GoCardless Dashboard under Developers > Webhook endpoints with the same secret. Without a registered webhook, authorized mandates stay created and never debit.

Parameters

Request Body

The raw GoCardless events payload: an object with an events array. Each event is handled by its resource_type and action: Any other event is acknowledged and ignored.

Example Request

GoCardless sends a POST request with a batch of events:

Response

Returns 200 OK once the batch has been processed. processed counts every event that was accepted on this delivery, including the ones acknowledged and ignored (an unknown resource_type, a billing_requests action other than fulfilled, a payment id that no invoice references). It is not a count of side effects. Events already recorded by an earlier delivery are skipped silently and not counted, and an event whose handler returned an error is not counted either.
When mandate handling is not configured on the API, the batch is acknowledged without processing:

Fields

An event whose handler returns an error (for example, a transient database error while looking up the invoice for a payment id) is logged and left unrecorded rather than failing the batch, so the next redelivery retries it. A payment id that simply matches no invoice is not an error: it is acknowledged, counted in processed, and recorded, so it is never retried. Per-event deduplication skips the events that already completed, so nothing is processed twice.

Errors

Errors use the standard envelope — see Errors.

Authorizations

Authorization
string
header
required

Headers

Webhook-Signature
string
required

HMAC-SHA256 hex signature of the raw request body.

Body

application/json

Raw GoCardless events payload.

Response

Batch processed (individual events may be ignored).

status
enum<string>
Available options:
ok,
ignored
processed
integer