PayFanout API reference
    Preparing search index...

    Implements

    Index
    pspName: "paysafe" = PAYSAFE_PSP_NAME
    • Voids the remaining authorization. This also works AFTER partial settlements (multi-capture flows) — settled funds stay settled and the returned PaymentInfo reports them (status "succeeded"), derived from the pre-void remainder; only a payment with no settlements at all comes back "canceled". Caller-keyed settlements are not rediscoverable statelessly, so LATER retrievePayment calls lose that split once the void has consumed availableToSettle (documented limitation).

      Parameters

      • pspPaymentId: string
      • idempotencyKey: string

      Returns Promise<PaymentInfo>

    • Only present if getCapabilities().supportsManualCapture. Capture is the canonical double-charge operation — the idempotency key is REQUIRED, and under supportsMultiCapture each partial capture is its own charge with its own key.

      Parameters

      • pspPaymentId: string
      • amount: number | undefined
      • idempotencyKey: string

      Returns Promise<PaymentInfo>

    • "Test connection" probe: one side-effect-free read against the Customer Vault — look up an all-but-certainly-absent profile. This endpoint is an object-or-404 point lookup, so authentication is settled BEFORE the resource is resolved: only 401/403 means bad credentials, while every other status — a 2xx match, the expected 404 "no such profile", or any business 4xx — proves the credentials authenticated. Classified so a host UI can tell a wrong key (auth) from a transient outage (network). It is a single call, never retried (an auth rejection must not be replayed), and the credentials never leak into 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>