@nodedk/stripe
stripe#
Create an authenticated Stripe SDK client.
Requirements#
A Stripe secret API key.
Install#
npm i @nodedk/stripe
Usage#
var stripe = require('@nodedk/stripe')
async function main() {
var client = stripe({ secretKey: process.env.STRIPE_SECRET_KEY })
var customers = await client.customers.list({ limit: 5 })
console.log(customers.data)
}
main().catch(console.error)
API#
stripe(options = {})#
options.secretKey is required. Returns the native Stripe client synchronously; throws Missing Stripe secretKey when the key is missing or falsy. Other fields in options are not forwarded.
The returned client exposes the Stripe Node.js API, including resource methods, pagination, and webhook helpers. Network operations return promises.
Created by Vidar Eldøy