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

@vue-stripe/vue-stripe

v6.2.0

Published

Vue Stripe elements and composables for Stripe.js

Readme


Vue Stripe is an official Stripe partner

Announcement

Vue Stripe 6 is out. It runs on Stripe.js 10 (Endive) and supports Vue 3 and Vue 2.7 from one build. Upgrading from v5? Follow Migrating from v5 to v6. Release notes are on GitHub Releases.

If you find a bug or have a suggestion, please create an issue or submit a pull request. Your contributions are greatly appreciated!

Requirements

| Package | Version | |---------|---------| | vue | ^2.7.0 \|\| ^3.0.0 (Vue 2.6 is not supported) | | @stripe/stripe-js | ^10.3.0 (Stripe.js Endive; public types include the Pricing SDK (10.2.1) and the Payment Element fieldchange event (10.3.0)) |

Upgrading from v5? Read Migrating from v5 to v6.

Installation

npm install @vue-stripe/vue-stripe@^6 @stripe/stripe-js@^10.3.0

Import the component styles once, for example in main.ts:

import '@vue-stripe/vue-stripe/style.css'

Basic Usage

Composables such as usePaymentIntent() read the Stripe context, so call them in a component rendered inside VueStripeElements:

<!-- CheckoutPage.vue -->
<template>
  <VueStripeProvider :publishable-key="publishableKey">
    <VueStripeElements :client-secret="clientSecret">
      <VueStripePaymentElement />
      <PayButton :client-secret="clientSecret" />
    </VueStripeElements>
  </VueStripeProvider>
</template>

<script setup lang="ts">
import { VueStripeProvider, VueStripeElements, VueStripePaymentElement } from '@vue-stripe/vue-stripe'
import PayButton from './PayButton.vue'

const publishableKey = 'pk_test_...'
const clientSecret = 'pi_..._secret_...' // from your server
</script>
<!-- PayButton.vue -->
<template>
  <button :disabled="loading" @click="pay">Pay now</button>
  <p v-if="error">{{ error }}</p>
</template>

<script setup lang="ts">
import { usePaymentIntent } from '@vue-stripe/vue-stripe'

const props = defineProps<{ clientSecret: string }>()
const { confirmPayment, loading, error } = usePaymentIntent()

const pay = () =>
  confirmPayment({
    clientSecret: props.clientSecret,
    confirmParams: { return_url: `${window.location.origin}/complete` }
  })
</script>

## Components

### Providers

| Component | Description |
|-----------|-------------|
| `VueStripeProvider` | Loads Stripe.js and provides the Stripe instance |
| `VueStripeElements` | Creates an Elements group (client secret or mode/currency/amount) |
| `VueStripeCheckoutElementsProvider` | Elements with Checkout Sessions (`ui_mode: 'elements'`); `VueStripeCheckoutProvider` is a deprecated alias |
| `VueStripeCheckoutFormProvider` | Checkout Form SDK for a Checkout Session with `ui_mode: 'form'` (Stripe beta) |

Or install the `createVueStripe()` plugin to provide Stripe to the whole app without a `VueStripeProvider`.

### Elements

| Component | Description |
|-----------|-------------|
| `VueStripePaymentElement` | Every payment method in one UI (recommended) |
| `VueStripeExpressCheckoutElement` | Apple Pay, Google Pay, Link and other wallets |
| `VueStripeLinkAuthenticationElement` | Email collection and Link sign-in |
| `VueStripeAddressElement` | Billing or shipping address with autocomplete |
| `VueStripePaymentMethodMessagingElement` | Buy now, pay later messaging |
| `VueStripeCardElement` | Single card input |
| `VueStripeCardNumberElement`, `VueStripeCardExpiryElement`, `VueStripeCardCvcElement` | Split card inputs |
| `VueStripeIbanElement` | IBAN for SEPA Direct Debit |
| `VueStripeAuBankAccountElement` | BECS Direct Debit (Australia) |
| `VueStripeTaxIdElement` | Business tax ID (Checkout Sessions, Stripe beta) |
| `VueStripeCurrencySelectorElement` | Local currency selection (Checkout Sessions, Adaptive Pricing) |
| `VueStripeContactDetailsElement` | Customer email (Checkout Sessions or Elements) |
| `VueStripeTermsElement` | Terms the customer accepts (Stripe beta) |
| `VueStripeLinkSignupElement` | Save details to Link (Stripe beta) |
| `VueStripeIssuingCardNumberDisplayElement`, `VueStripeIssuingCardCvcDisplayElement`, `VueStripeIssuingCardExpiryDisplayElement`, `VueStripeIssuingCardPinDisplayElement` | Stripe Issuing card details in Stripe-hosted iframes |
| `VueStripeIssuingCardCopyButtonElement`, `VueStripeIssuingAddToWalletButtonElement` | Copy an issued card detail; add an issued card to a wallet (Stripe private preview) |

