@usethrottle/checkout-react
    Preparing search index...

    Interface SecureCardContextValue

    interface SecureCardContextValue {
        cancelChallenge: () => void;
        complete: () => Promise<unknown>;
        error: SecureCardError | null;
        instance: SecureFieldsInstance | null;
        pay: () => Promise<unknown>;
        ready: boolean;
        registerField: (
            kind: SecureCardFieldKind,
            element: HTMLElement,
            options?: Record<string, unknown>,
        ) => void;
        registerThreeDSecure: (
            element: string | HTMLElement,
            options?: { challengeWindowSize?: "01" | "02" | "03" | "04" | "05" },
        ) => void;
        status: SecureCardStatus;
        vault: () => Promise<void>;
    }
    Index
    cancelChallenge: () => void

    Abandons an in-progress challenge (e.g. the buyer closed the challenge UI). Only meaningful while status === 'challenging'; settles complete()'s promise with error.code === 'three_ds_abandoned', kept distinct from a processor decline code.

    complete: () => Promise<unknown>
    error: SecureCardError | null
    instance: SecureFieldsInstance | null

    The underlying Secure Fields instance — Task 5's field primitives register against it.

    null until the provider's mount effect has constructed it. It cannot be built during render: new SecureFields() mutates the document (see the effect in SecureCardProvider), and React does not promise a render-phase factory runs exactly once. Consumers that reach for it directly must null-check; the field primitives already wait for it.

    pay: () => Promise<unknown>

    vault() then complete().

    ready: boolean

    True once all required fields are registered and submit() may be called.

    registerField: (
        kind: SecureCardFieldKind,
        element: HTMLElement,
        options?: Record<string, unknown>,
    ) => void
    registerThreeDSecure: (
        element: string | HTMLElement,
        options?: { challengeWindowSize?: "01" | "02" | "03" | "04" | "05" },
    ) => void

    Mount point for Gr4vy's own 3DS challenge iframe (addThreeDSecure). Register this once, alongside the card fields; it is only actually mounted if complete() gets requires_action.

    vault: () => Promise<void>