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.
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).
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).
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).