Cancels whichever stage the id names: a billing request pre-fulfilment (expires its flows), or a payment — GoCardless only cancels pending_submission payments, anything later rejects with invalid_state (cancellation_failed) -> invalid_request, never retried. The caller's key rides the Idempotency-Key header (GoCardless accepts it on POST actions).
Creates a subscription GoCardless itself bills (POST /subscriptions)
against an existing MANDATE — savedPaymentMethodToken is the mandate id
(MD...), and GoCardless derives the customer from it, so
pspCustomerId is ignored. Cadence is weekly/monthly/yearly only:
interval "day" and RRULE schedules reject (invalid_request) instead
of approximating. merchantRefNum rides the dedicated name field
(max 255 chars; GoCardless also sets it as the description on each
payment created) — never payment_reference, which is restricted to
accounts with their own Service User Number. startAt maps to the
date-only start_date (the instant's stated calendar date); omitted, the
first charge lands on the mandate's next_possible_charge_date. planId
rejects: GoCardless subscriptions have no plan object.
Creates the billing request (the payment) plus the billing request flow (the GoCardless-hosted authorisation UI). The session's clientSecret is the flow's authorisation_url — the client adapter redirects the payer to it, GoCardless fulfils the billing request on completion (auto_fulfil is always on), and the outcome is confirmed via webhooks or retrievePayment.
Missed-webhook recovery: GET /events, normalized by the same mapper webhooks use.
Pages GET /subscriptions with GoCardless cursor semantics (after; limit 1-500, default 50).
Reconciliation passthrough. Only present if getCapabilities().supportsListing.
Reconciliation passthrough. Only present if getCapabilities().supportsListing.
Single-event contract method. GoCardless BATCHES up to 250 events per delivery, so this only accepts single-event bodies — a multi-event delivery throws (invalid_request) instead of silently dropping events. Webhook ingress for GoCardless should verify once, then fan out with parseGoCardlessWebhookEvents (see the package README for the recipe).
GET /subscriptions/:id — the subscription id alone keys retrieval (savedPaymentMethodToken is not needed).
Accepts BOTH ids the host may hold — GoCardless ids are typed by prefix (BRQ = billing request/session, PM = payment) — so the redirect return trip can resolve outcomes from the session id alone.
Polls an async refund to a terminal state — bank refunds submit on debit-scheme timing.
Side-effect-free credential probe — the engine behind a host "Test connection" button. Makes ONE read-only GET /payments (limit 1) and reads the RAW HTTP status so an auth rejection (401/403) is told apart from an outage (429/5xx) directly from the status line, never from a body that a proxy or edge error page may not carry. A single shot with no transport retry loop: a "Test connection" click cannot hang on backoff, and a bad key is not replayed. Never mutates PSP state, never puts the token in the result.
Webhook handling — same adapter, separate concerns. Both async: future PSPs may need remote key retrieval; the contract stays uniform. MUST operate on the RAW request body bytes/string — re-serializing a parsed body breaks signatures (the conformance suite tests this).
POST /subscriptions/:id/actions/cancel — stops FUTURE payment creation only: payments the subscription has already created still collect unless they are cancelled separately (GoCardless documents this explicitly). GoCardless rejects the action with a cancellation_failed invalid_state error once a subscription is already cancelled or finished, so this is verified-idempotent: on any rejection the subscription is re-fetched and a terminal state resolves as success — the billing stop the caller asked for already holds. The caller's key rides the Idempotency-Key header, matching the adapter's other cancel actions.