
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
create-order
Advanced tools
Basic checkout page & checkout process & order creation for single-product stores.
Basic checkout page & checkout process & order creation for single-product stores.
Using npm:
$ npm install create-order --save
Using yarn:
$ yarn add create-order
In ExpressJS:
// Load the module.
const createOrder = require('create-order')
// The Express app.
const app = express()
// Setup the router.
app.use(createOrder.router({
// The name of the application.
app: 'Foo Bar',
// Stripe configuration options.
stripe: {
// Stripe API key.
key: 'STRIPE_API_KEY',
// Specify if charges should be captured.
// Note: When value is `false` charges will be authorized only.
capture: true
},
// Send confirmation emails after payment.
// Note: requires `pug-mailer` module to be initialized.
// More details: https://www.npmjs.com/package/pug-mailer
mail: {
// Confirmation emails will be sent from this email.
from: 'foo@bar.com'
},
// Delivery information.
delivery: {
// How long it usually takes to deliver the product.
days: 0
},
// Provide product details.
product: (req, res, quantity) => {
return {
// Product ID.
id: '1234567',
// Name of the product.
name: 'Foo Bar Product',
// Image of the product (Should be 150x150 pixels).
image: 'https://lorempixel.com/150/150',
// Specify meta information.
// Note: Meta information is not required.
meta: [
{
name: 'color',
label: 'Color',
value: 'red'
},
{
name: 'size',
label: 'Size',
value: 'XXL'
}
// ...
],
// Quantity.
quantity: quantity,
// Currency to show.
currency: 'USD',
// Unit price to show.
unit: 19.99,
// Gross price to show.
gross: 19.99 * quantity,
// Shipping price to show.
shipping: 10,
// Total to pay to show.
total: 19.99 * quantity + 10,
// In this currency client will be charged.
// Note: Defaults to `currency`.
baseCurrency: 'USD',
// Unit price which will be saved to the databse.
// Note: Defaults to `unit`.
baseUnit: 19.99,
// Gross price which will be saved to the databse.
// Note: Defaults to `gross`.
baseGross: 19.99 * quantity,
// Shipping price which will be saved to the databse.
// Note: Defaults to `shipping`.
baseShipping: 10,
// Total price which will be saved to the databse.
// Note: Defaults to `total`.
// Important: Client will be charged for this amount.
baseTotal: 19.99 * quantity + 10
}
}
}))
After setup the following routes become available:
http://localhost:3000/checkout - The checkout page.http://localhost:3000/thank-you/:id - Client is redirected here after a successfuly payment.http://localhost:3000/order/:id - Clients can view their orders on this page.Currently all orders are saved in a mongodb collection using the mongoose module based on the order-model model.
Currently we support only the following payment gateways:
We may add more payment gateways in future versions.
Currently we support only the following languages:
We may add more languages in future versions.
Payment confirmation emails are sent using pug-mailer module.
The MIT License (MIT)
Copyright (c) 2017 Ion Suman sumanion122@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
The npm package create-order receives a total of 15 weekly downloads. As such, create-order popularity was classified as not popular.
We found that create-order demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.