The payments operator on the night shift.
Fixes the safe PayPal problems itself and asks you before anything risky.
- PayPal sandbox connected
- AI agent (anthropic/claude-haiku-5.5)
- Webhooks verified
Last night
- Protected
- $206.00
- Waiting for you
- 53
| Time | What happened | Amount | Decision |
|---|---|---|---|
| 17:31:40 | Policy said: needs the owner's approval | $189.00 | Needs approval |
| 17:31:16 | Detected: $189.00 authorization expires in 2 days | $189.00 | |
| 17:30:48 | PayPal refused: 422 UNPROCESSABLE_ENTITY: REAUTHORIZATION_TOO_SOON: A reauthorization is only allowed once from Day 4 to Day 29 since the date of the original authorization. | $64.00 | |
| 17:30:48 | Policy said: needs the owner's approval | $64.00 | Needs approval |
| 17:30:48 | Policy said: auto-execute | $64.00 | Auto |
| 17:30:37 | Detected: Honor period lapsed on $64.00, order not shipped | $64.00 |
Where the money goes
Six ways a one-to-five-person PayPal shop that charges when it ships loses money without noticing. Nightshift has a detector for each.
| The failure | What it costs | What Nightshift does |
|---|---|---|
| Authorizations that lapse | After 3 days PayPal stops guaranteeing the funds; after 29 days the authorization is gone. A slow week in the roastery is enough. | Captures shipped orders, reauthorizes unshipped ones, asks you before day 29. |
| Captures that fail quietly | The parcel has left, the capture came back INSTRUMENT_DECLINED, and the error went to a log nobody reads. | Asks you: contact the buyer, or retry the capture once. |
| Double charges and double refunds | A double click charges a cart twice; a retry in a support tool refunds the same $20 twice. Disputes or write-offs. | Proposes refunding the second charge; refunds always wait for you. |
| Invoices nobody chases | Wholesale invoices go overdue or get half paid, and nobody sends the reminder. | Sends a PayPal reminder, once per cooldown. |
| Refund spikes | A bad batch ships and refunds jump to a third of captures. You hear about it from the bank statement. | Flags the spike and asks you to check the batch. |
| Dispute deadlines | Miss the date and PayPal closes it in the buyer's favour. | Asks you to respond before the date. |
How it works
The agent never touches a money-moving PayPal endpoint. It proposes; the policy gate decides; the executor calls PayPal.
Watch
Verified webhooks and a sweep of Orders, Payments, Invoicing and Transaction Search build a local ledger.
Detect
Plain, tested code opens an incident with the money at risk, the deadline and the PayPal ids.
Agent proposes
An LLM reads the evidence with read-only PayPal tools and writes a diagnosis.
Policy decides
A deterministic gate, not the LLM, marks each proposal auto, needs approval or forbidden.
PayPal executes
Only cleared actions run, with an idempotency key; the response lands in the audit trail.
See it on real sandbox data
The scenario lab creates real sandbox orders, failed captures, double refunds and overdue invoices, then moves the detector clock forward. Every id can be looked up in the sandbox.