night-owl-mvqxohck27@example.com charged $64.00 twice for cart cart-61888

Status
Needs you
At risk
$64.00
Protected
$64.00
Detected (detector clock)
2026-10-27 17:03

Diagnosis

AI agent (anthropic/claude-haiku-5.5)

Night-owl-mvqxohck27@example.com was charged $64.00 twice for the same cart (cart-61888), 25 seconds apart, creating two separate orders. Neither order has shipped, and the second charge (capture 7BN809050U276512L) is the duplicate. Nothing is refunded yet, so the shop is holding $64.00 extra from this buyer, which will likely turn into a dispute if it is not returned. Refunding the duplicate charge needs your approval.

Decisions

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

Refund capture

$64.007BN809050U276512LPayPal OK

Agent proposed

The duplicate capture of $64.00 was taken for the same cart and neither order has shipped, so returning it removes the double charge the buyer would otherwise dispute.

Note: Hi, we noticed you were charged twice for one order. We are refunding the duplicate $64.00 charge. Thank you for your patience.

Policy said

Needs approval
  • Refunds send money back to the buyer and cannot be reversed, so the owner approves every one.

Decided by judge (sandbox demo)

PayPal returned

HTTP 201

debug id f5616599ed6bb

Response body
{
  "id": "78S44145GS3760434",
  "amount": {
    "currency_code": "USD",
    "value": "64.00"
  },
  "note_to_payer": "Hi, we noticed you were charged twice for one order. We are refunding the duplicate $64.00 charge. Thank you for your patience.",
  "seller_payable_breakdown": {
    "gross_amount": {
      "currency_code": "USD",
      "value": "64.00"
    },
    "paypal_fee": {
      "currency_code": "USD",
      "value": "0.00"
    },
    "net_amount": {
      "currency_code": "USD",
      "value": "64.00"
    },
    "total_refunded_amount": {
      "currency_code": "USD",
      "value": "64.00"
    }
  },
  "custom_id": "cart-61888",
  "status": "COMPLETED",
  "create_time": "2026-11-04T09:28:37-08:00",
  "update_time": "2026-11-04T09:28:37-08:00",
  "links": [
    {
      "href": "https://api.sandbox.paypal.com/v2/payments/refunds/78S44145GS3760434",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "https://api.sandbox.paypal.com/v2/payments/captures/7BN809050U276512L",
      "rel": "up",
      "method": "GET"
    }
  ]
}
Exact API call (PayPal-Request-Id ns-2a27fe9d4a555a89bfaabfbdc37a9897)
POST /v2/payments/captures/7BN809050U276512L/refund
{
  "amount": {
    "currency_code": "USD",
    "value": "64.00"
  },
  "note_to_payer": "Hi, we noticed you were charged twice for one order. We are refunding the duplicate $64.00 charge. Thank you for your patience."
}

Ask the owner

Waiting for you

Agent proposed

Only the owner knows which order should be fulfilled and whether the buyer still wants the box, so the shipping decision should not be automated.

Note: Two unshipped orders exist for the same buyer and cart (05030677MD5133426 and 91L3412578882314W). Do you want to keep the first order (41V271830J393561E) and ship it, with the duplicate refunded? Do not ship either order until you confirm.

Policy said

Needs approval
  • The agent asked for a human decision.

PayPal returned

No PayPal call for this action.

Evidence

Captures 41V271830J393561E (order 05030677MD5133426) and 7BN809050U276512L (order 91L3412578882314W) charged the same payer $64.00 for the same cart reference cart-61888 25 seconds apart. A buyer who sees two charges files a dispute.

payer
night-owl-mvqxohck27@example.com
cart ref
cart-61888
amount
$64.00
first capture id
41V271830J393561E
first order id
05030677MD5133426
first captured at
2026-10-27T17:02:52.000Z
duplicate capture id
7BN809050U276512L
duplicate order id
91L3412578882314W
duplicate captured at
2026-10-27T17:03:17.000Z
seconds apart
25
same cart reference
true
order05030677MD5133426capture41V271830J393561Eorder91L3412578882314Wcapture7BN809050U276512L

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

