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 - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

test/cards.js

5

history.md

@@ -0,1 +1,6 @@

#### 0.1.0 / July 16th, 2013
* Added support for the [cards](https://stripe.com/docs/api#cards) API.
#### 0.0.1 / June 26th, 2013

@@ -2,0 +7,0 @@

@@ -127,2 +127,46 @@ /*!

// -------------------------------------------
// Cards API
//
cards: {
create: function(customer_id, data, cb) {
_request('post', '/customers/' + customer_id + '/cards', data, cb);
},
retrieve: function(customer_id, card_id, cb) {
_request('get', '/customers/' + customer_id + '/cards/' + card_id, cb);
},
update: function(customer_id, card_id, data, cb) {
_request('post', '/customers/' + customer_id + '/cards/' + card_id, data, cb);
},
del: function(customer_id, card_id, cb) {
_request('delete', '/customers/' + customer_id + '/cards/' + card_id, cb);
},
list: function(customer_id, data, cb) {
if ( arguments.length === 3 ) {
var query = querystring.stringify(data);
_request('get', '/customers/' + customer_id + '/cards?' + query, cb);
} else {
var cb = data;
_request('get', '/customers/' + customer_id + '/cards', cb);
}
}
},
//
// -------------------------------------------
// Charges API

@@ -129,0 +173,0 @@ //

4

package.json
{
"name": "stripe-api",
"version": "0.0.1",
"description": "Stripe.com API wrapper.",
"version": "0.1.0",
"description": "The Stripe.com API",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -14,32 +14,14 @@ ## node-stripe-api

```javascript
var stripe = require('stripe-api')(<your_stripe_api_key);
var stripe = require('stripe-api')(<your_stripe_api_key>);
stripe.<api_group>.<api_group_command>([arguments,] callback);
```
###### example
### examples
```javascript
stripe.charges.create(
{
amount: 100,
currency: 'usd',
card:
{
number: 4242424242424242,
exp_month: 12,
exp_year: 15
},
description: 'Quick stripe-api example.'
},
[http://emiliote.github.io/node-stripe-api/](http://emiliote.github.io/node-stripe-api/)
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](https://stripe.com/docs/api).
The `data` argument is a javascript object with key/value pairs that match what's expected by the [Stripe API](https://stripe.com/docs/api).

@@ -65,2 +47,11 @@

##### [cards](https://stripe.com/docs/api#cards)
* `create(customer_id, data, cb)`
* `retrieve(customer_id, card_id, cb)`
* `update(customer_id, card_id, data, cb)`
* `del(customer_id, card_id, cb)`
* `list(customer_id, [data,] cb)`
##### [subscriptions](https://stripe.com/docs/api#subscriptions)

@@ -67,0 +58,0 @@

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