paypal-check
v1.0.0
Published
Instant PayPal payment diagnostics — find failed payments, disputes, refunds, and lost revenue in seconds
Maintainers
Readme
paypal-check
Instant PayPal payment diagnostics — find failed payments, disputes, refunds, and lost revenue in seconds.
npx paypal-checkSetup
Set your PayPal credentials as environment variables (or in a .env file):
PAYPAL_CLIENT_ID=your_client_id
PAYPAL_CLIENT_SECRET=your_client_secretGet credentials at: https://developer.paypal.com/dashboard/applications
Modes
| Command | What it shows |
|---|---|
| npx paypal-check | 30-day payment health: total, completed, failed, failure rate |
| npx paypal-check --loss | Estimated lost revenue from failed, denied, voided transactions |
| npx paypal-check --declines | Failure reasons grouped by status type |
| npx paypal-check --recovery | Failed payers that later succeeded |
| npx paypal-check --customers | Repeat failed payers and high-risk accounts |
| npx paypal-check --disputes | Open disputes, dispute amounts, dispute rate |
| npx paypal-check --refunds | Refund volume, refund rate, largest refunds |
| npx paypal-check --webhooks | Whether key payment/dispute/refund events are configured |
| npx paypal-check --spike | Last 24h failure spike vs previous 24h |
| npx paypal-check --products | Lost revenue by product/item name |
Credential detection
Credentials are auto-detected from:
PAYPAL_CLIENT_ID+PAYPAL_CLIENT_SECRETenv vars.env,.env.local,.env.development,.env.productionfiles
Or pass directly:
npx paypal-check --client-id <id> --secret <secret>Sandbox mode
Set PAYPAL_SANDBOX=true to connect to the PayPal sandbox environment.
License
MIT
