Back to roadmap
US-0991
Payment Flow
SHIPPEDAI drafted the designLast verified 4 min ago
User story
checkoutstripeorders
Channels & integrations · auto-detected from this story
In-appSStripe
Acceptance criteria
2 / 2 verified
Each scenario is run as a Playwright test by the QA agent
Scenario 1: Successful payment confirms the order Verified
Givena valid payment method
Whenthe customer submits payment
Thenthe order is confirmed and a receipt is emailed
Scenario 2: Declined card shows a clear error Verified
Givena card that will be declined
Whenpayment is attempted
Thenthe customer sees an actionable error and can retry
Spec quality · craft learnings applied
8/10 passingGeneralisable rules the agent applies to every spec — they grow from review feedback & flaky scenarios, and act as a self-improving linter.
Assert one outcome per scenarioAtomicity
Each scenario asserts a single outcome
One trigger per scenarioAtomicity
Every scenario has exactly one trigger
Keep implementation out of Given/When/ThenClarity
Scenarios describe behaviour, not implementation
Make every outcome machine-checkableTestability
Outcomes are concrete and observable
Bound time-sensitive outcomesTestability
Time-sensitive outcomes carry a bound
Pair every happy path with a failure pathCoverage
An explicit failure / edge scenario is present
Assert the negative spaceCoverage
No scenario states what must not happen
Say what must NOT happen (no double-charge, no email when muted) — bugs hide in the unstated.
State actor, capability and benefitClarity
Story names actor, capability and benefit
One promise per storyScope
The story promises more than one capability — consider splitting
If the “I want …” clause has an “and” joining two capabilities, split it into two stories.
Keep the slice thinScope
2 scenarios — a thin, shippable slice
Learnings applied · from the library
Webhook consumers must be idempotenthigh
External webhook integrations re-deliver; always add a duplicate-delivery scenario and an idempotency decision.
Learned from US-1188 · INC-090 (duplicate charges)
Related specs · graph neighbours