Skip to content

@pesepay/react

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

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; handle onFinished. 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.
useElementsThe elements group <Elements> created, or null while Pesepay loads and during server rendering. Read an element off it to pay with: elements.getElement("card").
usePesepayThe Pesepay instance <Elements> was given, or null while it loads and during server rendering.
NameDescription
ElementEventPropsAn element’s event callbacks, one prop per event.
ElementsPropsProps for <Elements>.
NameDescription
CardElementPropsProps for <CardElement>.
CheckoutElementPropsProps for <CheckoutElement>.
ElementFinishedPropsonFinished, on the checkout element: its payment has ended.
ElementPropsProps shared by every element component. options is required where the element needs one: cardCheckout for hostedCard, referenceNumber for payment and checkout.
ElementStatusPropsonStatus, on the elements that report a sent payment’s progress: mobile and payment.
HostedCardElementPropsProps for <HostedCardElement>.
MobileElementPropsProps for <MobileElement>.
PaymentElementPropsProps for <PaymentElement>.
ScanElementPropsProps for <ScanElement>.