stripe
Use when MDE work touches Stripe checkout, payment intents, ticket payments, Connect, webhooks, refunds, idempotency, or payment security.
- License 许可
- MIT
- 所属仓库
- amoai-tech/mdeai
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- stripe
- metadata
- { "verified-at": "2026-09-28", "verified-package": "stripe@14.21.0 — Deno edge functions via esm.sh; no npm SDK installed", "verified-api-version": "2026-04-22" }
- description
- Use when MDE work touches Stripe checkout, payment intents, ticket payments, Connect, webhooks, refunds, idempotency, or payment security.
02 资源文件 2
- 参考文档evals/evals.json1.3 KB
- 参考文档references/review.md919 B
03 SKILL.md 正文
Stripe
Own Stripe-specific implementation and payment safety. Do not own general ticket-domain rules or Supabase policy design.
Where Stripe actually runs
There is no Stripe npm dependency in this repo. Stripe is imported inside the Deno edge functions:
import Stripe from "https://esm.sh/stripe@14.21.0?target=denonext";
supabase/functions/ticket-checkout/ and supabase/functions/ticket-payment-webhook/
pin apiVersion: "2026-04-22". Re-verify both the module version and the API version
before changing payment code — an API-version bump can change field shapes a webhook
handler depends on. Next.js route handlers under src/app/api/tickets/ call into
those functions rather than the Stripe SDK directly.
Source order
- Inspect the current MDE payment code and installed dependencies.
- Verify the exact API behavior in current Stripe official docs before changing payment contracts.
- Preserve existing MDE architecture unless the task explicitly requires migration.
MDE invariants
- Never expose secret keys or webhook secrets to client code.
- Verify webhook signatures from the raw request body before trusting an event.
- Make webhook side effects idempotent; duplicate delivery must not duplicate tickets, ledger rows, or fulfillment.
- Never treat a client redirect or client-supplied status as proof of successful payment.
- Keep payment writes scoped to the authenticated organization/user and the intended checkout object.
- Current repo has no direct Stripe npm dependency; do not add one unless the task requires it and the existing edge/HTTP pattern is insufficient.
Workflow
- Identify checkout, webhook, refund, Connect, or reconciliation path.
- Trace the current request and persistence path end to end.
- Define duplicate/retry/failure behavior before editing.
- Implement the smallest safe change.
- Run targeted unit/integration checks plus duplicate-delivery and invalid-signature cases for webhook work.
Handoff
Use events for ticket/event business rules, supabase for RLS/schema, systematic-debugging for unknown failures, and task-verifier for production-critical completion claims.
04 同仓库更多 Skills
mde-pr-review-supabase
Use when reviewing MDE Supabase SQL, Auth and RLS changes in a pull request.
mde-pr-review-stripe
Use when reviewing MDE Stripe payments and webhooks changes in a pull request.
mde-pr-review-nextjs
Use when reviewing MDE Next.js App Router changes in a pull request.
mde-pr-review-mastra
Use when reviewing MDE Mastra agent, tool and workflow changes in a pull request.
mde-pr-review-maps
Use when reviewing MDE Google Maps and Places changes in a pull request.
mde-pr-review-copilotkit
Use when reviewing MDE CopilotKit and AG-UI changes in a pull request.