PayFanout API reference
    Preparing search index...

    Class PayZenClientAdapter

    Implements

    Index
    pspName: "payzen"
    • Confirm-on-client shape, submission ownership depending on the form:

      • Embedded (default): KR.submit() makes the krypton form create the transaction, with 3DS2 running INLINE in Lyra's pop-in (no navigation).
      • SmartForm: the form owns its pay buttons, so confirm() SUBMITS NOTHING — it resolves with the outcome of the buyer's in-form completion (or immediately, when one already arrived before the call). Invoke it right after mount to start awaiting.

      Either way the outcome arrives via KR.onSubmit (accepted) or KR.onError (refused/client error) — both resolve, never reject. The browser kr-answer is NOT hash-verified here (the validation keys are server secrets); the host's source of truth stays server-side (IPN / retrievePayment).

      Parameters

      Returns Promise<ConfirmResult>

    • Return trip from the hosted payment page. Two documented return shapes exist, and both resolve here:

      • kr-* fields (the V4 return): the signed kr-answer is parsed for a UX-grade outcome — the signature is NOT checked here (its keys are server secrets), exactly like the embedded form's browser answer.
      • vads_* fields (the hosted page's classic return): the browser has no way to verify them, and the platform documents that return data must only display a visual context — so they resolve "processing" and the host confirms server-side via retrievePayment or the IPN.

      Returns null when the URL carries neither, so a router can probe every registered adapter safely.

      Parameters

      Returns Promise<ConfirmResult | null>

    • Renders PayZen's card fields or multi-method smartForm (per config.form) as Lyra-hosted iframes — SAQ-A eligible, card data never touches the host DOM. KR is a single page-global managing forms globally, so mounting tears down any previous form first; two PayZen forms cannot coexist on one page.

      fieldOptions passes through to KR.setFormConfig untouched (placeholders kr-placeholder-*, kr-hide-debug-toolbar, …). Protected keys the host cannot override: formToken (from clientSecret), kr-public-key, kr-spa-mode, and language when MountOptions.locale is given. appearance is accepted but has no JS hook to land on: krypton mirrors the host page's CSS into its iframes automatically, so theming is done with plain CSS (or a cssUrl override) — documented no-op. The smartForm additionally rejects the material theme (CLIENT_505); the default neon reset is compatible.

      Parameters

      Returns Promise<MountedFieldsHandle>