Sapilon becomes publicly available on 1 December 2026: 42 days to go. The core goes open source the same day →

GoCardless integration

In short

Collect Direct Debit: mandates, payments, subscriptions and payouts. Connect it on the Integrations page; your app then calls GoCardless through Sapilon without ever holding a GoCardless credential.

Lets your app set customers up for Direct Debit with a hosted page, take one-off and recurring payments against their mandates, and read customers, payments and payouts.

Connecting

On the Integrations page choose Connect on GoCardless and fill in:

  • Environment — api for live, api-sandbox for the sandbox.
  • Access token — GoCardless → Developers → Create → Access token, read-write.

Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.

  • Use a sandbox token on Build and Rehearsal and a live one on Live: two connections, each on its own environments.

What your app can do

Only these requests are available; anything else is refused.

  • GET /creditors
  • POST /billing_requests
  • POST /billing_request_flows
  • GET /customers
  • GET /customers/*
  • GET /mandates
  • GET /mandates/*
  • GET|POST /payments
  • GET /payments/*
  • POST /payments/*/actions/cancel
  • GET|POST /subscriptions
  • GET /subscriptions/*
  • GET /payouts

How the agent uses it

Use integrations.request('gocardless', …); paths are relative to https://api.gocardless.com.

Send headers: { 'Idempotency-Key': '<unique id>' } on every POST.

  • Set a customer up: POST /billing_requests (body: { billing_requests: { mandate_request: { scheme: 'sepa_core' } } }), then POST /billing_request_flows (body: { billing_request_flows: { redirect_uri, exit_uri, links: { billing_request: 'BRQ…' } } }) and send the customer to authorisation_url.
  • GET /customers, GET /customers/{id}, GET /mandates (query: { customer }), GET /mandates/{id}.
  • GET|POST /payments — Example: { method: 'POST', path: '/payments', headers: { 'Idempotency-Key': 'order-A17' }, body: { payments: { amount: 2500, currency: 'EUR', links: { mandate: 'MD123' }, description: 'Order A-17' } } } (amounts in cents). GET /payments/{id}, POST /payments/{id}/actions/cancel.
  • GET|POST /subscriptions — { amount, currency, interval_unit: 'monthly', day_of_month: 1, links: { mandate } }. GET /subscriptions/{id}.
  • GET /payouts, GET /creditors.

Refunds are not allowed.

More from GoCardless: https://developer.gocardless.com/api-reference

Last updated .

Was this page helpful?