$20.00 refunded twice on the same capture, 1s apart

Status
Needs you
At risk
$20.00
Detected (detector clock)
2026-11-23 19:06

Diagnosis

AI agent (anthropic/claude-haiku-5.5)

Two $20.00 refunds went out on the same $80.00 espresso order one second apart, with the same note ("Sorry about the crushed bag"). That looks like a double-click or retry, so the buyer has likely received $40.00 back when you may have meant $20.00. Nightshift cannot reverse a refund, so the $20.00 is at risk unless you confirm it was intended or ask the buyer to return it. The order is still unfulfilled, so please also decide whether it ships.

Decisions

The agent proposes, the policy gate decides, the executor calls PayPal.

Ask the owner

Waiting for you

Agent proposed

Whether the second $20.00 was a mistake or intended depends on a decision only the owner can make, and any follow-up with the buyer or the order is theirs to decide.

Note: Two $20.00 refunds were issued on order 1C746363Y3297422M one second apart (refunds 5GR00243LW545014S and 7JW01136N9777681R), so the buyer has received $40.00 of the $80.00 paid. Did you intend a $40.00 refund for the crushed bag? If not, should I ask the

Policy said

Needs approval
  • The agent asked for a human decision.

PayPal returned

No PayPal call for this action.

Evidence

Refunds 5GR00243LW545014S and 7JW01136N9777681R both returned $20.00 from capture 1BJ155612Y284452A 1 seconds apart. That pattern usually means a retry without an idempotency key, not two decisions.

capture id
1BJ155612Y284452A
order id
1C746363Y3297422M
first refund id
5GR00243LW545014S
first refund at
2026-10-27T19:06:18.000Z
duplicate refund id
7JW01136N9777681R
duplicate refund at
2026-10-27T19:06:19.000Z
amount
$20.00
seconds apart
1
order1C746363Y3297422Mcapture1BJ155612Y284452Arefund5GR00243LW545014Srefund7JW01136N9777681R

All ids are real PayPal sandbox objects; GET them with your sandbox credentials to check.

Audit trail

Detected, diagnosed, decided, executed. Live.

Detected: $20.00 refunded twice on the same capture, 1s apart
Detector
Refunds 5GR00243LW545014S and 7JW01136N9777681R both returned $20.00 from capture 1BJ155612Y284452A 1 seconds apart. That pattern usually means a retry without an idempotency key, not two decisions.
Agent started triage
Agent
Agent read ledger_lookup
Agent
ledger_lookupNightshift ledgerok
args { "order_id": "1C746363Y3297422M" }
Result
{"order":{"id":"1C746363Y3297422M","intent":"CAPTURE","status":"COMPLETED","amountCents":8000,"currency":"USD","payer":"night-owl-mvr232kq173@example.com","cartRef":"cart-66429","description":"Espresso sampler, 4 x 250g","fulfillment":"unfulfilled","shippedAt":null,"createdAt":"2026-10-27T19:06:16.000Z","updatedAt":"2026-10-27T19:06:23.883Z","source":"webhook"},"buyer_note_untrusted":null,"authorizations":[],"captures":[{"id":"1BJ155612Y284452A","orderId":"1C746363Y3297422M","authorizationId":null,"status":"PARTIALLY_REFUNDED","statusReason":null,"amountCents":8000,"currency":"USD","finalCapture":true,"createdAt":"2026-10-27T19:06:16.000Z","updatedAt":"2026-10-27T19:06:23.886Z"}],"refunds":[{"id":"5GR00243LW545014S","captureId":"1BJ155612Y284452A","orderId":"1C746363Y3297422M","status":"COMPLETED","amountCents":2000,"currency":"USD","createdAt":"2026-10-27T19:06:18.000Z","updatedAt":"2026-10-27T19:06:23.890Z"},{"id":"7JW01136N9777681R","captureId":"1BJ155612Y284452A","orderId":"1C746363Y3297422M","status":"COMPLETED","amountCents":2000,"currency":"USD","createdAt":"2026-10-27T19:06:19.000Z","updatedAt":"2026-10-27T19:06:23.892Z"}],"failed_capture_attempts":[]}
Agent read get_refund
Agent
get_refundvia PayPal Agent Toolkitok
args { "refund_id": "7JW01136N9777681R" }
Result
{"id":"7JW01136N9777681R","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-66429","status":"COMPLETED","create_time":"2026-10-27T12:06:19-07:00","update_time":"2026-10-27T12:06:19-07:00","payer":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"links":[{"href":"https://api.sandbox.paypal.com/v2/payments/refunds/7JW01136N9777681R","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/1BJ155612Y284452A","rel":"up","method":"GET"}]}
Agent read get_refund
Agent
get_refundvia PayPal Agent Toolkitok
args { "refund_id": "5GR00243LW545014S" }
Result
{"id":"5GR00243LW545014S","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-66429","status":"COMPLETED","create_time":"2026-10-27T12:06:18-07:00","update_time":"2026-10-27T12:06:18-07:00","payer":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"links":[{"href":"https://api.sandbox.paypal.com/v2/payments/refunds/5GR00243LW545014S","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/1BJ155612Y284452A","rel":"up","method":"GET"}]}
Agent read get_capture
Agent
get_capturevia Nightshift REST clientok
args { "capture_id": "1BJ155612Y284452A" }
Result
{"id":"1BJ155612Y284452A","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-66429","status":"PARTIALLY_REFUNDED","supplementary_data":{"related_ids":{"order_id":"1C746363Y3297422M"}},"payee":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"create_time":"2026-10-27T19:06:16Z","update_time":"2026-10-27T19:06:19Z","links":[{"href":"https://api.sandbox.paypal.com/v2/payments/captures/1BJ155612Y284452A","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/1BJ155612Y284452A/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/1C746363Y3297422M","rel":"up","method":"GET"}]}
Agent diagnosis
Agent
Two $20.00 refunds went out on the same $80.00 espresso order one second apart, with the same note ("Sorry about the crushed bag"). That looks like a double-click or retry, so the buyer has likely received $40.00 back when you may have meant $20.00. Nightshift cannot reverse a refund, so the $20.00 is at risk unless you confirm it was intended or ask the buyer to return it. The order is still unfulfilled, so please also decide whether it ships.
Agent proposed: Ask the owner
Agent
Whether the second $20.00 was a mistake or intended depends on a decision only the owner can make, and any follow-up with the buyer or the order is theirs to decide.
Policy said: needs the owner's approval
Policy gate
  • The agent asked for a human decision.