Error: transaction_error
The transaction payload failed validation. The API returns a specific error name — amount_required, invalid_amount, or invalid_<field> — telling you exactly which field is wrong.
What it means
Before any rule evaluation, the transaction is validated. Validation failures return 400 with the precise reason.
The validation error names
amount_required — the amount field is missing.
invalid_amount — amount isn't a valid positive finite number within limits.
invalid_<field> — another field is invalid (currency, merchant, category, timestamp, ...).
How to fix
Always send amount as a number in major units (e.g. 12400 for $12,400).
Keep currency as a 3-letter code, merchant as a string, category from your configured set.
Validate client-side before calling to avoid 400s in production.
At a glance
| Field | Value |
|---|---|
| HTTP status | 400 |
| Error code | transaction_error (amount_required / invalid_amount / invalid_<field>) |
| Response shape | {"error": "amount_required"} |
| Evaluation | Not attempted |
Minimal valid payload
{
"amount": 6200,
"currency": "USD",
"merchant": "unknown-gpu.ru",
"category": "compute"
}
# Invalid:
{"merchant": "no-amount"} -> {"error": "amount_required"}
{"amount": -5, "merchant": "x"} -> {"error": "invalid_amount"}
Send amount as a positive finite number.
FAQ
What exactly is invalid_amount?
Amount must be a finite number within the server's accepted range — negative, NaN, or absurdly large values return invalid_amount.
Can I send string amounts?
No — send numbers. Strings like "100" fail validation.
What fields are optional?
amount is required; others (currency, merchant, category, timestamp) follow the documented schema — invalid values get invalid_<field>.
Related
Stop the next $12,400 night.
One API call (or MCP tool) in front of every agent transaction — APPROVED, BLOCKED, or FLAGGED, deterministic, ~5 ms, fully logged.
See plans — from $99/mo Try a live check