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

metrics-stripe-charges

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metrics-stripe-charges

Stripe charges plugin for segmentio/metrics

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-16.67%
Maintainers
1
Weekly downloads
 
Created
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 today', geckoboard('widget-id').number);
  });
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 divided by date granularity.

Daily:

  • stripe charges today - the number of charges today
  • stripe charged today - the amount charged today
  • stripe charges yesterday - the number of charges yesterday
  • stripe charged yesterday - the amount charged yesterday
  • stripe charges 2 days ago - the number of charges 2 days ago
  • stripe charged 2 days ago - the amount charged 2 days ago

Weekly:

  • stripe charges past week - the number of charges last week
  • stripe charged past week - total charged last week
  • stripe charges 2 weeks ago - the number of charges 2 weeks ago
  • stripe charged 2 weeks ago - total charged 2 weeks ago

Monthly:

  • stripe charges past month - the number of charges last month
  • stripe charged past month - total charged last month
  • stripe charges 2 months ago - the number of charges 2 months ago
  • stripe charged 2 months ago - total charged 2 months ago

Total:

  • stripe charges - total amount of Stripe charges
  • stripe charged - total amount charged

Weekly Sparkline:

  • stripe charges last week - an array of charges in the past 7 days
  • stripe charged last week - an array of charge amounts in the past 7 days

License

MIT

Keywords

FAQs

Package last updated on 01 Jul 2014

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