Socket
Socket
Sign inDemoInstall

metrics-stripe-charges

Package Overview
Dependencies
12
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    metrics-stripe-charges

Stripe charges plugin for segmentio/metrics


Version published
Weekly downloads
6
Maintainers
1
Install size
301 kB
Created
Weekly downloads
 

Readme

Source

metrics-stripe-charges

A Stripe charges plugin for segmentio/metrics.

Use this plugin to visualize Stripe charges over time.

Installation

$ npm install metrics-stripe-charges

Quickstart

Here's a full example of a Geckoboard dashboard showing Stripe charge metrics:

var Metrics = require('metrics');
var charges = require('metrics-stripe-charges');
var geckoboard = require('geckoboard')('api-key');

new Metrics()
  .every('10m', charges('stripe-key'))
  .use(function (metrics) {
    metrics.on('stripe charged', function (metric) {
      geckoboard('widget-id').number(metric.latest());
    });
  });
Filter Customers

You can further filter customers using stripe-charges filters:

new Metrics()
  .every('10m', charges('stripe-key', { filter: filter }));

function filter (charge) {
  return charge.customer !== 'cus_8239d2jd9j'; // filter enterprise customer X
}

Metrics

The metrics exposed by this plugin are:

  • stripe charges - the number of charges
  • stripe charged - the dollar amount charged

and are calculated for the last 30 days, last 52 weeks, and last 10 years.

License

MIT

Keywords

FAQs

Last updated on 16 Jan 2015

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