$20.00 refunded twice on the same capture, 3s apart
- Status
- Needs you
- At risk
- $20.00
- Detected (detector clock)
- 2026-11-23 17:06
Diagnosis
AI agent (anthropic/claude-haiku-5.5)The buyer was refunded $20.00 twice for the same $80.00 espresso order, 3 seconds apart, so $40.00 has gone back to them. The second refund looks like an accidental duplicate (a retry without a safeguard), but PayPal shows both as completed and I can't reverse a refund from here. If nothing is done, the shop is out an extra $20.00 and the order is still unshipped.
Decisions
The agent proposes, the policy gate decides, the executor calls PayPal.
Ask the owner
Waiting for youAgent proposed
Whether the second refund was intended, and how to recover the $20.00, depends on a decision only the owner can make, and any refund needs owner approval anyway.
Note: Refund 05X192964S9961805 returned $20.00 three seconds after an identical refund 4KS79453UN7234100 on the same $80.00 order (0X918673CW044800D). The buyer has received $40.00 total. Was the second $20.00 meant to happen? If not, decide whether to ask the
Policy said
Needs approval- The agent asked for a human decision.
PayPal returned
No PayPal call for this action.
Evidence
Refunds 4KS79453UN7234100 and 05X192964S9961805 both returned $20.00 from capture 8KD70378CW893191L 3 seconds apart. That pattern usually means a retry without an idempotency key, not two decisions.
- capture id
- 8KD70378CW893191L
- order id
- 0X918673CW044800D
- first refund id
- 4KS79453UN7234100
- first refund at
- 2026-10-27T17:06:39.000Z
- duplicate refund id
- 05X192964S9961805
- duplicate refund at
- 2026-10-27T17:06:42.000Z
- amount
- $20.00
- seconds apart
- 3
0X918673CW044800Dcapture8KD70378CW893191Lrefund4KS79453UN7234100refund05X192964S9961805All ids are real PayPal sandbox objects; GET them with your sandbox credentials to check.
Audit trail
Detected, diagnosed, decided, executed. Live.
ledger_lookupNightshift ledgerokResult
{"order":{"id":"0X918673CW044800D","intent":"CAPTURE","status":"COMPLETED","amountCents":8000,"currency":"USD","payer":"night-owl-mvqxter5839@example.com","cartRef":"cart-40759","description":"Espresso sampler, 4 x 250g","fulfillment":"unfulfilled","shippedAt":null,"createdAt":"2026-10-27T17:06:38.000Z","updatedAt":"2026-10-27T17:06:44.265Z","source":"webhook"},"buyer_note_untrusted":null,"authorizations":[],"captures":[{"id":"8KD70378CW893191L","orderId":"0X918673CW044800D","authorizationId":null,"status":"PARTIALLY_REFUNDED","statusReason":null,"amountCents":8000,"currency":"USD","finalCapture":true,"createdAt":"2026-10-27T17:06:38.000Z","updatedAt":"2026-10-27T17:06:44.268Z"}],"refunds":[{"id":"4KS79453UN7234100","captureId":"8KD70378CW893191L","orderId":"0X918673CW044800D","status":"COMPLETED","amountCents":2000,"currency":"USD","createdAt":"2026-10-27T17:06:39.000Z","updatedAt":"2026-10-27T17:06:44.271Z"},{"id":"05X192964S9961805","captureId":"8KD70378CW893191L","orderId":"0X918673CW044800D","status":"COMPLETED","amountCents":2000,"currency":"USD","createdAt":"2026-10-27T17:06:42.000Z","updatedAt":"2026-10-27T17:06:44.274Z"}],"failed_capture_attempts":[]}get_refundvia PayPal Agent ToolkitokResult
{"id":"05X192964S9961805","amount":{"currency_code":"USD","value":"20.00"},"note_to_payer":"Sorry about the crushed bag","seller_payable_breakdown":{"gross_amount":{"currency_code":"USD","value":"20.00"},"paypal_fee":{"currency_code":"USD","value":"0.00"},"net_amount":{"currency_code":"USD","value":"20.00"},"total_refunded_amount":{"currency_code":"USD","value":"40.00"}},"custom_id":"cart-40759","status":"COMPLETED","create_time":"2026-10-27T10:06:42-07:00","update_time":"2026-10-27T10:06:42-07:00","payer":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"links":[{"href":"https://api.sandbox.paypal.com/v2/payments/refunds/05X192964S9961805","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/8KD70378CW893191L","rel":"up","method":"GET"}]}get_refundvia PayPal Agent ToolkitokResult
{"id":"4KS79453UN7234100","amount":{"currency_code":"USD","value":"20.00"},"note_to_payer":"Sorry about the crushed bag","seller_payable_breakdown":{"gross_amount":{"currency_code":"USD","value":"20.00"},"paypal_fee":{"currency_code":"USD","value":"0.00"},"net_amount":{"currency_code":"USD","value":"20.00"},"total_refunded_amount":{"currency_code":"USD","value":"40.00"}},"custom_id":"cart-40759","status":"COMPLETED","create_time":"2026-10-27T10:06:39-07:00","update_time":"2026-10-27T10:06:39-07:00","payer":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"links":[{"href":"https://api.sandbox.paypal.com/v2/payments/refunds/4KS79453UN7234100","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/8KD70378CW893191L","rel":"up","method":"GET"}]}get_capturevia Nightshift REST clientokResult
{"id":"8KD70378CW893191L","amount":{"currency_code":"USD","value":"80.00"},"final_capture":true,"seller_protection":{"status":"NOT_ELIGIBLE"},"seller_receivable_breakdown":{"gross_amount":{"currency_code":"USD","value":"80.00"},"paypal_fee":{"currency_code":"USD","value":"3.42"},"net_amount":{"currency_code":"USD","value":"76.58"}},"custom_id":"cart-40759","status":"PARTIALLY_REFUNDED","supplementary_data":{"related_ids":{"order_id":"0X918673CW044800D"}},"payee":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"create_time":"2026-10-27T17:06:38Z","update_time":"2026-10-27T17:06:42Z","links":[{"href":"https://api.sandbox.paypal.com/v2/payments/captures/8KD70378CW893191L","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/8KD70378CW893191L/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/0X918673CW044800D","rel":"up","method":"GET"}]}- The agent asked for a human decision.