financeready today
Invoice approval
Approve, hold or reject supplier invoices against the PO and the history.
Accounts payable decisions are repetitive and well described by the paperwork. The state is the invoice, the purchase order it claims to match, and the supplier's history.
The questions
decisionchoicepick one option
What should happen to this invoice?
approvePay it in the normal run.
hold_for_reviewPark it for a human check before payment.
request_correctionSend back to the supplier for a corrected invoice.
rejectDo not pay; it is invalid or fraudulent.
fraud_riskscorepick a level on an ordered scale
How likely is this invoice to be fraudulent?
0Negligible.
1Low.
2Moderate: something is off.
3High: multiple red flags.
matches_ponoulis the statement true?
The invoice matches its purchase order in supplier, amount and goods.
falseno, the statement does not hold
trueyes, the statement holds
needs_humannoulis the statement true?
A person must look at this before payment.
falseno, the statement does not hold
trueyes, the statement holds
Acting on the answers
- approve with fraud_risk level 0 or 1: straight to the payment run.
- bank_details_changed_recently is the kind of fact the model weighs; expect hold_for_review to rise when it is true.
request
{
"state": {
"invoice": {
"number": "SUP-88213",
"supplier": "Northwind Logistics",
"amount_usd": 14850,
"currency": "USD",
"date": "2026-09-18",
"line_items": [
{
"desc": "Freight, 3 pallets, DE to NL",
"qty": 3,
"unit_usd": 4950
}
]
},
"purchase_order": {
"number": "PO-5521",
"amount_usd": 14850,
"supplier": "Northwind Logistics",
"status": "open",
"approved_by": "ops-lead"
},
"supplier_history": {
"invoices_paid_12m": 41,
"disputes_12m": 1,
"avg_days_to_pay": 27,
"duplicate_flags": 0
},
"checks": {
"po_match": true,
"duplicate_number": false,
"bank_details_changed_recently": true
}
},
"questions": {
"decision": {
"type": "choice",
"instructions": "What should happen to this invoice?",
"criteria": {
"approve": "Pay it in the normal run.",
"hold_for_review": "Park it for a human check before payment.",
"request_correction": "Send back to the supplier for a corrected invoice.",
"reject": "Do not pay; it is invalid or fraudulent."
}
},
"fraud_risk": {
"type": "score",
"instructions": "How likely is this invoice to be fraudulent?",
"criteria": [
"Negligible.",
"Low.",
"Moderate: something is off.",
"High: multiple red flags."
]
},
"matches_po": {
"type": "noul",
"instructions": "The invoice matches its purchase order in supplier, amount and goods."
},
"needs_human": {
"type": "noul",
"instructions": "A person must look at this before payment."
}
}
}call it
import { loadEngine } from "nirnaya"; // the same call this site makes
const engine = await loadEngine(); // loads once, then cached by the browser
const answers = await engine.decide(
"{\"invoice\":{\"number\":\"SUP-88213\",\"supplier\":\"Northwind Logistics\",\"amount_usd\":14850,\"currency\":\"USD\",\"date\":\"2026-09-18\",\"line_items\":[{\"desc\":\"Freight, 3 pallets, DE to NL\",\"qty\":3,\"unit_usd\":4950}]},\"purchase_order\":{\"number\":\"PO-5521\",\"amount_usd\":14850,\"supplier\":\"Northwind Logistics\",\"status\":\"open\",\"approved_by\":\"ops-lead\"},\"supplier_history\":{\"invoices_paid_12m\":41,\"disputes_12m\":1,\"avg_days_to_pay\":27,\"duplicate_flags\":0},\"checks\":{\"po_match\":true,\"duplicate_number\":false,\"bank_details_changed_recently\":true}}",
{
"decision": {
"type": "choice",
"instructions": "What should happen to this invoice?",
"criteria": {
"approve": "Pay it in the normal run.",
"hold_for_review": "Park it for a human check before payment.",
"request_correction": "Send back to the supplier for a corrected invoice.",
"reject": "Do not pay; it is invalid or fraudulent."
}
},
"fraud_risk": {
"type": "score",
"instructions": "How likely is this invoice to be fraudulent?",
"criteria": [
"Negligible.",
"Low.",
"Moderate: something is off.",
"High: multiple red flags."
]
},
"matches_po": {
"type": "noul",
"instructions": "The invoice matches its purchase order in supplier, amount and goods."
},
"needs_human": {
"type": "noul",
"instructions": "A person must look at this before payment."
}
}
);
for (const a of answers) console.log(a.qid, a.answer, a.p);curl and Python target nirnaya_serve, the Jev-compatible server in the release; the browser snippet is exactly what this site does.