Better Payment 0.11.1 API
    Preparing search index...

    Interface MockProviderConfig

    Configuration fields shared by all providers. Credentials are defined in each provider's own configuration type.

    interface MockProviderConfig {
        baseUrl?: string;
        fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        installmentRates?: Record<number, number>;
        locale?: string;
        logger?: BetterPaymentLogger;
        retry?: RetryConfig;
        secret?: string;
        validate?: boolean;
    }

    Hierarchy (View Summary)

    Index
    baseUrl?: string
    fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

    Custom fetch implementation for API calls. Default: globalThis.fetch.

    Type Declaration

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

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    installmentRates?: Record<number, number>

    Commission rates by installment count for installmentInfo(). Default: 1→0, 2→2, 3→3, 6→5 (%)

    locale?: string
    retry?: RetryConfig
    secret?: string

    Secret that signs 3D Secure callbacks. Default: random per instance, so callbacks from another instance are rejected like forged ones.

    validate?: boolean

    Validate requests before calling the provider (card, amounts, basket, required fields). Default: true.