Skip to content

loadPesepay

Loads the Pesepay runtime and returns a configured instance.

Resolves to null when there is no DOM, so it is safe to call during server-side rendering (Next.js App Router, Nuxt, SvelteKit). Guard with if (!pesepay) return; on the client rather than branching on window.

Concurrent calls share one script tag and one promise. Two calls with different options still produce two independent instances — nothing about a Pesepay instance is global.

export declare function loadPesepay(options?: LoadOptions): Promise<Pesepay | null>;
ParameterType
options?LoadOptions