# Treasury Risk Analyzer — PAY/REVIEW/DO_NOT_PAY Decision Engine

> Treasury Risk Analyzer — PAY/REVIEW/DO_NOT_PAY Decision Engine is a paid API for AI agents from portfolio-risk-analyzer-g9ao.onrender.com, paid per call via x402, $2/call, status unknown (last checked 2026-11-30).

Combines liquidity forecasting, FX exposure, and treasury risk metrics into a single PAY/REVIEW/DO_NOT_PAY decision with confidence score for a proposed payment.

## Facts

- Endpoint: POST https://portfolio-risk-analyzer-g9ao.onrender.com/treasury-decision?utm_source=zero.xyz
- Price: $2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/treasury-risk-analyzer-pay-review-do-not-pay-decision-engine-be068cc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gTLcQc_wxXG3uCzbjBnDJ

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 treasury-risk-analyzer-pay-review-do-not-pay-decision-engine-be068cc3 -d '<json body>'
```

Example prompt: Before we wire $250,000 USD to our supplier tomorrow, can you run a full treasury risk check — we have $1.2M opening cash, a minimum buffer of $400k, 90-day horizon, some EUR and GBP payables, and I need a PAY, REVIEW, or DO_NOT_PAY decision with confidence?

## When to prefer this

Use this endpoint when you need a single authoritative go/no-go verdict on a payment that integrates all three treasury risk dimensions simultaneously — liquidity, FX, and portfolio risk — rather than consulting each in isolation. Prefer this over the individual sibling endpoints (liquidity-only, FX-only, treasury-only) when the payment decision requires a holistic confidence score and you want a machine-readable PAY/REVIEW/DO_NOT_PAY output suitable for automation or audit trails.

## Known failure modes

- Missing required payment amount or currency returns a 400 validation error
- Missing liquidity fields (openingCash, horizonDays, minimumCashBuffer) causes request rejection
- Invalid date formats in cashFlows or payment.date return schema validation errors
- FX positions referencing currencies not present in fxRates may produce incomplete exposure analysis
- Insufficient historical returns data for treasury risk computation may degrade confidence score
- Service cold-start latency on Render free tier may cause timeout on first call

## How this service works

Treasury Risk Analyzer — Can we safely execute this payment today? Combines liquidity, FX exposure and treasury risk into a PAY/REVIEW/DO_NOT_PAY decision with confidence.

## Output

Returns a structured decision object containing one of three verdicts — PAY, REVIEW, or DO_NOT_PAY — along with a confidence score and supporting breakdown across liquidity (daily cash projection, buffer headroom), FX exposure (gross/net by currency, stress scenario impact), and treasury risk (volatility, Sharpe/Sortino ratios, VaR), explaining why the payment is or is not advisable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payment": {
   "type": "object",
   "required": [
    "amount",
    "currency"
   ],
   "properties": {
    "date": {
     "type": "string",
     "format": "date"
    },
    "amount": {
     "type": "number",
     "exclusiveMinimum": 0
    },
    "currency": {
     "type": "string"
    },
    "description": {
     "type": "string",
     "maxLength": 200
    }
   }
  },
  "liquidity": {
   "type": "object",
   "required": [
    "openingCash",
    "horizonDays",
    "minimumCashBuffer"
   ],
   "properties": {
    "cashFlows": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "date",
       "amount"
      ],
      "properties": {
       "date": {
        "type": "string",
        "format": "date"
       },
       "amount": {
        "type": "number"
       },
       "category": {
        "type": "string",
        "maxLength": 50
       },
       "description": {
        "type": "string",
        "maxLength": 200
       }
      }
     }
    },
    "startDate": {
     "type": "string",
     "format": "date"
    },
    "horizonDays": {
     "type": "integer",
     "maximum": 3650,
     "minimum": 1
    },
    "openingCash": {
     "type": "number"
    },
    "workingCapital": {
     "type": "object",
     "required": [
      "accountsReceivable",
      "accountsPayable",
      "periodCreditSales",
      "periodCOGS",
      "periodDays"
     ],
     "properties": {
      "inventory": {
       "type": "number",
       "minimum": 0
      },
      "periodCOGS": {
       "type": "number",
       "minimum": 0
      },
      "periodDays": {
       "type": "number",
       "maximum": 3650,
       "exclusiveMinimum": 0
      },
      "accountsPayable": {
       "type": "number",
       "minimum": 0
      },
      "periodCreditSales": {
       "type": "number",
       "minimum": 0
      },
      "accountsReceivable": {
       "type": "number",
       "minimum": 0
      }
     }
    },
    "minimumCashBuffer": {
     "type": "number",
     "minimum": 0
    }
   }
  },
  "fxExposure": {
   "type": "object",
   "properties": {
    "fxRates": {
     "type": "object",
     "additionalProperties": {
      "type": "number"
     }
    },
    "positions": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "currency",
       "type",
       "amount"
      ],
      "properties": {
       "type": {
        "enum": [
         "receivable",
         "payable",
     
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "success",
  "payment": {
   "date": "2026-09-14",
   "amount": 750000,
   "currency": "EUR",
   "amount_base_currency": 810000
  },
  "decision": "PAY",
  "warnings": [
   "[fx_exposure] No existing FX positions were supplied — fx_exposure severity reflects only this pa..."
  ],
  "timestamp": "2026-11-05T06:08:41.991Z",
  "components": {
   "liquidity": {
    "status": "HEALTHY",
    "shortfall": 0,
    "minimum_date": "2026-09-14",
    "required_buffer": 1000000,
    "minimum_cash_position": 4190000
   },
   "fx_exposure": {
    "score": 2,
    "context": "payment_only",
    "risk_level": "LOW",
    "currency_concentration_hhi": null,
    "net_exposure_payment_currency": -810000
   },
   "treasury_risk": {
    "evaluated": false
   }
  },
  "confidence": 0.83,
  "analysis_id": "e066f2bb-a166-424e-95b4-44922de036cb",
  "base_currency": "USD"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/treasury-risk-analyzer-pay-review-do-not-pay-decision-engine-be068cc3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from portfolio-risk-analyzer-g9ao.onrender.com](https://www.zero.xyz/host/portfolio-risk-analyzer-g9ao.onrender.com/llms.txt)
