Skip to main content
POST
GoCardless webhook receiver (per-connection, BYO)
Per-connection variant of the GoCardless webhook receiver for workspaces that connected their own GoCardless account with Connect a Gateway. The batch is verified with that connection’s own webhook secret (resolved from connID) before any event is trusted. Payment events are bound to the connection’s workspace; mandate events are not (see below). Event handling is otherwise identical to the platform receiver.
Each connection has its own URL. Read webhook_path from List Gateway Connections (for example /webhooks/gocardless/{connID}), append it to https://api.recurso.dev, and register that URL in the GoCardless Dashboard under Developers > Webhook endpoints using the webhook_secret you supplied when connecting, or set later with Set Gateway Webhook Secret. A connection without a webhook secret cannot verify deliveries and rejects them.

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. A payment event whose invoice belongs to a different workspace than the connection is ignored, never applied. billing_requests and mandates events are resolved by their GoCardless id alone and are not checked against the connection’s workspace.

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, a payment for another workspace’s invoice). 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.

Path Parameters

connID
string<uuid>
required

The tenant's GoCardless gateway-connection id.

Body

application/json

Raw GoCardless events payload.

Response

Batch processed (individual events may be ignored).

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