Create a Customer and CustomerBankAccount, or use a Redirect Flow (POST /redirect_flows) to collect bank details from the customer via GoCardless's hosted page — this is the recommended approach as it handles local mandate language (SEPA mandate, BACS DDI, ACH authorization).
Complete the redirect flow after the customer returns: POST /redirect_flows/{id}/actions/complete with 'session_token'; the response contains a Mandate ID.
Verify the mandate status by listening for the 'mandates.active' webhook event — do not attempt to collect payments against a mandate in 'pending_submission' state.
Create a Payment against the active mandate: POST /payments with 'amount' in minor units, 'currency', 'links.mandate', and 'charge_date' (optional; defaults to the earliest possible collection date respecting the scheme's notice period).
Listen for webhook events on the payment: 'payments.submitted' (sent to bank), 'payments.paid_out' (funds received by you), 'payments.failed' (bank rejection), and 'payments.charged_back' (customer dispute).
For failed payments, check 'cause' on the event to distinguish insufficient funds (can retry after notice period) from mandate cancelled (must re-authorise the customer).
Known gotchas
Each scheme has a mandatory advance notice period before the first collection: BACS requires 3 working days, SEPA requires 1 calendar day, and ACH has no formal advance notice but GoCardless enforces its own minimum — submitting a payment with a charge_date inside the notice window pushes the date forward automatically.
A single failed payment does not cancel the mandate; however, multiple consecutive failures may cause GoCardless to suspend the mandate — always check mandate status before retrying.
GoCardless webhooks must be verified using the webhook secret: compute HMAC-SHA256 of the raw request body with your secret and compare to the 'Webhook-Signature' header before trusting any event payload.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp