Gathering detailed insights and metrics for @gourmetpro/vue-stripe-js
Gathering detailed insights and metrics for @gourmetpro/vue-stripe-js
Gathering detailed insights and metrics for @gourmetpro/vue-stripe-js
Gathering detailed insights and metrics for @gourmetpro/vue-stripe-js
Vue components for Stripe.js and Stripe Elements
npm install @gourmetpro/vue-stripe-js
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (76.81%)
JavaScript (14.1%)
Vue (9.09%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
11 Commits
1 Forks
1 Watchers
24 Branches
1 Contributors
Updated on Jan 31, 2023
Latest Version
0.3.0
Package Id
@gourmetpro/vue-stripe-js@0.3.0
Unpacked Size
105.08 kB
Size
13.28 kB
File Count
17
NPM Version
6.13.4
Node Version
10.19.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
22
Vue components for Stripe.js and Elements.
First, install Vue Stripe.js and Stripe.js.
1npm install @gourmetpro/vue-stripe-js @stripe/stripe-js
Install the plugin in your src/main.js
1import Vue from "vue"; 2import App from "./App.vue"; 3import { loadStripe } from "@stripe/stripe-js"; 4import VueStripe from "@gourmetpro/vue-stripe-js"; 5 6const stripePromise = loadStripe('pk_test_xxxxxxxxx'); 7Vue.use(VueStripe, { stripe: stripePromise }); 8 9new Vue({ 10 render: (h) => h(App), 11}).$mount('#app');
Then in one of your components
1<template> 2 <div> 3 <card-element 4 v-if="$stripe.elements" 5 @change="ccCompleted = $event.complete" 6 @ready="card = $event" 7 > 8 <button @click="payByCard">Subscribe</button> 9 </div> 10</template> 11 12<script> 13import { CardElement } from "@gourmetpro/vue-stripe-js"; 14 15export default { 16 components: { CardElement }, 17 data() { 18 return { 19 ccCompleted: false, 20 card: null; 21 } 22 }, 23 methods: { 24 async submit() { 25 if (!this.$stripe.stripe || !this.card) { 26 return; 27 } 28 const { 29 error, 30 paymentMethod 31 } = await this.$stripe.stripe.createPaymentMethod({ 32 type: "card", 33 card: this.card 34 }); 35 } 36 } 37} 38</script>
In parent component (e.g. src/App.vue
)
1<template> 2 <elements :stripe="stripePromise"> 3 <checkout-form /> 4 </elements> 5</template> 6 7<script> 8import { Elements } from "@gourmetpro/vue-stripe-js"; 9import CheckoutForm from "@/components/CheckoutForm.vue"; 10 11export default { 12 components: { 13 Elements, 14 CheckoutForm, 15 }, 16 data() { 17 return { 18 stripePromise: loadStripe("pk_test_xxxxxxxxx"); 19 } 20 } 21} 22</script>
In child component (e.g. src/components/CheckoutForm.vue
)
1<template> 2 <elements-consumer> 3 <template v-slot="{stripe, elements}"> 4 <card-element 5 v-if="elements" 6 @change="ccCompleted = $event.complete" 7 @ready="card = $event" /> 8 <button @click.prevent="submit(stripe)" :disabled="!stripe || !ccCompleted">Pay</button> 9 </template> 10 </elements-consumer> 11</template> 12 13<script> 14import { CardElement, ElementsConsumer } from "@gourmetpro/vue-stripe-js"; 15 16export default { 17 components: { CardElement, ElementsConsumer }, 18 data() { 19 return { 20 ccCompleted: false, 21 card: null; 22 } 23 }, 24 methods: { 25 async submit(stripe) { 26 if (!this.card) { 27 return; 28 } 29 30 const { error, paymentMethod } = await stripe.createPaymentMethod({ 31 type: "card", 32 card: this.card 33 }); 34 } 35 } 36} 37</script>
The minimum supported version of Vue is v2.6.
Vue Stripe.js is packaged with TypeScript declarations. Some types are pulled
from @stripe/stripe-js
—be sure to add
@stripe/stripe-js
as a dependency to your project for full TypeScript support.
Developer mode with entry point at dev/serve.ts
yarn serve
Build
yarn build
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
107 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More