Published
- 1 min read
import stripe in es6
The solution for this is noted below
import stripe in es6
Solution
import Stripe from 'stripe'
const stripe = new Stripe('sk_test_...')
;(async () => {
const customer = await stripe.customers.create({
email: 'customer@example.com'
})
console.log(customer.id)
})()
Try other methods by searching on the site. That is if this doesn’t work