Skip to content

HostedCardElement

The card provider’s own form, for Mastercard and Zimswitch. It renders in your page; the card number and CVV stay in the provider’s iframes. One per page: creating a second throws.

export interface HostedCardElement extends PesepayElementBase<ElementEventMap, HostedCardElementOptions>
NameTypeDescription
elementType"hostedCard"Always "hostedCard".

Listen with on(), once() or off(), by event name. Each handler receives the event’s payload.

EventPayloadDescription
blurElementBlurEventA field lost focus.
changeBaseChangeEventThe input changed.
escapeElementEscapeEventThe customer pressed Escape.
focusElementFocusEventA field gained focus.
loaderrorElementLoadErrorEventThe element could not load.
readyElementReadyEventThe element has rendered.

Also has everything PesepayElementBase has.