import type { AccessToken, RequestPaymentResponse, ErrorResponse, SubmitSuccessResponse, PaymentMethod } from '../types.js'; export declare class ServerError extends Error { constructor(message: string | undefined); } export declare const catchErrorHandler: (error: unknown, fallbackMessage: string, onError?: (responseStatus: number, error?: ErrorResponse) => void) => unknown; export declare const getToken: ({ origin, merchantId, publicKey, onError, payload }: { origin: string; merchantId: string; publicKey: string; onError?: (responseStatus: number, error?: ErrorResponse) => void; payload: { gateway_customer_id?: string; email?: string; strict_mode: boolean; payment_type: PaymentMethod; }; }) => Promise; export declare const requestPayment: ({ accessId, origin, merchantId, publicKey, payload, onError }: { accessId: string; origin: string; merchantId: string; publicKey: string; payload: SubmitSuccessResponse<"ach" | "card">; onError?: (responseStatus: number, error?: ErrorResponse) => void; }) => Promise; export declare const successCallback: (response: Response, paymentMethod: T) => Promise>; export declare const errorCallback: (response?: Response) => Promise<{ responseStatus: number; responseBody: ErrorResponse; } | { responseStatus: number; responseBody: undefined; }>; export declare const deepMerge: , TPatch extends Record>(base: TBase, patch: TPatch) => TBase;