PayFanout API reference
    Preparing search index...

    Implements

    Index
    pspName: "gocardless" = GOCARDLESS_PSP_NAME
    • 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).

      Parameters

      • pspPaymentId: string
      • idempotencyKey: string

      Returns Promise<PaymentInfo>

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

      Returns Promise<VerifyCredentialsResult>

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

      Parameters

      • rawBody: string
      • headers: Record<string, string>

      Returns Promise<boolean>