Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stripe-api

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stripe-api

Stripe.com API wrapper.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-stripe-api

node.js wrapper for the Stripe API.

install

npm install stripe-api

usage

var stripe = require('stripe-api')(<your_stripe_api_key);
stripe.<api_group>.<api_group_command>([arguments,] callback);
example
stripe.charges.create(
    {
        amount: 100,
        currency: 'usd',
        card:
        {
            number:     4242424242424242,
            exp_month:  12,
            exp_year:   15
        },
        description: 'Quick stripe-api example.'
    },

    function(error, response) {
        console.log(response);
    }
);

api

The data argument is a javascript object that has key/value pairs that match what's expected by the Stripe API.

charges
  • create(data, cb)
  • retrieve(charge_id, cb)
  • refund(charge_id, [data,] cb)
  • capture(charge_id, [data,] cb)
  • list([data,] cb)
customers
  • create(data, cb)
  • retrieve(customer_id, cb)
  • update(customer_id, data, cb)
  • del(customer_id, cb)
  • list([data,] cb)
subscriptions
  • update(customer_id, data, cb)
  • cancel(customer_id, [data,] cb)
plans
  • create(data, cb)
  • retrieve(plan_id, cb)
  • update(plan_id, data, cb)
  • del(plan_id, cb)
  • list([data,] cb)
coupons
  • create(data, cb)
  • retrieve(coupon_id, cb)
  • del(coupon_id, cb)
  • list([data,] cb)
discounts
  • del(customer_id, cb)
invoices
  • retrieve(invoice_id, cb)
  • retrieveLineItems(invoice_id, [data,] cb)
  • create(customer_id, cb)
  • pay(invoice_id, cb)
  • update(invoice_id, data, cb)
  • list([data,] cb)
  • retrieveUpcoming(customer_id, cb)
invoiceItems
  • create(data, cb)
  • retrieve(invoiceItem_id, cb)
  • update(invoiceItem_id, data, cb)
  • del(invoiceItem_id, cb)
  • list([data,] cb)
disputes
  • update(charge_id, data, cb)
transfers
  • create(data, cb)
  • retrieve(transfer_id, cb)
  • cancel(transfer_id, cb)
  • list([data,] cb)
recipients
  • create(data, cb)
  • retrieve(recipient_id, cb)
  • update(recipient_id, data, cb)
  • del(recipient_id, cb)
  • list([data,] cb)
account
  • retrieve(cb)
balance
  • retrieve(cb)
  • list([data,] cb)
events
  • retrieve(event_id, cb)
  • list([data,] cb)
tokens
  • create(data, cb)
  • retrieve(token_id, cb)

test

All tests use should.js and were run with Mocha.

Keywords

FAQs

Package last updated on 27 Jun 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc