# AR Analyzer – Collections Priority

> AR Analyzer – Collections Priority is a paid API for AI agents from ar-analyzer.rileycraig14.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Performs deterministic accounts-receivable analysis on a list of invoices, producing aging buckets, DSO with trend, seriously-overdue totals, a ranked collections call list, and a recovery-decay curve with expected recovery amounts.

## Facts

- Endpoint: POST https://ar-analyzer.rileycraig14.workers.dev/ar/collections-priority?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ar-analyzer-collections-priority-d6e01c25
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vtJqLAdEs-7j4oIQvk-Va

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ar-analyzer-collections-priority-d6e01c25 -d '<json body>'
```

Example prompt: Run an AR collections priority analysis on my open invoices as of today — here's the list: INV-101 for $3,200 from Acme Corp due 45 days ago, INV-205 for $5,600 from Delta Mfg due 71 days ago, and INV-310 for $800 from Beta LLC due 12 days ago. Tell me who to call first, what my at-risk total is, and what recovery I should expect.

## When to prefer this

Choose this endpoint when you need deterministic, rule-based AR analysis with explicit arithmetic — not probabilistic or ML-based forecasting. It is ideal for back-office AI agents that must produce auditable, reproducible AR aging reports, collections priority rankings, and DSO calculations on demand. Prefer it over general-purpose finance APIs when you need the specific combination of aging buckets, a recovery-decay curve, and a ranked call list in a single response.

## Known failure modes

- Missing required 'invoices' array — returns 400 with validation error
- Invoice objects missing required fields (amount, due date, ID) — returns 400 or partial results
- as_of date in unrecognized format — may default to server date or return 400
- Empty invoices array — returns zeroed-out report with no call list
- Payment failure (x402) — returns 402 Payment Required before processing
- Malformed JSON body — returns 400 parse error

## How this service works

Deterministic accounts-receivable analysis for AI agents running back-offices: aging buckets (0-30/31-60/61-90/90+), seriously-overdue totals under the strictly-greater-than-60-days rule, Days Sales Outstanding with benchmark bands and trend, and collections triage with a ranked call list and an explicit recovery-decay curve. Exact arithmetic, every rule stated in the response, nothing stochastic.

## Output

Returns a JSON object with: aging bucket totals (0-30, 31-60, 61-90, 90+ days), Days Sales Outstanding with benchmark bands and trend, the total at-risk amount for invoices strictly over 60 days old, a ranked call list with customer name, invoice ID, days overdue, priority score, and recommended action (e.g. escalate/call/monitor), a recovery-decay probability curve by age bracket (<=30d: 97%, <=60d: 90%, <=90d: 70%, <=180d: 50%, >180d: 25%), and total expected recovery value. All arithmetic is exact and every business rule applied is stated in the response.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "invoices"
 ],
 "properties": {
  "as_of": {
   "type": "string"
  },
  "invoices": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "curve": "recovery probability by age: <=30d 97%, <=60d 90%, <=90d 70%, <=180d 50%, >180d 25%",
 "at_risk": 4193.31,
 "call_list": [
  {
   "id": "INV-504",
   "days": 71,
   "rank": 1,
   "action": "escalate",
   "amount": 5600,
   "customer": "Delta Mfg",
   "priority_score": 8960
  }
 ],
 "expected_recovery": 13652.44
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ar-analyzer-collections-priority-d6e01c25/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ar-analyzer.rileycraig14.workers.dev](https://www.zero.xyz/host/ar-analyzer.rileycraig14.workers.dev/llms.txt)
