RapidfolioRapidfolio
Triggers

GoCardless Trigger

Trigger procedures from GoCardless payment and mandate events.

Overview

The GoCardless trigger fires your procedure when payment or mandate events occur in your GoCardless account. GoCardless delivers events in batches — a single webhook delivery may contain multiple events, and Rapidfolio will create a separate procedure run for each event in the batch.

Setup

  1. Go to Connections in the Rapidfolio dashboard and connect your GoCardless account.
  2. Open the procedure you want to trigger and add a GoCardless trigger.
  3. Select the resource types and actions you want to listen for, then save the trigger.
  4. Copy the generated webhook URL and register it in your GoCardless Developer Dashboard under Developers → Webhooks.

Webhook URL

https://run.rapidfolio.com/triggers/:triggerId/gocardless

Replace :triggerId with the trigger ID shown in the Rapidfolio dashboard.

Signature Verification

Rapidfolio verifies the Webhook-Signature header on every inbound request using your GoCardless webhook secret. Requests with an invalid or missing signature are rejected with a 400 response.

Batch Event Handling

GoCardless sends multiple events in a single webhook payload. Rapidfolio unpacks the batch and starts a separate procedure run for each individual event. This means:

  • One webhook delivery from GoCardless can result in several simultaneous procedure runs.
  • Each run receives a single event object as its trigger payload.
  • Your procedure logic can treat the payload as a single event without any special handling.

Configuration

FieldDescription
ConnectionThe GoCardless connection to listen on
Resource typesFilter by resource type — e.g. payments, mandates (leave empty for all)
ActionsFilter by action — e.g. paid_out, failed (leave empty for all)

Supported Event Types

Payments

Resource typeActionDescription
paymentscreatedA payment was created
paymentssubmittedA payment was submitted to the banks
paymentsconfirmedA payment was confirmed as collected
paymentspaid_outA payment was included in a payout
paymentsfailedA payment failed
paymentscancelledA payment was cancelled
paymentscharged_backA payment was charged back

Mandates

Resource typeActionDescription
mandatescreatedA mandate was created
mandatessubmittedA mandate was submitted to the banks
mandatesactiveA mandate became active and can collect payments
mandatesfailedA mandate failed to be set up
mandatescancelledA mandate was cancelled
mandatesexpiredA mandate expired
mandatesreinstatedA previously cancelled mandate was reinstated

Payouts

Resource typeActionDescription
payoutspaidA payout was sent to your bank account

Refunds

Resource typeActionDescription
refundscreatedA refund was created
refundspaidA refund was paid
refundsrefund_settledA refund was settled

Payload

The trigger payload is a single GoCardless event object. Access it via the trigger input in your procedure.

{
  "id": "EV123ABC456DEF",
  "created_at": "2024-03-15T10:30:00.000Z",
  "action": "paid_out",
  "resource_type": "payments",
  "links": {
    "payment": "PM123ABC456DEF",
    "organisation": "OR123ABC456DEF"
  },
  "details": {
    "origin": "gocardless",
    "cause": "payment_paid_out",
    "description": "GoCardless has transferred the payment funds to your bank account."
  },
  "metadata": {}
}

The links field contains references to the related resources. Use the GoCardless integration steps in your procedure to fetch full details (e.g. retrieve the full Payment object using the links.payment ID).

Example Use Cases

  • Trigger a funds reconciliation workflow when payments.paid_out fires.
  • Send a failed-payment notification and enqueue a retry when payments.failed fires.
  • Provision a subscription in your system when mandates.active fires.
  • Alert your operations team when mandates.failed fires so they can follow up with the customer.

On this page