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
- Go to Connections in the Rapidfolio dashboard and connect your GoCardless account.
- Open the procedure you want to trigger and add a GoCardless trigger.
- Select the resource types and actions you want to listen for, then save the trigger.
- 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
| Field | Description |
|---|---|
| Connection | The GoCardless connection to listen on |
| Resource types | Filter by resource type — e.g. payments, mandates (leave empty for all) |
| Actions | Filter by action — e.g. paid_out, failed (leave empty for all) |
Supported Event Types
Payments
| Resource type | Action | Description |
|---|---|---|
payments | created | A payment was created |
payments | submitted | A payment was submitted to the banks |
payments | confirmed | A payment was confirmed as collected |
payments | paid_out | A payment was included in a payout |
payments | failed | A payment failed |
payments | cancelled | A payment was cancelled |
payments | charged_back | A payment was charged back |
Mandates
| Resource type | Action | Description |
|---|---|---|
mandates | created | A mandate was created |
mandates | submitted | A mandate was submitted to the banks |
mandates | active | A mandate became active and can collect payments |
mandates | failed | A mandate failed to be set up |
mandates | cancelled | A mandate was cancelled |
mandates | expired | A mandate expired |
mandates | reinstated | A previously cancelled mandate was reinstated |
Payouts
| Resource type | Action | Description |
|---|---|---|
payouts | paid | A payout was sent to your bank account |
Refunds
| Resource type | Action | Description |
|---|---|---|
refunds | created | A refund was created |
refunds | paid | A refund was paid |
refunds | refund_settled | A 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_outfires. - Send a failed-payment notification and enqueue a retry when
payments.failedfires. - Provision a subscription in your system when
mandates.activefires. - Alert your operations team when
mandates.failedfires so they can follow up with the customer.