{"case":{"id":"R-8D30516FC46C499A","scenario":"R","label":"Refund API failure","created_at":"2026-11-09T10:43:11Z","updated_at":"2026-11-09T10:46:14Z","status":"REFUND_COMPLETED","customer_name":"Ana (failure test)","customer_message":"The sneakers I received are black, but the photo shows white. The colour doesn't match the listing, and I'd like to return them for a refund.","product_sku":"TRAIL-RUNNER-42","amount":"49.99","currency":"USD","purchase_date_seeded":null,"order_id":"8K878765YK1980921","order_status":"COMPLETED","capture_id":"4A447050D9445581B","capture_status":"REFUNDED","capture_time":"2026-11-09T10:43:14Z","approve_url":null,"decision":"ELIGIBLE","supplier_draft":null,"supplier_reply":null,"human_decision":"APPROVED","human_at":"2026-11-09T10:43:17Z","approval_source":"human","refund_id":"6TJ28435C8083362L","refund_status":"COMPLETED","refund_fault":null,"webhook_status":"VERIFIED","error":null,"refund_request_id":"tradeos-refund-R-8D30516FC46C499A","completed_via":"refund_api","archived_at":null,"shipping_minor":null,"intent":{"intent":"REFUND_REQUEST","reason":"NOT_AS_DESCRIBED","requested_action":"REFUND"},"policy":{"decision":"ELIGIBLE","stage":"final","action":"REFUND","checks":[{"name":"request_supported","passed":true,"detail":"Request understood as REFUND_REQUEST / REFUND (reason NOT_AS_DESCRIBED)"},{"name":"payment_captured","passed":true,"detail":"PayPal capture status is COMPLETED"},{"name":"return_window","passed":true,"detail":"Purchased 0 days ago; window is 30 days"},{"name":"product_eligible","passed":true,"detail":"Trail Runner sneakers, EU size 42 is eligible for return"},{"name":"refundable_amount","passed":true,"detail":"Requested 49.99 USD; refundable 49.99 USD"}],"reasons":[]},"refund":{"id":"6TJ28435C8083362L","amount":{"currency_code":"USD","value":"49.99"},"note_to_payer":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","seller_payable_breakdown":{"gross_amount":{"currency_code":"USD","value":"49.99"},"paypal_fee":{"currency_code":"USD","value":"0.00"},"net_amount":{"currency_code":"USD","value":"49.99"},"net_amount_breakdown":[{"payable_amount":{"currency_code":"GBP","value":"37.33"},"converted_amount":{"currency_code":"USD","value":"49.99"},"exchange_rate":{"source_currency":"GBP","target_currency":"USD","value":"1.339217934971362"}}],"total_refunded_amount":{"currency_code":"USD","value":"49.99"}},"custom_id":"R-8D30516FC46C499A","status":"COMPLETED","create_time":"2026-11-09T02:43:19-08:00","update_time":"2026-11-09T02:43:19-08:00","links":[{"href":"https://api.sandbox.paypal.com/v2/payments/refunds/6TJ28435C8083362L","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/payments/captures/4A447050D9445581B","rel":"up","method":"GET"}]},"assist":{"language":"English","language_code":"en","current_size":null,"requested_size":null,"merchant_summary_en":"Customer wants a refund because the sneakers received are black instead of white as shown in the listing."},"extraction":{"extractor":"llm:openai/gpt-oss-20b","note":"Validated against strict schema.","assist_note":"Validated (information only; the policy engine ignores these fields).","injection_guard":false,"llm_unavailable":false,"llm_chat_completions":1,"safety":{"flagged":false,"trigger":"none","product_class":"NONE","rule_version":"safety-gate/3.4.0-main","signals":[]},"safety_ai":{"ai_layer":"off"}},"note":{"outcome":"COMPLETED_NOTE","language":"English","language_code":"en","text":"Your return was approved and your refund of 49.99 USD has been completed by PayPal. Thank you!","source_en":"Your return was approved and your refund of 49.99 USD has been completed by PayPal. Thank you!","generator":"template","validation":"English template."},"duplicate":null,"webhook":{"event_id":"WH-48D27457BH5486146-06A73809KL4894719","event_type":"PAYMENT.CAPTURE.REFUNDED","resource_id":"6TJ28435C8083362L","resource_status":"COMPLETED","status_details":null,"verification":"SUCCESS","verify_method":"self","received_at":"2026-11-09T10:43:37Z","create_time":"2026-11-09T10:43:24.437Z","transmission_time":"2026-11-09T10:43:34Z","transmission_age":"fresh"},"payer_note":{"outcome":"REFUND_NOTE","language":"English","language_code":"en","text":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","source_en":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","generator":"template","validation":"English template."}},"timeline":[{"id":38,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:14Z","stage":"payment","title":"PayPal order created","detail":{"order_id":"8K878765YK1980921","status":"COMPLETED","amount":"49.99 USD"}},{"id":39,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:14Z","stage":"payment","title":"PayPal payment captured","detail":{"order_id":"8K878765YK1980921","capture_id":"4A447050D9445581B","status":"COMPLETED"}},{"id":40,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:14Z","stage":"request","title":"Customer request received","detail":{"customer":"Ana (failure test)","message":"The sneakers I received are black, but the photo shows white. The colour doesn't match the listing, and I'd like to return them for a refund."}},{"id":41,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:15Z","stage":"intent","title":"Intent extracted","detail":{"intent":"REFUND_REQUEST","reason":"NOT_AS_DESCRIBED","requested_action":"REFUND","extractor":"llm:openai/gpt-oss-20b","note":"Validated against strict schema.","assist":{"language":"English","language_code":"en","current_size":null,"requested_size":null,"merchant_summary_en":"Customer wants a refund because the sneakers received are black instead of white as shown in the listing."},"assist_note":"Validated (information only; the policy engine ignores these fields).","safety_gate":{"flagged":false,"rule_version":"safety-gate/3.4.0-main"}}},{"id":42,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","stage":"policy","title":"Policy pre-check: ELIGIBLE","detail":{"decision":"ELIGIBLE","stage":"final","action":"REFUND","checks":[{"name":"request_supported","passed":true,"detail":"Request understood as REFUND_REQUEST / REFUND (reason NOT_AS_DESCRIBED)"},{"name":"payment_captured","passed":true,"detail":"PayPal capture status is COMPLETED"},{"name":"return_window","passed":true,"detail":"Purchased 0 days ago; window is 30 days"},{"name":"product_eligible","passed":true,"detail":"Trail Runner sneakers, EU size 42 is eligible for return"},{"name":"refundable_amount","passed":true,"detail":"Requested 49.99 USD; refundable 49.99 USD"}],"reasons":[]}},{"id":43,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","stage":"policy","title":"Policy final: ELIGIBLE — return for a refund (supplier not involved)","detail":{"decision":"ELIGIBLE","stage":"final","action":"REFUND","checks":[{"name":"request_supported","passed":true,"detail":"Request understood as REFUND_REQUEST / REFUND (reason NOT_AS_DESCRIBED)"},{"name":"payment_captured","passed":true,"detail":"PayPal capture status is COMPLETED"},{"name":"return_window","passed":true,"detail":"Purchased 0 days ago; window is 30 days"},{"name":"product_eligible","passed":true,"detail":"Trail Runner sneakers, EU size 42 is eligible for return"},{"name":"refundable_amount","passed":true,"detail":"Requested 49.99 USD; refundable 49.99 USD"}],"reasons":[]}},{"id":44,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","stage":"human","title":"Autonomy: HUMAN — this case needs a person","detail":{"why":"AUTO_ENABLED is off — every refund needs a person","auto_enabled":false,"auto_refund_max_amount":"50.00","auto_exchange_enabled":false}},{"id":45,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","stage":"note","title":"Customer note drafted: awaiting merchant approval (not sent)","detail":{"outcome":"PENDING_NOTE","language":"English","language_code":"en","text":"Your return request has been reviewed and is awaiting merchant approval. No refund has been issued yet.","source_en":"Your return request has been reviewed and is awaiting merchant approval. No refund has been issued yet.","generator":"template","validation":"English template."}},{"id":46,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","stage":"human","title":"Waiting for human approval of the refund","detail":{"amount":"49.99 USD"}},{"id":47,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"policy","title":"Policy re-check before refund: ELIGIBLE","detail":{"decision":"ELIGIBLE","stage":"final","action":"REFUND","checks":[{"name":"request_supported","passed":true,"detail":"Request understood as REFUND_REQUEST / REFUND (reason NOT_AS_DESCRIBED)"},{"name":"payment_captured","passed":true,"detail":"PayPal capture status is COMPLETED"},{"name":"return_window","passed":true,"detail":"Purchased 0 days ago; window is 30 days"},{"name":"product_eligible","passed":true,"detail":"Trail Runner sneakers, EU size 42 is eligible for return"},{"name":"refundable_amount","passed":true,"detail":"Requested 49.99 USD; refundable 49.99 USD"}],"reasons":[],"capture_id":"4A447050D9445581B","capture_status":"COMPLETED"}},{"id":48,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"human","title":"Human approved the refund","detail":{"approver":"merchant","source":"human"}},{"id":49,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"note","title":"note_to_payer written for the refund call (neutral wording)","detail":{"outcome":"REFUND_NOTE","language":"English","language_code":"en","text":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","source_en":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","generator":"template","validation":"English template."}},{"id":50,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"paypal","title":"Failure test: PayPal sandbox asked to fail this refund attempt","detail":{"PayPal-Mock-Response":{"mock_application_codes":"REFUND_FAILED_INSUFFICIENT_FUNDS"}}},{"id":51,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"paypal","title":"Refund failed","detail":{"message":"The requested action could not be completed, was semantically incorrect, or failed business validation. (REFUND_FAILED_INSUFFICIENT_FUNDS: Capture could not be refunded due to insufficient funds. Please check to see if you have sufficient funds in your PayPal account or if the bank account linked to your PayPal account is verified and has sufficient funds.)","status_code":422,"name":"UNPROCESSABLE_ENTITY","debug_id":"70c28ae654da","details":[{"issue":"REFUND_FAILED_INSUFFICIENT_FUNDS","description":"Capture could not be refunded due to insufficient funds. Please check to see if you have sufficient funds in your PayPal account or if the bank account linked to your PayPal account is verified and has sufficient funds."}],"sent":true,"paypal_request_id":"tradeos-refund-R-8D30516FC46C499A"}},{"id":52,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","stage":"note","title":"Customer note drafted: refund could not be completed yet (not sent)","detail":{"outcome":"FAILURE_NOTE","language":"English","language_code":"en","text":"We're sorry, the refund of 49.99 USD for your return could not be completed yet. No money has been moved.","source_en":"We're sorry, the refund of 49.99 USD for your return could not be completed yet. No money has been moved.","generator":"template","validation":"English template."}},{"id":53,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:18Z","stage":"policy","title":"Policy re-check before refund: ELIGIBLE","detail":{"decision":"ELIGIBLE","stage":"final","action":"REFUND","checks":[{"name":"request_supported","passed":true,"detail":"Request understood as REFUND_REQUEST / REFUND (reason NOT_AS_DESCRIBED)"},{"name":"payment_captured","passed":true,"detail":"PayPal capture status is COMPLETED"},{"name":"return_window","passed":true,"detail":"Purchased 0 days ago; window is 30 days"},{"name":"product_eligible","passed":true,"detail":"Trail Runner sneakers, EU size 42 is eligible for return"},{"name":"refundable_amount","passed":true,"detail":"Requested 49.99 USD; refundable 49.99 USD"}],"reasons":[],"capture_id":"4A447050D9445581B","capture_status":"COMPLETED"}},{"id":54,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:21Z","stage":"paypal","title":"PayPal refund COMPLETED","detail":{"refund_id":"6TJ28435C8083362L","status":"COMPLETED","amount":{"currency_code":"USD","value":"49.99"},"expected_amount":{"value":"49.99","currency_code":"USD"},"amount_verified":true,"create_time":"2026-11-09T02:43:19-08:00","paypal_request_id":"tradeos-refund-R-8D30516FC46C499A","note_to_payer":"This refund of 49.99 USD is for your returned item. Thank you for your patience!","status_details":null}},{"id":55,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:21Z","stage":"note","title":"Final customer note written after PayPal COMPLETED","detail":{"outcome":"COMPLETED_NOTE","language":"English","language_code":"en","text":"Your return was approved and your refund of 49.99 USD has been completed by PayPal. Thank you!","source_en":"Your return was approved and your refund of 49.99 USD has been completed by PayPal. Thank you!","generator":"template","validation":"English template."}},{"id":70,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:37Z","stage":"webhook","title":"PayPal webhook PAYMENT.CAPTURE.REFUNDED received — signature verified (second confirmation)","detail":{"event_id":"WH-48D27457BH5486146-06A73809KL4894719","event_type":"PAYMENT.CAPTURE.REFUNDED","resource_id":"6TJ28435C8083362L","resource_status":"COMPLETED","status_details":null,"verification":"SUCCESS","verify_method":"self","received_at":"2026-11-09T10:43:37Z","create_time":"2026-11-09T10:43:24.437Z","transmission_time":"2026-11-09T10:43:34Z","transmission_age":"fresh"}},{"id":122,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:46:14Z","stage":"reconcile","title":"Reconciled with PayPal — all match","detail":{"checks":[{"field":"capture.status","local":"PARTIALLY_REFUNDED/REFUNDED","paypal":"REFUNDED","match":true},{"field":"capture.amount","local":"49.99 USD","paypal":{"currency_code":"USD","value":"49.99"},"match":true},{"field":"refund.status","local":"COMPLETED","paypal":"COMPLETED","match":true,"advanced":false},{"field":"refund.amount","local":"49.99 USD","paypal":"49.99 USD","match":true}],"ok":true,"needs_human":null,"seq":1794221174135303408}}],"paypal_calls":[{"id":11,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:14Z","operation":"create_order_with_card","ok":1,"result":"{\"id\": \"8K878765YK1980921\", \"status\": \"COMPLETED\"}","debug_id":"f92194725de69","request_id":"tradeos-order-R-8D30516FC46C499A","evidence_json":"{\"id\": \"8K878765YK1980921\", \"status\": \"COMPLETED\", \"capture_id\": \"4A447050D9445581B\", \"capture_status\": \"COMPLETED\"}","seq":1794220994943573357},{"id":12,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:16Z","operation":"get_capture","ok":1,"result":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\"}","debug_id":"f5296416ebf15","request_id":null,"evidence_json":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794220996217877072},{"id":13,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","operation":"get_capture","ok":1,"result":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\"}","debug_id":"f529641d3d6b7","request_id":null,"evidence_json":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794220997108772204},{"id":14,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:17Z","operation":"refund_capture","ok":0,"result":"HTTP 422 · UNPROCESSABLE_ENTITY · The requested action could not be completed, was semantically incorrect, or failed business validation. (REFUND_FAILED_INSUFFICIENT_FUNDS: Capture could not be refunded due to insufficient funds. Please check to see if you have sufficient funds in your PayPal account or if the bank account linked to your PayPal account is verified and has sufficient funds.) · debug_id=70c28ae654da","debug_id":"70c28ae654da","request_id":"tradeos-refund-R-8D30516FC46C499A","evidence_json":"{\"http_status\": 422, \"name\": \"UNPROCESSABLE_ENTITY\", \"issue\": \"REFUND_FAILED_INSUFFICIENT_FUNDS\"}","seq":1794220997420396311},{"id":15,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:18Z","operation":"get_capture","ok":1,"result":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\"}","debug_id":"f3044990021bb","request_id":null,"evidence_json":"{\"id\": \"4A447050D9445581B\", \"status\": \"COMPLETED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794220998296262483},{"id":16,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:43:21Z","operation":"refund_capture","ok":1,"result":"{\"id\": \"6TJ28435C8083362L\", \"status\": \"COMPLETED\"}","debug_id":"f304499b0297d","request_id":"tradeos-refund-R-8D30516FC46C499A","evidence_json":"{\"id\": \"6TJ28435C8083362L\", \"status\": \"COMPLETED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794221001030363411},{"id":34,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:46:13Z","operation":"get_capture","ok":1,"result":"{\"id\": \"4A447050D9445581B\", \"status\": \"REFUNDED\"}","debug_id":"f18829883476e","request_id":null,"evidence_json":"{\"id\": \"4A447050D9445581B\", \"status\": \"REFUNDED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794221173634490259},{"id":35,"case_id":"R-8D30516FC46C499A","ts":"2026-11-09T10:46:14Z","operation":"get_refund","ok":1,"result":"{\"id\": \"6TJ28435C8083362L\", \"status\": \"COMPLETED\"}","debug_id":"f217209d50b34","request_id":null,"evidence_json":"{\"id\": \"6TJ28435C8083362L\", \"status\": \"COMPLETED\", \"amount\": {\"currency_code\": \"USD\", \"value\": \"49.99\"}}","seq":1794221174117505469}]}