Skip to content

@pesepay/vue

Every public export of @pesepay/vue, generated from its type declarations. @pesepay/vue on npm.

NameDescription
useElementsThe elements group <Elements> created. null while Pesepay loads and during server rendering. Read an element off it to pay with: elements.value?.getElement("card").
usePesepayThe Pesepay instance <Elements> was given. null while it loads and during server rendering.
NameDescription
ElementsPropsProps for <Elements>.
ElementsSlotPropsWhat the default slot receives, so the component that renders <Elements> can pay without a child component. Both are null until Pesepay loads.
NameDescription
ElementComponentAn element component.
ElementEmitsThe events an element component emits. loadError is written @load-error in a template.
ElementFinishedEmitsfinished, on the checkout element: its payment has ended.
ElementPropsProps of an element component. options is required where the element needs one: cardCheckout for hostedCard, referenceNumber for payment and checkout. id and class pass through to the container the element mounts into.
ElementsSlotsThe slots <Elements> takes.
ElementStatusEmitsstatus, on the elements that report a sent payment’s progress: mobile and payment.
NameDescription
CardElementVisa card fields in a Pesepay frame. Pay with confirmPayment() and elements.getElement("card").
CheckoutElementThe payment element with its own Pay button. It runs every step of the payment; listen for @finished. A new referenceNumber replaces the element.
ElementsCreates one elements group for the components inside it, and destroys it when it unmounts.
HostedCardElementThe card provider’s form for Mastercard and Zimswitch. One per page.
MobileElementEcoCash or O’mari phone number, and O’mari’s SMS code.
PaymentElementEvery method the transaction can be paid with. A new referenceNumber replaces the element.
ScanElementThe InnBucks or PayGo code the customer scans.