Invoice NS-E641J-2 is 30 days overdue, $140.00 still owed after a partial payment

Status
Resolved
At risk
$140.00
Detected (detector clock)
2026-12-01 17:29

Diagnosis

AI agent (anthropic/claude-haiku-5.5)

Wholesale invoice NS-E641J-2 to Corner Cafe for $240.00 was due November 1 and is now 30 days overdue. They paid $100.00 by bank transfer, so $140.00 is still owed, and the invoice shows they have not opened it yet. If nobody acts, the $140.00 may stay unpaid, so a reminder should go out now.

Decisions

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

Send invoice reminder

INV2-L3Y6-2D5Y-YA7V-E79JPayPal OK

Agent proposed

No reminder has been sent and the buyer has not viewed the invoice, so a reminder is the safe first step to collect the $140.00 balance.

Note: Friendly reminder: invoice NS-E641J-2 has a remaining balance of $140.00 (of $240.00; $100.00 received). It was due November 1. Please arrange payment of the balance at your earliest convenience. Thank you, Night Owl Coffee Roasters.

Policy said

Auto
  • Within the autopilot rules.

PayPal returned

HTTP 200

debug id f45751196ac11

Response body
{
  "id": "INV2-L3Y6-2D5Y-YA7V-E79J"
}
Exact API call (PayPal-Request-Id ns-f89fdbc7e3dfd8443b9be9269ab9cb78)
POST /v2/invoicing/invoices/INV2-L3Y6-2D5Y-YA7V-E79J/remind
{
  "subject": "Reminder: invoice NS-E641J-2 is past due",
  "note": "Friendly reminder: invoice NS-E641J-2 has a remaining balance of $140.00 (of $240.00; $100.00 received). It was due November 1. Please arrange payment of the balance at your earliest convenience. Thank you, Night Owl Coffee Roasters.",
  "send_to_invoicer": false,
  "send_to_recipient": true
}

Evidence

Invoice NS-E641J-2 (INV2-L3Y6-2D5Y-YA7V-E79J) to orders@cafe.example.com was due 2026-11-01. Status PARTIALLY_PAID, $100.00 of $240.00 paid. No reminder sent yet.

invoice id
INV2-L3Y6-2D5Y-YA7V-E79J
invoice number
NS-E641J-2
status
PARTIALLY_PAID
recipient
orders@cafe.example.com
due date
2026-11-01
days overdue
30
total
$240.00
paid
$100.00
owed
$140.00
last reminder at
none
invoiceINV2-L3Y6-2D5Y-YA7V-E79J

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

Audit trail

Detected, diagnosed, decided, executed. Live.

Detected: Invoice NS-E641J-2 is 30 days overdue, $140.00 still owed after a partial payment
Detector
Invoice NS-E641J-2 (INV2-L3Y6-2D5Y-YA7V-E79J) to orders@cafe.example.com was due 2026-11-01. Status PARTIALLY_PAID, $100.00 of $240.00 paid. No reminder sent yet.
Agent started triage
Agent
Agent read get_invoice
Agent
get_invoicevia PayPal Agent Toolkitok
args { "invoice_id": "INV2-L3Y6-2D5Y-YA7V-E79J" }
Result
{"id":"INV2-L3Y6-2D5Y-YA7V-E79J","status":"PARTIALLY_PAID","detail":{"currency_code":"USD","note":"Wholesale order from Night Owl Coffee Roasters. Thank you!","category_code":"SHIPPABLE","invoice_number":"NS-E641J-2","invoice_date":"2026-10-18","payment_term":{"term_type":"DUE_ON_DATE_SPECIFIED","due_date":"2026-11-01"},"viewed_by_recipient":false,"group_draft":false,"metadata":{"create_time":"2026-11-04T17:29:39Z","last_update_time":"2026-11-04T17:29:41Z","first_sent_time":"2026-11-04T17:29:40Z","last_sent_time":"2026-11-04T17:29:40Z","created_by_flow":"REGULAR_SINGLE","recipient_view_url":"https://www.sandbox.paypal.com/invoice/p/#L3Y62D5YYA7VE79J","invoicer_view_url":"https://www.sandbox.paypal.com/invoice/details/INV2-L3Y6-2D5Y-YA7V-E79J","caller_type":"API_V2_INVOICE","spam_info":{}},"archived":false},"invoicer":{"business_name":"Night Owl Coffee Roasters"},"primary_recipients":[{"billing_info":{"name":{"given_name":"Corner","surname":"Cafe","full_name":"Corner Cafe"},"email_address":"orders@cafe.example.com"}}],"items":[{"id":"ITEM-25D38590UG597241A","name":"Wholesale espresso blend, 5kg","quantity":"1","unit_amount":{"currency_code":"USD","value":"240.00"},"unit_of_measure":"QUANTITY"}],"configuration":{"tax_calculated_after_discount":false,"tax_inclusive":false,"allow_tip":false,"partial_payment":{"allow_partial_payment":true},"allow_only_pay_by_bank":false,"allow_vba_payments":false,"save_item_for_future":true,"template_id":"TEMP-64X047134N4806103"},"amount":{"breakdown":{"item_total":{"currency_code":"USD","value":"240.00"},"discount":{"invoice_discount":{"amount":{"currency_code":"USD","value":"0.00"}},"item_discount":{"currency_code":"USD","value":"0.00"}},"tax_total":{"currency_code":"USD","value":"0.00"}},"currency_code":"USD","value":"240.00"},"due_amount":{"currency_code":"USD","value":"140.00"},"payments":{"paid_amount":{"currency_code":"USD","value":"100.00"},"transactions":[{"type":"EXTERNAL","payment_id":"EXTR-20T08621ER918612W","payment_date":"2026-11-04","payment_date_time":"2026-11-04T00:00:00Z","method":"BANK_TRANSFER","note":"Part payment by bank transfer","amount":{"currency_code":"USD","value":"100.00"}}]},"links":[{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-L3Y6-2D5Y-YA7V-E79J","rel":"self","method":"GET"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2-L3Y6-2D5Y-YA7V-E79J/payments","rel":"record-payment","method":"POST"},{"href":"https://api.sandbox.paypal.com/v2/invoicing/invoices/INV2
Agent diagnosis
Agent
Wholesale invoice NS-E641J-2 to Corner Cafe for $240.00 was due November 1 and is now 30 days overdue. They paid $100.00 by bank transfer, so $140.00 is still owed, and the invoice shows they have not opened it yet. If nobody acts, the $140.00 may stay unpaid, so a reminder should go out now.
Agent proposed: Send invoice reminder
Agent
No reminder has been sent and the buyer has not viewed the invoice, so a reminder is the safe first step to collect the $140.00 balance.
Policy said: auto-execute
Policy gate
  • Within the autopilot rules.
POST /v2/invoicing/invoices/INV2-L3Y6-2D5Y-YA7V-E79J/remind
Executor
PayPal-Request-Id: ns-f89fdbc7e3dfd8443b9be9269ab9cb78
{
  "subject": "Reminder: invoice NS-E641J-2 is past due",
  "note": "Friendly reminder: invoice NS-E641J-2 has a remaining balance of $140.00 (of $240.00; $100.00 received). It was due November 1. Please arrange payment of the balance at your earliest convenience. Thank you, Night Owl Coffee Roasters.",
  "send_to_invoicer": false,
  "send_to_recipient": true
}
PayPal returned 200
PayPal
HTTP 200, debug id f45751196ac11, 788 ms
{
  "id": "INV2-L3Y6-2D5Y-YA7V-E79J"
}
Invoice reminder sent by PayPal
Executor