

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# Stripe Payment Rules89These rules apply when working on Stripe payment integration, webhooks, checkout flows, or subscription management.1011## Test Mode Safety (CHECK FIRST)1213Before ANY payment work:1415- [ ] Verify `STRIPE_SECRET_KEY` starts with `sk_test_`16- [ ] Confirm test webhook secret (`whsec_...` from Stripe CLI)17- [ ] Use test card numbers only (4242 4242 4242 4242)18- [ ] Never use production keys in development1920## Webhook Handler Pattern2122**ALWAYS** verify webhook signatures and handle idempotency:2324```python25import stripe26from fastapi import Request, HTTPException2728async def handle_stripe_webhook(request: Request):29 payload = await request.body()30 signature = request.headers.get("stripe-signature")3132 try:33 event = stripe.Webhook.construct_event(34 payload, signature, settings.STRIPE_WEBHOOK_SECRET35 )36 except stripe.error.SignatureVerificationError:37 raise HTTPException(status_code=400, detail="Invalid signature")3839 # Idempotency: check if event already processed40 existing = await get_webhook_event(event.id)41 if existing:42 return {"status": "already_processed"}4344 # Process event and record45 await process_event(event)46 await record_webhook_event(event.id, event.type)47 return {"status": "processed"}48```4950## Idempotency Checklist5152For ALL webhook handlers:5354- [ ] Store event ID before processing55- [ ] Check for duplicate events before processing56- [ ] Use database transactions for atomicity57- [ ] Return 200 OK even on idempotency skip (Stripe retries on non-200)5859## Common Webhook Events6061```python62SUBSCRIPTION_EVENTS = [63 "customer.subscription.created",64 "customer.subscription.updated",65 "customer.subscription.deleted",66 "invoice.payment_succeeded",67 "invoice.payment_failed",68]69```7071## Local Webhook Testing7273Use the Stripe CLI to forward events locally:7475```bash76# Start webhook forwarding77stripe listen --forward-to localhost:8000/api/v1/webhooks/stripe7879# Trigger test events80stripe trigger checkout.session.completed81stripe trigger invoice.payment_succeeded82stripe trigger customer.subscription.deleted83```8485## FORBIDDEN8687- Hardcoding API keys (use environment variables)88- Skipping webhook signature verification89- Processing webhooks without idempotency checks90- Using production Stripe keys in development or CI91- Ignoring failed payment events (always handle `invoice.payment_failed`)9293## Evidence Template for Linear9495Attach this after completing payment work:9697```markdown98**Payment Testing Evidence**99100- [ ] Test mode verified (`sk_test_` key)101- [ ] Webhook signature verification tested102- [ ] Idempotency tested (duplicate event handling)103- [ ] Success flow tested (card 4242...)104- [ ] Failure flow tested (card 4000 0000 0000 0002)105- [ ] Subscription lifecycle tested (create/update/cancel)106107**Test Results:**108- Webhook events processed: {count}109- All flows: PASSED110```111112## Key References113114- **Stripe Docs**: https://stripe.com/docs115- **Webhook best practices**: https://stripe.com/docs/webhooks/best-practices116- **Payment patterns**: `patterns_library/` (search for payment/billing patterns)117- **Full skill docs**: `.claude/skills/stripe-patterns/SKILL.md`118
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bybren-llc/safe-agentic-workflow.cursor/rules/00-core-principles.mdc · 399 | Cursor rules | no sections | 48/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/01-git-workflow.mdc · 399 | Cursor rules | lint-formatstyletypesgit+2 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/02-pattern-discovery.mdc · 399 | Cursor rules | stylearchgitdo-not+2 | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/03-safe-ai-dlc.mdc · 399 | Cursor rules | styledo-not | 59/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/04-knowledge-vault.mdc · 399 | Cursor rules | stylegitapido-not | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/11-frontend-react.mdc · 399 | Cursor rules | buildstyletypessecurity+3 | 65/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/12-database-sql.mdc · 399 | Cursor rules | testtypesgitsecurity+3 | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/13-testing.mdc · 399 | Cursor rules | teststyletesting-strategyapi+1 | 88/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/14-spec-creation.mdc · 399 | Cursor rules | teststylegitdo-not | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/15-deployment.mdc · 399 | Cursor rules | setuptestgitsecurity+2 | 80/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/20-agent-architect.mdc · 399 | Cursor rules | stylearchgit | 58/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/21-agent-backend.mdc · 399 | Cursor rules | testlint-formatstyleapi+1 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/22-agent-qas.mdc · 399 | Cursor rules | teststylesecurityagent-behaviour | 81/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/23-agent-security.mdc · 399 | Cursor rules | stylesecurity | 52/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/30-background-agents.mdc · 399 | Cursor rules | testlint-formatstylegit+1 | 74/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/31-mcp-integration.mdc · 399 | Cursor rules | stylesecuritydo-notagent-behaviour | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.gemini/GEMINI.md · 399 | GEMINI.md | lint-formatstylearchgit+4 | 66/100 | today | |
| bybren-llc/safe-agentic-workflowAGENTS.md · 399 | AGENTS.md | buildteststylearch+5 | 84/100 | today | |
| bybren-llc/safe-agentic-workflowCLAUDE.md · 399 | CLAUDE.md | buildtestlint-formatarch+6 | 91/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/bybren-llc-safe-agentic-workflow-cursor-rules-16-stripe-payments)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.