OptionalbaseOptionalbrandOptionalcancelWhere PayPal sends the buyer on cancel; defaults to the return URL.
REST app client id (the same value the browser SDK uses — public).
REST app secret — server-side only, authenticates the client id.
Explicit, never inferred. sandbox -> api-m.sandbox.paypal.com, live -> api-m.paypal.com.
OptionalfetchInjected for tests.
Optionalinit: RequestInitOptionalinit: RequestInitOptionallocaleBCP-47 checkout locale (e.g. "fr-FR"); PayPal auto-detects when omitted.
OptionalmaxAutomatic retries for transport-level trouble only (network failure, timeout, HTTP 5xx, 429) with exponential backoff. Default 2. Safe because retries reuse the same PayPal-Request-Id — PayPal's own guidance for a 5xx on /capture. Business errors (declines, 422 state errors) are NEVER retried here.
OptionalnowInjected clock (ms since epoch) for OAuth-cache tests.
OptionalrequestAbort a hung PayPal connection after this many milliseconds (default 30000). The timer covers the whole exchange including the response body read. Mutating calls carry a deterministic PayPal-Request-Id, so a timed-out request is safe to retry. Timeouts surface as retryable psp_unavailable errors.
OptionalreturnFallback approval return URL when the session input carries none.
OptionalsleepInjected backoff sleep for retry tests; defaults to a real setTimeout.
OptionaluserLabel on the popup's final button. Default "CONTINUE": the popup approves
and control returns to the page, where PayFanout's own Pay button
completes the payment (PAY_NOW belongs to flows that capture on approval).
The client adapter's userAction (the SDK's commit param) must agree.
OptionalwebhookThe webhook id PayPal assigned when the listener URL was registered. Required for webhook verification — verifyWebhookSignature returns false without it (verification postbacks need it, fail closed).
Shown instead of the business name in the PayPal window.