stripe-debug
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 9
- Forks
- 1
02 资源文件 1
- 参考文档agents/openai.yaml114 B
03 SKILL.md 正文
/stripe-debug — Stripe Integration Debugging Skill
Trigger
User says: "stripe-debug", "payment issue", "webhook failing", "subscription problem", "billing debug", "stripe error"
Purpose
Debug Stripe billing, webhooks, and subscription issues in the codebase.
Steps
1. Configuration Check
# Verify environment variables are set
env | grep STRIPE
# Check for test vs live mode
echo $STRIPE_SECRET_KEY | head -c 7 # Should show sk_test_ or sk_live_
- Verify
tax_id_collectionis configured (known requirement in this codebase) - Verify
customer_update[address]is set (known requirement)
2. Webhook Debugging
# List recent webhook events (requires Stripe CLI)
stripe events list --limit 10
# Listen to webhooks locally
stripe listen --forward-to localhost:PORT/api/webhooks/stripe
# Trigger a test event
stripe trigger checkout.session.completed
- Check webhook endpoint URL is correct in Stripe Dashboard
- Verify webhook signing secret matches
STRIPE_WEBHOOK_SECRET - Check for 2xx response from webhook handler
3. Subscription Issues
# Check customer details
stripe customers retrieve CUSTOMER_ID
# List subscriptions
stripe subscriptions list --customer CUSTOMER_ID --limit 5
# Check specific subscription
stripe subscriptions retrieve SUB_ID
- Verify price IDs match between code and Stripe Dashboard
- Check subscription status: active, past_due, canceled, trialing
- Look for failed payment intents on the subscription
4. Common Error Patterns
resource_missing: Check if using test-mode IDs against live-mode key (or vice versa)authentication_error: Wrong API key or key not setcard_declined: Expected in test mode with specific test card numberswebhook_signature_verification_failed: Signing secret mismatch or raw body not preserved
5. Code-level Debug
- Search for Stripe initialization:
grep -rn "new Stripe\|stripe(" --include="*.ts" --include="*.tsx" - Find webhook handler:
grep -rn "webhooks/stripe\|webhook.*stripe" --include="*.ts" - Check middleware preserves raw body for webhook signature verification
Rules
- NEVER log or echo full Stripe secret keys
- NEVER run charges against live mode without user confirmation
- Always verify test/live mode before any Stripe CLI commands
- Watch for
tax_id_collectionandcustomer_update[address]config requirements
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
docs:write-concisely
Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.
kaizen:why
Iterative Five Whys root cause analysis drilling from symptoms to fundamentals
verification-loop
A comprehensive verification system for Claude Code sessions.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always