Sarraf API
    Preparing search index...

    Interface Fixture<T>

    A recorded, scrubbed sandbox exchange. See scripts/record-fixtures.ts. secret is a throwaway test secret used to re-sign webhook so tests can verify it.

    interface Fixture<T = unknown> {
        data?: T;
        description?: string;
        expectedSignature?: string;
        provider: string;
        query?: Record<string, string>;
        recordedAt?: string;
        request?: unknown;
        response?: unknown;
        scenario: string;
        secret?: string;
        signedString?: string;
        source: "sandbox" | "synthetic";
        verifiedAgainstRealSignature?: boolean;
        webhook?: {
            headers?: Record<string, string>;
            query?: Record<string, string>;
            rawBody: string;
        };
    }

    Type Parameters

    • T = unknown
    Index
    data?: T
    description?: string
    expectedSignature?: string
    provider: string
    query?: Record<string, string>

    A captured customer redirect: the query params in the order they arrived.

    recordedAt?: string
    request?: unknown
    response?: unknown
    scenario: string
    secret?: string

    Throwaway secret used to compute expectedSignature.

    signedString?: string

    The exact string that the signature covers, for documentation.

    source: "sandbox" | "synthetic"

    "sandbox" when recorded from a real sandbox, "synthetic" when hand-written from docs.

    verifiedAgainstRealSignature?: boolean

    Recorded fixtures: true when the provider's real signature matched your real secret.

    webhook?: {
        headers?: Record<string, string>;
        query?: Record<string, string>;
        rawBody: string;
    }