payments
Installation
SKILL.md
Payments Engineering (Stripe)
Purpose
Payments are the most consequential code in any SaaS. A bug here is not a UX problem — it is a financial, legal, and trust problem. This skill does not treat Stripe as a simple API call. It treats payment flows as state machines with explicit error handling, idempotency, and webhook-first architecture.
Payment Type Decision
Before writing any code, identify which Stripe flow applies:
| User Need | Stripe Flow |
|---|---|
| User pays once (product, service, credit) | Payment Intent + Checkout Session |
| User pays monthly/yearly (SaaS) | Subscription + Prices + Customer |
| Cancel and get money back | Refunds API |
| Custom invoice / usage-based | Invoice API + Meter |