npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@payfurl/vue-plugin

v1.5.0

Published

PayFURL Vue Plugin

Readme

@payfurl/vue-plugin

The payFURL drop-in for Vue 3. PayfurlDropin renders payFURL's payment form: cards, Google Pay, Apple Pay, PayPal, PayTo and the other payment methods your payFURL account offers. It collects the payment details without them touching your servers. It wraps the payFURL Client SDK (@payfurl/client), which it includes.

Full guide: Vue on docs.payfurl.com.

Install

npm install @payfurl/vue-plugin

Vue 3 is a peer dependency.

Use

<script setup lang="ts">
import { PayfurlDropin, type SuccessResponseType, type FailureResponseType } from "@payfurl/vue-plugin";

const onSuccess = (message: SuccessResponseType) => console.log("token", message.token);
const onFailure = (message: FailureResponseType) => console.error(message.error);
const onLoaded = () => console.log("drop-in ready");
</script>

<template>
  <PayfurlDropin
    environment="sandbox"
    public-key="<your public key>"
    :amount="20"
    currency="AUD"
    @onSuccess="onSuccess"
    @onFailure="onFailure"
    @onLoaded="onLoaded"
  />
</template>

Send the token from @onSuccess to your server and charge it with payFURL's API.

Props

| Prop | Type | | |---|---|---| | environment | "sandbox" or "production" | Required | | publicKey | string | Required. Your account's public key | | amount | number | Required. In the currency's major unit (20 is $20.00) | | currency | string | Required. A 3-letter ISO 4217 code, e.g. "AUD" | | options | DropInOptionsType | Optional. See Drop In UI options | | debug | boolean | Optional. Logs the SDK's activity to the browser console | | successMessage | string | Optional. Shown when the payment details are collected | | customer | CustomerInfoType | Optional, 1.5.0+. The shopper: name, email, phone. See Customer and order details | | billingAddress | AddressInfoType | Optional, 1.5.0+. The shopper's billing address | | order | OrderInfoType | Optional, 1.5.0+. The order: items, tax, shipping, discount | | onValidate | () => boolean | Optional. Return false to stop the submission, e.g. while your terms checkbox is unchecked |

3D Secure, fraud checks, Click to Pay and checkout providers use customer, billingAddress and order, so pass what you know.

Changing props

  • amount, successMessage, customer, billingAddress, order: a new value updates the drop-in in place, and the shopper keeps what they typed. To change the amount on the fly, change the amount prop: the component calls the SDK's setAmount() for you.
  • currency, options: a new value rebuilds the drop-in. PayPal loads its buttons for one currency.
  • environment, publicKey, debug: read once, when the component mounts. The SDK runs one instance per page, so switching account or environment takes a page reload.
  • Objects are compared by value: a new object with the same values changes nothing.
  • Event listeners and onValidate: the current ones are used when they fire.

Don't call setAmount() (or any other SDK method) on your own import payfurl from "@payfurl/client": this package includes its own copy of the SDK, so the call doesn't reach the drop-in. Change the props instead.

Events

| Event | Payload | | |---|---|---| | @onSuccess | SuccessResponseType | Essential. The payment details were collected: token, or transactionId for payment methods that complete the payment themselves. Without a listener, the SDK puts the token in a hidden token input and submits the <form> around the component; with neither, the details reach nobody and the console warns | | @onFailure | FailureResponseType | error, and errorDetails when the provider declined | | @onLoaded | none | The form, or a payment method's button, is ready | | @onValidationStatusChange | status: string, message: string | The card form's validation changed | | @onPaymentMethodStatus | PaymentMethodStatusType | 1.5.0+. A payment method's button rendered, or won't and why. See Payment method status handler | | @onThreeDsProgress | ThreeDsProgressType | 1.5.0+. 3-D Secure started, showed a challenge, completed. See 3-D Secure progress handler |

Each event's payload is typed in the package's type definitions, so your editor shows it.

Types

The package re-exports the SDK's types: DropInOptionsType, UpiOptionsType, DropInGooglePayOptionsType, DropInApplePayOptionsType, ClickToPayOptionsType, NetworkTokenOptionsType, SuccessResponseType, FailureResponseType, PaymentMethodStatusType, ThreeDsProgressType, CustomerInfoType, AddressInfoType and OrderInfoType.

Support

Documentation · SDK changelog · Support

Changelog

What changed in each version of @payfurl/vue-plugin. Changes to the payment form itself are in the Client SDK changelog. This changelog starts with version 1.4.0.

1.5.0

Added

  • @onPaymentMethodStatus and @onThreeDsProgress events: a payment method's button rendered or won't render and why, and 3-D Secure's progress (started, challenge shown, completed).
  • customer, billingAddress and order props: the shopper and the order, which 3-D Secure, fraud checks, Click to Pay and checkout providers use. Before, the drop-in had no way to receive them. A change, even inside the object, updates the drop-in in place.
  • The PaymentMethodStatusType, ThreeDsProgressType, CustomerInfoType, AddressInfoType and OrderInfoType types.

Changed

  • Without an @onSuccess listener, the SDK now puts the token in a hidden token input and submits the <form> around the component, as it does without a success handler outside Vue. Before, the token reached nothing. With neither a listener nor a form, the console warns.
  • A new currency or options rebuilds the drop-in, as in the React plugin, so PayPal shows the new currency. Before, the currency changed in place, with PayPal still on the old one, and new options were ignored.
  • The current onValidate is asked at submit, not the one passed at mount.
  • Every event's payload is typed in the package's type definitions.
  • Depends on @payfurl/client 4.11.0 or later, which adds these handlers.

1.4.0

Added

  • TypeScript types for every prop, from @payfurl/client, and the package's own type definitions now load.