PayFanout API reference
    Preparing search index...

    Implements

    Index
    pspName: "paypal" = PAYPAL_PSP_NAME
    • Manual capture of an AUTHORIZE-intent payment; pspPaymentId is the order id. Each partial capture is its own charge under its own required key — a reused key replays the earlier capture via PayPal-Request-Id and moves no new money.

      Parameters

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

      Returns Promise<PaymentInfo>

    • Side-effect-free credential probe behind a host's "Test connection" button. The client-credentials token mint IS the ideal probe: it reads nothing and moves no money, yet it exercises the exact clientId/clientSecret the adapter authenticates with. Always performs a real token fetch (never trusting a warm cache), and classifies from the RAW HTTP status so a rejected key (401/403) is never confused with a transient outage — the mint issues a single request, so an auth rejection is never retried. Secrets are never echoed back in the message.

      Returns Promise<VerifyCredentialsResult>

    • Postback verification: PayPal itself confirms the delivery headers + exact raw bytes. Missing headers, a missing webhookId, or an empty body answer false locally without a network call; transport trouble fails closed (false), never open.

      Parameters

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

      Returns Promise<boolean>