Audit trail

Detected, diagnosed, decided, executed. Live.

Detected: night-owl-mvqxohck27@example.com charged $64.00 twice for cart cart-61888
Detector
Captures 41V271830J393561E (order 05030677MD5133426) and 7BN809050U276512L (order 91L3412578882314W) charged the same payer $64.00 for the same cart reference cart-61888 25 seconds apart. A buyer who sees two charges files a dispute.
Agent started triage
Agent
Agent read ledger_lookup
Agent
ledger_lookupNightshift ledgerok
args { "order_id": "91L3412578882314W" }
Result
{"order":{"id":"91L3412578882314W","intent":"CAPTURE","status":"COMPLETED","amountCents":6400,"currency":"USD","payer":"night-owl-mvqxohck27@example.com","cartRef":"cart-61888","description":"Roaster's Choice box, monthly","fulfillment":"unfulfilled","shippedAt":null,"createdAt":"2026-10-27T17:02:53.000Z","updatedAt":"2026-10-27T17:03:17.835Z","source":"scenario","scenario":"lab_mvqxnfgj"},"buyer_note_untrusted":null,"authorizations":[],"captures":[{"id":"7BN809050U276512L","orderId":"91L3412578882314W","authorizationId":null,"status":"COMPLETED","statusReason":null,"amountCents":6400,"currency":"USD","finalCapture":true,"createdAt":"2026-10-27T17:03:17.000Z","updatedAt":"2026-10-27T17:03:17.838Z"}],"refunds":[],"failed_capture_attempts":[]}
Agent read get_capture
Agent
get_capturevia Nightshift REST clientok
args { "capture_id": "7BN809050U276512L" }
Result
{"id":"7BN809050U276512L","amount":{"currency_code":"USD","value":"64.00"},"final_capture":true,"seller_protection":{"status":"NOT_ELIGIBLE"},"seller_receivable_breakdown":{"gross_amount":{"currency_code":"USD","value":"64.00"},"paypal_fee":{"currency_code":"USD","value":"2.80"},"net_amount":{"currency_code":"USD","value":"61.20"}},"custom_id":"cart-61888","status":"COMPLETED","supplementary_data":{"related_ids":{"order_id":"91L3412578882314W"}},"payee":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"create_time":"2026-10-27T17:03:17Z","update_time":"2026-10-27T17:03:17Z","links":[{"href":"https://api.sandbox.paypal.com/v2/payments/captures/7BN809050U276512L","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/7BN809050U276512L/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/91L3412578882314W","rel":"up","method":"GET"}]}
Agent read ledger_lookup
Agent
ledger_lookupNightshift ledgerok
args { "order_id": "05030677MD5133426" }
Result
{"order":{"id":"05030677MD5133426","intent":"CAPTURE","status":"COMPLETED","amountCents":6400,"currency":"USD","payer":"night-owl-mvqxohck27@example.com","cartRef":"cart-61888","description":"Roaster's Choice box, monthly","fulfillment":"unfulfilled","shippedAt":null,"createdAt":"2026-10-27T17:02:52.000Z","updatedAt":"2026-10-27T17:03:06.773Z","source":"scenario","scenario":"lab_mvqxnfgj"},"buyer_note_untrusted":null,"authorizations":[],"captures":[{"id":"41V271830J393561E","orderId":"05030677MD5133426","authorizationId":null,"status":"COMPLETED","statusReason":null,"amountCents":6400,"currency":"USD","finalCapture":true,"createdAt":"2026-10-27T17:02:52.000Z","updatedAt":"2026-10-27T17:03:06.776Z"}],"refunds":[],"failed_capture_attempts":[]}
Agent read get_capture
Agent
get_capturevia Nightshift REST clientok
args { "capture_id": "41V271830J393561E" }
Result
{"id":"41V271830J393561E","amount":{"currency_code":"USD","value":"64.00"},"final_capture":true,"seller_protection":{"status":"NOT_ELIGIBLE"},"seller_receivable_breakdown":{"gross_amount":{"currency_code":"USD","value":"64.00"},"paypal_fee":{"currency_code":"USD","value":"2.80"},"net_amount":{"currency_code":"USD","value":"61.20"}},"custom_id":"cart-61888","status":"COMPLETED","supplementary_data":{"related_ids":{"order_id":"05030677MD5133426"}},"payee":{"email_address":"sb-djk8i53501233@business.example.com","merchant_id":"D8M8MT98DPNNG"},"create_time":"2026-10-27T17:02:52Z","update_time":"2026-10-27T17:02:52Z","links":[{"href":"https://api.sandbox.paypal.com/v2/payments/captures/41V271830J393561E","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/41V271830J393561E/refund","rel":"refund","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/checkout/orders/05030677MD5133426","rel":"up","method":"GET"}]}
Agent diagnosis
Agent
Night-owl-mvqxohck27@example.com was charged $64.00 twice for the same cart (cart-61888), 25 seconds apart, creating two separate orders. Neither order has shipped, and the second charge (capture 7BN809050U276512L) is the duplicate. Nothing is refunded yet, so the shop is holding $64.00 extra from this buyer, which will likely turn into a dispute if it is not returned. Refunding the duplicate charge needs your approval.
Agent proposed: Refund capture $64.00
Agent
The duplicate capture of $64.00 was taken for the same cart and neither order has shipped, so returning it removes the double charge the buyer would otherwise dispute.
Policy said: needs the owner's approval
Policy gate
  • Refunds send money back to the buyer and cannot be reversed, so the owner approves every one.
