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

@monei-js/vue-components

v2.0.7

Published

MONEI Vue 3 components for accepting payments with CardInput, Bizum, PayPal, and PaymentRequest.

Downloads

845

Readme

@monei-js/vue-components

Vue 3 components for MONEI payments. Typed props via defineComponent, template ref submit(), and idiomatic Vue API.

Install

npm install @monei-js/vue-components @monei-js/components

Components

| Component | Description | | ---------------- | ------------------------------------------ | | CardInput | Secure card input (iframe) with submit() | | Bizum | Bizum button + phone verification modal | | PayPal | PayPal checkout button | | PaymentRequest | Apple Pay / browser Payment Request button |

Quick Start

<script setup lang="ts">
import {ref} from 'vue';
import {CardInput, confirmPayment} from '@monei-js/vue-components';

const cardRef = ref();
const paymentId = 'pay_...';

async function handleSubmit() {
  const {token, error} = await cardRef.value.submit();
  if (error) return console.error(error);
  await confirmPayment({paymentId, paymentToken: token});
}
</script>

<template>
  <div>
    <CardInput ref="cardRef" :paymentId="paymentId" />
    <button @click="handleSubmit">Pay</button>
  </div>
</template>

API Re-exports

confirmPayment and api are re-exported from this package for convenience:

import {CardInput, Bizum, confirmPayment, api} from '@monei-js/vue-components';

Migrating from .driver('vue3')

Import changes

Before:

import {CardInput, Bizum, PayPal, PaymentRequest} from '@monei-js/components';

const MoneiCardInput = CardInput.driver('vue3');
const MoneiBizum = Bizum.driver('vue3');
const MoneiPayPal = PayPal.driver('vue3');
const MoneiPaymentRequest = PaymentRequest.driver('vue3');

After:

import {CardInput, Bizum, PayPal, PaymentRequest} from '@monei-js/vue-components';

submit() migration

Before (standalone createToken):

<script setup>
import {CardInput, createToken} from '@monei-js/components';

const MoneiCardInput = CardInput.driver('vue3');
const instance = CardInput({paymentId: '...'});
instance.render('#container');
const {token} = await createToken(instance);
</script>

After (typed submit() via template ref):

<template>
  <CardInput ref="cardInput" :payment-id="paymentId" :on-change="handleChange" />
</template>

<script setup lang="ts">
import {ref} from 'vue';
import {CardInput} from '@monei-js/vue-components';

const cardInput = ref<InstanceType<typeof CardInput>>();
const {token} = await cardInput.value!.submit({cardholderName: 'John'});
</script>

Full example

<template>
  <div>
    <CardInput ref="cardInput" :payment-id="paymentId" :on-change="handleChange" />
    <button @click="handleSubmit">Pay</button>
    <p v-if="error">{{ error }}</p>
  </div>
</template>

<script setup lang="ts">
import {ref} from 'vue';
import {CardInput, confirmPayment} from '@monei-js/vue-components';

const props = defineProps<{paymentId: string}>();
const cardInput = ref<InstanceType<typeof CardInput>>();
const error = ref('');

function handleChange({isValid}: {isValid: boolean}) {
  error.value = '';
}

async function handleSubmit() {
  const result = await cardInput.value!.submit();
  if (result.error) {
    error.value = result.error;
    return;
  }
  await confirmPayment({paymentId: props.paymentId, paymentToken: result.token});
}
</script>

Documentation

Full API reference: docs.monei.com/monei-js/reference

License

MIT