@vue-stripe/vue-stripe
Vue Stripe
Vue.js library for Stripe Checkout and Elements
Vue 3 and Vue 2.7, TypeScript-first
Website | Guides | API Playground Backend
Vue Stripe is an official Stripe partner
Announcement
Thank you for your patience! This is an early release of the new Vue Stripe. As with any early release, you may encounter bugs. If you find any issues or have suggestions, please create an issue or submit a pull request. Your contributions are greatly appreciated!
A note on AI-assisted maintenance
I've decided to start using AI to help me maintain Vue Stripe, and I want to be upfront with you about it. Rest assured that everything is still kept under heavy scrutiny — every change is reviewed, tested, and verified by me before it ships.
To be honest about the reality of it: I maintain this project largely on my own, and only in whatever extra time I can find. That time is limited, and I'm often not able to give it my full 100%. With just one person, it's genuinely hard to find the time to provide the quality and pace of work the project deserves without some extra help. Bringing AI in as an assistant lets me move faster and cover more ground — more tests, better docs, quicker fixes — while I stay in the loop as the human who reviews and approves everything.
Thank you for understanding, and for continuing to support Vue Stripe.
Features
- Vue 3 and Vue 2.7 — One build for both, tested on each in CI
- Stripe.js 10 — Payment, Express Checkout, Address, Tax ID, Currency Selector and more, plus Checkout Sessions with Elements
- TypeScript First — Full TypeScript support with comprehensive types
- Modern Elements — Payment Element supporting 40+ payment methods
- Composition API — Composables for confirming payments (one per Stripe.js confirm method), tokens, Financial Connections, Identity and Checkout Sessions
- Every Checkout — Hosted Checkout, Embedded Checkout, Custom Checkout and the Checkout Form (beta)
- 100% Stripe.js coverage — Every Stripe.js 10 element and method has a component or composable (coverage)
- Customizable — Full support for Stripe's Appearance API
- Well Tested — Comprehensive test suite
- SSR Ready — Support for Nuxt 3 and server-side rendering
Quick Start
Requirements
| Package | Version |
|---|---|
vue |
^2.7.0 || ^3.0.0 (Vue 2.6 is not supported) |
@stripe/stripe-js |
^10.0.0 (Stripe.js Endive) |
Upgrading from v5? Read Migrating from v5 to v6.
Installation
npm install @vue-stripe/vue-stripe@^6 @stripe/stripe-js@^10
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>
## Documentation
- [Website](https://vuestripe.com) - Official website for Vue Stripe
- [Guides](https://vuestripe.com/guide/introduction) - Guides for using Vue Stripe
- [API Reference](https://vuestripe.com/api/) - API reference for Vue Stripe components and composables
- [Playground](https://playground.vuestripe.com) - Interactive playground for testing Vue Stripe components and integrations
- [Backend](https://backend.vuestripe.com) - Backend for the playground
## Monorepo Structure
This repository is organized as a monorepo using pnpm workspaces and Turborepo:
vue-stripe/ ├── packages/ │ ├── vue-stripe/ # Main library (@vue-stripe/vue-stripe) │ └── vue2-smoke/ # Runs the built library under Vue 2.7 in CI ├── apps/ │ ├── docs/ # VitePress documentation site │ ├── playground/ # Development playground │ └── backend/ # Backend for the playground └── tools/ └── typescript-config/ # Shared TypeScript configuration
### Packages
| Package | Description |
|---------|-------------|
| [@vue-stripe/vue-stripe](https://github.com/vue-stripe/vue-stripe/blob/HEAD/packages/vue-stripe) | Main library package |
| [@vue-stripe/docs](https://github.com/vue-stripe/vue-stripe/blob/HEAD/apps/docs) | VitePress documentation |
| [@vue-stripe/playground](https://github.com/vue-stripe/vue-stripe/blob/HEAD/apps/playground) | Development playground |
| [@vue-stripe/backend](https://github.com/vue-stripe/vue-stripe/blob/HEAD/apps/backend) | Backend for the playground |
## Development
### Prerequisites
- Node.js 22+ (24 recommended, see `.nvmrc`)
- pnpm 12+ (`corepack enable`)
### Getting Started
```bash
# Install dependencies
pnpm install
# Start development (all apps)
pnpm dev
# Start playground only
pnpm playground:dev
# Start documentation only
pnpm docs:dev
Building & Testing
# Build all packages
pnpm build
# Run all tests
pnpm test
# Lint all packages
pnpm lint
Contributors
This project exists thanks to all the people who contribute. [Contribute]
Sponsors
If Vue Stripe saves you time, you can support its maintenance through GitHub Sponsors.
License
MIT License. Copyright 2017-2026 Vue Stripe Contributors.
Made with love by Joff Tiquez
Related Packages
A Vue component that styles Stripe Elements to match the Vuetify UI library.
Version History
| Version | Released | License |
|---|---|---|
| 6.0.0 | MIT | |
| 5.7.0 | MIT | |
| 5.6.0 | MIT | |
| 5.5.0 | MIT | |
| 5.4.0 | MIT | |
| 5.3.0 | MIT | |
| 5.2.1 | MIT | |
| 5.2.0 | MIT | |
| 5.1.1 | MIT | |
| 5.0.0 | MIT | |
| 4.5.0 | MIT | |
| 4.4.4 | MIT | |
| 4.4.3 | MIT | |
| 4.4.2 | MIT | |
| 4.4.1 | MIT | |
| 4.4.0 | MIT | |
| 4.3.3 | MIT | |
| 4.3.2 | MIT | |
| 4.2.10 | MIT | |
| 4.2.9 | MIT | |
| 4.2.8 | MIT | |
| 4.2.7 | MIT | |
| 4.2.5 | MIT | |
| 4.2.4 | MIT | |
| 4.2.3 | MIT | |
| 4.2.2 | MIT | |
| 4.2.1 | MIT | |
| 4.2.0 | MIT | |
| 4.1.9 | MIT | |
| 4.1.8 | MIT |
Showing the latest 30 of 42. See every release on npm
Pre-releases (10)
| Version | Released | License |
|---|---|---|
| 6.0.0-beta.6 | MIT | |
| 6.0.0-beta.5 | MIT | |
| 6.0.0-beta.4 | MIT | |
| 6.0.0-beta.3 | MIT | |
| 6.0.0-beta.2 | MIT | |
| 6.0.0-beta.1 | MIT | |
| 6.0.0-beta.0 | MIT | |
| 4.0.0-beta.3 | MIT | |
| 4.0.0-beta.2 | MIT | |
| 4.0.0-beta.0 | MIT |