Field Kit
A successful webhook can lose the purchase
A webhook acknowledgement must describe completed business work, with durable identity for safe retries.
What happened
A checkout webhook returned success on fulfilment failures, issued duplicate licenses on redelivery and did not read payment status; the repair remembered each session and retried delivery with the same issued key.
2 prompts, in order
- Define when delivery is complete A payment event returns success even when downstream work fails.
- Verify retries preserve the purchase The handler now persists fulfilment state before email delivery.
1Define when delivery is complete
- Run it when
- A payment event returns success even when downstream work fails.
- It asks you for
- The webhook handler, payment-status checks, storage writes, email result and acknowledgement mapping.
- You get back
- A state sequence showing when money is settled, issuance is recorded and delivery is complete.
- It refuses if
- Never perform a live payment or email send to diagnose this path without explicit approval.
<stance> Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong. </stance> <inputs> Ask for these before drawing a conclusion. Wait for anything essential that is missing. 1. The webhook handler, payment-status checks, storage writes, email result and acknowledgement mapping. 2. The exact user-visible symptom, including the original output and the time it was observed. 3. The implementation and launch conditions responsible for that output. Read the relevant source in full. 4. What may be changed safely, and which actions require the owner's approval. 5. Any existing verification that could distinguish the proposed cause from the alternatives. </inputs> <method> 1. Follow the event from payment status to the final response. List each early return and exception, and determine whether the upstream service interprets it as retryable or completed. 2. Distinguish a completed checkout from settled payment. Read the actual status field and delayed-payment event handling; a familiar event name cannot establish that funds arrived. 3. Inspect the order of issuance, durable recording and email delivery. If email fails after issuance, a retry must use the existing key. Write down which stored state lets the next request make that decision. 4. Map every known failure to a bounded diagnostic and the correct retry response. Keep keys, customer addresses and raw provider error text out of logged reasons. State unresolved crash windows explicitly. </method> <deliver> - OBSERVED: the behavior actually established, with the output that supports it. - EXPLANATION: what the observation settles and what remains unknown. - NEXT ACTION: one bounded action, its owner, and its expected result. - PROOF: the observation that would establish success, plus the result that would disprove it. </deliver> <refuse> Never perform a live payment or email send to diagnose this path without explicit approval. Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition. </refuse>
2Verify retries preserve the purchase
- Run it when
- The handler now persists fulfilment state before email delivery.
- It asks you for
- The existing isolated fulfilment tests, durable session identity, claim behavior and retry outcomes.
- You get back
- A result for each loss path and confirmation that redelivery reuses the issued entitlement.
- It refuses if
- Do not call a passing isolated payment test revenue or customer validation.
<stance> Your job is to separate an observed failure from a convincing explanation that has never been checked. Keep the reader's actual system in view. A result is useful when another person can repeat the observation and get a different answer if the proposed repair is wrong. </stance> <inputs> Ask for these before drawing a conclusion. Wait for anything essential that is missing. 1. The existing isolated fulfilment tests, durable session identity, claim behavior and retry outcomes. 2. The exact user-visible symptom, including the original output and the time it was observed. 3. The implementation and launch conditions responsible for that output. Read the relevant source in full. 4. What may be changed safely, and which actions require the owner's approval. 5. Any existing verification that could distinguish the proposed cause from the alternatives. </inputs> <method> 1. Use the existing test harness for the actual decision function. Exercise missing metadata, missing encryption configuration, failed storage and failed email separately; verify the acknowledgement requests retry where work remains. 2. Re-deliver a fulfilled session. Compare the original and returned entitlement identity, issued records and email decisions. A success message with a second entitlement fails the retry requirement. 3. Exercise an email failure after an issued record exists. The next request must retry delivery with the same key rather than start issuance again. Check the stored record on both sides of that boundary. 4. Inspect the claim-expiry and crash paths without claiming guarantees the implementation lacks. Keep completed isolated checks separate from live payment, email-provider and durable-store verification still requiring approval. </method> <deliver> - OBSERVED: the behavior actually established, with the output that supports it. - EXPLANATION: what the observation settles and what remains unknown. - NEXT ACTION: one bounded action, its owner, and its expected result. - PROOF: the observation that would establish success, plus the result that would disprove it. </deliver> <refuse> Do not call a passing isolated payment test revenue or customer validation. Do not invent measurements, defaults, source contents, or a successful run. Keep historical results separate from today's observations. Never transmit private inputs or perform a paid or external action just to complete this check. If access or authorization is missing, stop and name the exact missing condition. </refuse>
How you know it worked
The existing isolated tests must show unpaid sessions issue nothing, failed fulfilment requests a retry and redelivery reuses the issued key. A successful HTTP response alone cannot prove the purchase was delivered. These are engineering checks, never a claim that real customers paid.