Stripe removed the standalone iDEAL, P24, EPS and FPX elements; the Payment Element collects these payment methods.

### Checkout

| Component | Description |
|-----------|-------------|
| `VueStripeCheckout` | Button that redirects to a hosted Checkout Session URL |
| `VueStripeEmbeddedCheckout` | Stripe's Checkout page embedded in your page (`ui_mode: 'embedded_page'`) |
| `VueStripeCheckoutForm` | Stripe's complete checkout form as one element, inside `VueStripeCheckoutFormProvider` (Stripe beta) |
| `VueStripePricingTable` | Embeds a pricing table configured in the Stripe Dashboard |

### Disclosures

| Component | Description |
|-----------|-------------|
| `VueStripeFinancialAccountDisclosure`, `VueStripeIssuingDisclosure`, `VueStripeTreasuryDisclosure` | Legal text rendered by Stripe.js (React Stripe.js 7 parity) |

## Composables

| Composable | Description |
|------------|-------------|
| `useStripe()` | The Stripe instance |
| `useStripeElements()` | The Elements group, `submit()`, `fetchUpdates()` and `getElement()` |
| `usePaymentIntent()` | Confirm and retrieve PaymentIntents |
| `useSetupIntent()` | Confirm and retrieve SetupIntents |
| `useConfirmCardPayment()`, `useConfirmSepaDebitSetup()`, ... | One composable per Stripe.js `confirm<Method>Payment` / `confirm<Method>Setup` method (46 in Stripe.js 10) |
| `useCreatePaymentMethod()` | Create a PaymentMethod from Elements |
| `useCreateConfirmationToken()` | Create a ConfirmationToken to confirm on your server |
| `useCreateToken()` | Create a Token (card, bank account, PII, Connect account / person) |
| `useHandleNextAction()` | Finish 3D Secure and other next actions |
| `useHandleCardAction()` | 3D Secure for manually confirmed PaymentIntents (legacy) |
| `useVerifyMicrodepositsForPayment()`, `useVerifyMicrodepositsForSetup()` | Verify a bank account with micro-deposits |
| `useRadarSession()` | Create a Radar Session for fraud signals |
| `useEphemeralKeyNonce()` | Create the nonce for the Issuing Elements |
| `useFinancialConnections()` | Financial Connections and ACH bank account collection |
| `useIdentity()` | Stripe Identity verification modal |
| `usePaymentRequest()` | Payment Request API behind your own button (prefer the Express Checkout Element for new integrations) |
| `useCheckoutSession()` | Session state and actions inside `VueStripeCheckoutElementsProvider` |
| `useCheckoutForm()` | Confirm the Checkout Form and drive its session inside `VueStripeCheckoutFormProvider` (Stripe beta) |
| `useStripeCheckout()` | Redirect to a hosted Checkout Session URL |
| [`usePricing()`](https://vuestripe.com/api/composables/use-pricing) | Explicitly initialize the Pricing SDK for currency selection, localized prices and pricing tokens (Stripe beta; not yet verified end to end) |

## TypeScript

Full TypeScript support with re-exported Stripe.js types:

```typescript
import type {
  StripeElementChangeEvent,
  PaymentIntent,
  SetupIntent
} from '@vue-stripe/vue-stripe'

Documentation

  • Website - Official website for Vue Stripe
  • Guides - Guides for using Vue Stripe
  • API Reference - API reference for Vue Stripe components and composables
  • Playground - Interactive playground for testing Vue Stripe components and integrations
  • Backend - Backend for the playground

License

MIT License. Copyright 2017-2026 Vue Stripe Contributors.