I want to try the invoicing API in vuejs. The code example I want to apply is
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
const stripe = require('stripe')(
'sk_test_51M6ZtzIWDjpHNQK1pihAHQGM9Hh7aGVggo7yICRvYNUPqmHA2nIB9OLU6UrVmnWU8Spzcl1ZkPdRZu6zYCSVO7fi008peIrX1g'
);
const customer = await stripe.customers.create({
email: 'jenny.rosen@example.com',
payment_method: 'pm_card_visa',
invoice_settings: {default_payment_method: 'pm_card_visa'},
});
This does'nt work and I get the error
Require is not defined
How to change this piece of code ?