Skip to content

PaymentElement

Every method the transaction can be paid with, grouped as mobile money, card and scan to pay. The chosen method shows its fields and the total with its fee. Pay with confirmPayment(). It renders in your page; card numbers stay in Pesepay’s or the card provider’s frames.

export interface PaymentElement extends PesepayElementBase<PaymentElementEventMap, PaymentElementOptions>
NameTypeDescription
elementType"payment"Always "payment".

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

EventPayloadDescription
changePaymentChangeEventThe chosen method or its fields changed.
blurElementBlurEventA field lost focus.
escapeElementEscapeEventThe customer pressed Escape.
focusElementFocusEventA field gained focus.
loaderrorElementLoadErrorEventThe element could not load.
readyElementReadyEventThe element has rendered.
statusElementStatusEventSent only by the mobile and payment elements, as a mobile money payment progresses.

Also has everything PesepayElementBase has.