PayFanout API reference
    Preparing search index...

    Interface WorldlineServerAdapterConfig

    interface WorldlineServerAdapterConfig {
        apiKeyId: string;
        baseUrl?: string;
        environment: "sandbox" | "live";
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        maxNetworkRetries?: number;
        merchantId: string;
        now?: () => number;
        paymentMethods?: PaymentMethodCapability[];
        requestTimeoutMs?: number;
        secretApiKey: string;
        sessionSigningKey: string;
        sessionTtlSeconds?: number;
        sleep?: (ms: number) => Promise<void>;
        webhookKeys: WorldlineWebhookKey | WorldlineWebhookKey[];
    }
    Index
    apiKeyId: string

    v1HMAC API key id (the identifier half — not a secret).

    baseUrl?: string
    environment: "sandbox" | "live"
    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>

    maxNetworkRetries?: number

    Automatic retries for transport-level trouble only (network failure, timeout, HTTP 5xx, 429) with exponential backoff. Default 2. Safe because the idempotence key makes money-moving calls idempotent and a tokenization create is amountless. Business errors (declines, validation) are NEVER retried here.

    merchantId: string

    Merchant id (PSPID) — the {merchantId} path segment on every endpoint.

    now?: () => number

    Injected clock (ms since epoch). Also drives the request Date header — Worldline rejects timestamps older than five minutes, so keep it accurate.

    paymentMethods?: PaymentMethodCapability[]

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

    requestTimeoutMs?: number

    Abort a hung Worldline connection after this many milliseconds (default 30000). The timer covers the whole exchange including the response body read. Money-moving calls carry a signed idempotence key, so a timed-out request is safe to retry (a replayed tokenization create merely re-issues an amountless session). Timeouts surface as retryable psp_unavailable.

    secretApiKey: string

    v1HMAC secret API key (server-side only).

    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.

    Worldline webhook signing keys. Each webhook carries an X-GCS-KeyId naming which key signed it; pass several to rotate with no cutover (any active key verifying wins).