Agent proposed: Ask the owner
Agent
Only the owner knows which order should be fulfilled and whether the buyer still wants the box, so the shipping decision should not be automated.
Policy said: needs the owner's approval
Policy gate
  • The agent asked for a human decision.
Judge approved: Refund capture $64.00
Judge (sandbox demo)
POST /v2/payments/captures/7BN809050U276512L/refund
Executor
PayPal-Request-Id: ns-2a27fe9d4a555a89bfaabfbdc37a9897
{
  "amount": {
    "currency_code": "USD",
    "value": "64.00"
  },
  "note_to_payer": "Hi, we noticed you were charged twice for one order. We are refunding the duplicate $64.00 charge. Thank you for your patience."
}
PayPal returned 201 (COMPLETED)
PayPal
HTTP 201, debug id f5616599ed6bb, 1684 ms
{
  "id": "78S44145GS3760434",
  "amount": {
    "currency_code": "USD",
    "value": "64.00"
  },
  "note_to_payer": "Hi, we noticed you were charged twice for one order. We are refunding the duplicate $64.00 charge. Thank you for your patience.",
  "seller_payable_breakdown": {
    "gross_amount": {
      "currency_code": "USD",
      "value": "64.00"
    },
    "paypal_fee": {
      "currency_code": "USD",
      "value": "0.00"
    },
    "net_amount": {
      "currency_code": "USD",
      "value": "64.00"
    },
    "total_refunded_amount": {
      "currency_code": "USD",
      "value": "64.00"
    }
  },
  "custom_id": "cart-61888",
  "status": "COMPLETED",
  "create_time": "2026-11-04T09:28:37-08:00",
  "update_time": "2026-11-04T09:28:37-08:00",
  "links": [
    {
      "href": "https://api.sandbox.paypal.com/v2/payments/refunds/78S44145GS3760434",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "https://api.sandbox.paypal.com/v2/payments/captures/7BN809050U276512L",
      "rel": "up",
      "method": "GET"
    }
  ]
}
$64.00 protected (refunded)
Executor