Socket
Socket
Sign inDemoInstall

node-stripe

Package Overview
Dependencies
47
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-stripe

API service to stripe in node.js


Version published
Weekly downloads
1
Maintainers
1
Install size
3.71 MB
Created
Weekly downloads
 

Readme

Source

Install

npm install node-stripe --save

init

To begin any stripe transactions or services using this module, We need to init

    var stripe=require('node-stripe');
 stripe.init({key:secret key},function(err,result){
        if(err)
        {
            console.log(err);
        }
        else
        {
		console.log(result);
		});
		
		

Creating Charges

    var stripe=require('node-stripe');
 stripe.init({key:secret key},function(err,result){
        if(err)
        {
            console.log(err);
        }
        else
        {
		stripe.charges({
        amount: 1500, // Amount in cents
            currency: "usd",
            customer: CustomerID // Previously stored, then retrieved)
		});
		
		}
		});
		

Customers

var stripe=require('../module/experiement');
    stripe.init({key:'secret key'},function(err,result){
        if(err)
        {
            console.log(err);
        }
        else
        {
            stripe.customers().listAll( function(err, customer) {
                // asynchronously called
                if(err)
                {
                    res.send(err);
                    res.end();
                    return false;
                }
                else
                {
                    res.send(customer)
                    res.end();
                    return false;
                }
            });
        }

    });

FAQs

Last updated on 10 Dec 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc