Skip to main content

Security research tool to enumerate and inspect Stripe API keys

Project description

StripeInspector Logo

StripeInspector

Security research tool for Stripe API key enumeration and inspection

PyPI Python License

StripeInspector Demo


StripeInspector takes a Stripe API key and enumerates everything accessible through it — account details, customers, charges, payouts, products, webhooks, and more. Built for security researchers, penetration testers, and bug bounty hunters.

Features

  • 17 inspection modules — account, balance, customers, charges, payment intents, products, payouts, subscriptions, invoices, webhooks, events, connected accounts, disputes, refunds, balance transactions, coupons
  • Permission scanner — probes 35+ Stripe API endpoints to build a full access matrix
  • CLI + Web UI — both treated as first-class interfaces
  • 5 output formats — colored terminal tables, JSON, HTML inspection reports, PDF, CSV
  • Deep pagination--deep fetches all pages, not just first 100
  • PII exposure summary — auto-detects emails, names, phones, card numbers across all modules
  • Key type detection — auto-identifies test/live, secret/restricted keys
  • Multi-key batch mode — scan a list of keys from a file
  • Diff mode — compare permissions between two keys
  • Self-hosted web UI — dark/light theme, real-time SSE streaming, shareable inspections
  • Optional auth — bearer token support for securing the web UI

Installation

pip install stripe-inspector

Or with uv:

uv pip install stripe-inspector

For PDF report support:

pip install stripe-inspector[pdf]

Quick Start

CLI

# Inspect a key (all modules)
stripe-inspector inspect sk_test_xxxx

# JSON output (pipe to jq, scripts, etc.)
stripe-inspector inspect sk_test_xxxx --output json

# Generate an HTML inspection report
stripe-inspector inspect sk_test_xxxx --report findings.html

# Deep scan — fetch all pages
stripe-inspector inspect sk_test_xxxx --deep

# Specific modules only
stripe-inspector inspect sk_test_xxxx --modules account,customers,charges

# Silent mode — no table output, just save report
stripe-inspector inspect sk_test_xxxx --silent --report findings.html

# Export per-module CSV files
stripe-inspector inspect sk_test_xxxx --csv ./output

# Batch scan multiple keys
stripe-inspector batch keys.txt --report-dir ./reports

# Compare two keys
stripe-inspector diff sk_test_key1 sk_test_key2

# List all available modules
stripe-inspector list-modules

Web UI

# Start on localhost:8000
stripe-inspector serve

# Custom port with auth token
stripe-inspector serve --port 9000 --token mysecrettoken

# Expose to network (use with --token)
stripe-inspector serve --host 0.0.0.0 --token mysecrettoken

Open http://localhost:8000 in your browser, paste a key, and hit Inspect. The web UI features real-time progress streaming, module selection, dark/light theme, and shareable inspection links.

Modules

Module Endpoint What It Finds
account /v1/account Owner name, email, country, address, business type, MCC, capabilities
balance /v1/balance Available and pending balances per currency
customers /v1/customers Customer names, emails, phone numbers, metadata
charges /v1/charges Payment amounts, payer details, card info, countries
payment_intents /v1/payment_intents Intent status, amounts, payment methods
products /v1/products Product names, types, pricing, active status
payouts /v1/payouts Payout amounts, bank destinations, schedules
subscriptions /v1/subscriptions Active plans, billing cycles, customers
invoices /v1/invoices Invoice amounts, payment status, hosted URLs
webhooks /v1/webhook_endpoints Endpoint URLs, subscribed event types
events /v1/events Recent API activity and event log
connected /v1/accounts Connected accounts (Stripe Connect platforms)
disputes /v1/disputes Chargebacks, fraud disputes, resolution status
refunds /v1/refunds Refund amounts, reasons, associated charges
balance_transactions /v1/balance_transactions Full money flow: charges, fees, payouts, refunds
coupons /v1/coupons Discount codes, percent/amount off, redemption counts
permission_scan 35+ endpoints Full endpoint access matrix (allowed/denied/error)

Key Types

Prefix Type Risk Level
sk_test_ Secret test key Low — sandbox data only
sk_live_ Secret live key High — real customer data
rk_test_ Restricted test key Low — limited permissions
rk_live_ Restricted live key Medium — limited but real data

Privacy & Security

  • Keys are never logged or stored to disk
  • The web UI sends keys only to Stripe's API from the backend — never to third parties
  • Inspection reports mask keys (show first 8 + last 4 characters only)
  • Shared inspections contain no API keys and expire after 24 hours
  • Use --token to protect the web UI when exposing beyond localhost
  • All timestamps include both raw Unix epoch and human-readable format

Disclaimer

This tool is intended for authorized security testing, bug bounty programs, penetration testing engagements, and educational purposes only. Only use it on API keys you own or have explicit written authorization to test.

Unauthorized access to third-party systems is illegal. The author assumes no liability for misuse of this tool.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT - Ijaz Ur Rahim

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stripe_inspector-0.5.1.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stripe_inspector-0.5.1-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file stripe_inspector-0.5.1.tar.gz.

File metadata

  • Download URL: stripe_inspector-0.5.1.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stripe_inspector-0.5.1.tar.gz
Algorithm Hash digest
SHA256 c5fe461d2dfb6a8b4fb6ff85471c0cf0f8a7c482799881f70f8a790dc5df9391
MD5 5301250fc8aed790809366f0c4461895
BLAKE2b-256 ee0fdae4dc6c941dfcf3193cd54f28b467df8bf9a95b1c071c5925d913fbc42c

See more details on using hashes here.

File details

Details for the file stripe_inspector-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: stripe_inspector-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stripe_inspector-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eea05293ddfcde14f84efb7a1be82fa8055f231b0aa1aa21116036f4a22bb1e3
MD5 b85b60f02fb24133fb85b340c0dc7850
BLAKE2b-256 30c48f2e55c2d0f93055bd151581bc8af74833b323141b8895fbad6179488a94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page