In my node application iam usign the modules system which i specified in my package file
{
"name": "ccbill-node-integration",
"version": "1.0.0",
"description": "node integration for ccbill",
"main": "ppayproc1.js",
"type": "module",
.....
this allows me to declare somnething like import express from ... instead of require.
iam working on stripe integration. as per their docs
const stripe = require('stripe')('sk_test_51_secretkey');
whats the equivalent of this using import.
i was thingking i can do something like
import stripe from 'stripe';
stripe('sk_test_51_secretkey');
will this be considered valid ?
thank you
Try the following, replacing
your_secret_keywith the key created via Stripes dashboard.