
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
stripe-mock-webhooks
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Socket optimized override available
Quickly test Stripe Webhooks against your application without hitting Stripe or requiring internet connectivity.
$ npm install stripe-mock-webhooks --save-dev
// Require
var StripeMockWebhooks = require('stripe-mock-webhooks')
// Tell the server where it should send events
var webhooks = new StripeMockWebhooks({
version: '2015-10-01', // Default is latest Stripe API version
url: 'http://localhost:3001/stripe/events'
})
Send a webhook:
webhooks.trigger('invoice.created').then(function (response) {
// success
}).catch(function (err) {
// error
})
Or overwrite values in the response:
webhooks.trigger('invoice.created', {
data: {
object: {
plan: {
id: 'PLAN_IDENTIFIER'
}
}
}
})
Additional options can be turned on / off:
webhooks.trigger('invoice.created', undefined, {
now: false
})
Build JSON
response without triggering an event:
var response = webhooks.build('invoice.created', {
data: {
object: {
plan: {
id: 'PLAN_IDENTIFIER'
}
}
}
})
Supports the same arguments as webhooks.trigger
now
- Updates event created
timestamp to Date.now()
, defaults to true
Look in tests to see example usage.
MIT © Nijiko Yonskai
FAQs
Test Stripe Webhooks, no internet required
The npm package stripe-mock-webhooks receives a total of 65 weekly downloads. As such, stripe-mock-webhooks popularity was classified as not popular.
We found that stripe-mock-webhooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.