PayFanout API reference
    Preparing search index...

    Interface AdyenServerAdapterConfig

    interface AdyenServerAdapterConfig {
        apiKey: string;
        apiVersion?: string;
        baseUrl?: string;
        defaultReturnUrl?: string;
        environment: "sandbox" | "live";
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        hmacKeys: string
        | string[];
        liveUrlPrefix?: string;
        maxNetworkRetries?: number;
        merchantAccount: string;
        now?: () => number;
        paymentMethods?: PaymentMethodCapability[];
        requestTimeoutMs?: number;
        sessionSigningKey: string;
        sessionTtlSeconds?: number;
        sleep?: (ms: number) => Promise<void>;
        webhookBasicAuth: AdyenWebhookBasicAuth | AdyenWebhookBasicAuth[];
    }
    Index
    apiKey: string

    Checkout API key, sent as the X-API-Key header. Server-side only.

    apiVersion?: string

    Pinned Checkout API version, e.g. "v72".

    baseUrl?: string
    defaultReturnUrl?: string

    Where Adyen sends the shopper back from a redirect or a 3-D Secure challenge. returnUrl is one of the required top-level fields on POST /payments, so a session that carries none falls back to this value; with neither, session creation is refused instead of sending Adyen a request it rejects.

    environment: "sandbox" | "live"

    Explicit, never inferred. sandbox -> checkout-test.adyen.com, live -> {liveUrlPrefix}-checkout-live.adyenpayments.com.

    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Injected for tests.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    hmacKeys: string | string[]

    Webhook HMAC keys as generated in the Customer Area (HEX). Pass several to rotate with no cutover — any active key verifying wins.

    liveUrlPrefix?: string

    The account's live URL prefix — REQUIRED when environment is "live".

    maxNetworkRetries?: number

    Automatic retries for transport-level trouble only (network failure, timeout, HTTP 5xx, 429) with exponential backoff. Default 2. Safe because every mutating call carries an idempotency key. Business errors (refusals, validation) are NEVER retried here.

    merchantAccount: string

    The merchant account every request is booked against.

    now?: () => number

    Injected clock (ms since epoch) — drives the session context expiry.

    paymentMethods?: PaymentMethodCapability[]

    Account capabilities vary by contract — override instead of trusting defaults.

    requestTimeoutMs?: number

    Abort a hung Adyen connection after this many milliseconds (default 30000). The timer covers the whole exchange including the response body read. Every call carries an idempotency-key, so a timed-out request is safe to retry. Timeouts surface as retryable psp_unavailable.

    sessionSigningKey: string

    HMAC key for the stateless signed session context (see session-context.ts).

    sessionTtlSeconds?: number

    How long a signed session context stays completable, in seconds. Default 3600 (1h). A signed token must not be valid forever — expiry is enforced at completePayment.

    sleep?: (ms: number) => Promise<void>

    Injected backoff sleep for retry tests; defaults to real setTimeout.

    Basic-auth credentials configured on the Adyen webhook endpoint. Adyen's HMAC authenticates eight field values only, so the rest of a delivery is trusted on the strength of the channel it arrived on — verification requires these. Pass several to rotate with no cutover.