ISO 4217 minor units: decimal amount to integer minor units and back
Converts up to 200 money amounts between decimal strings and integer minor units (cents, yen, fils) using the ISO 4217 exponent from the SIX Group list, for an agent about to send an amount to a payment API. Returns the exponent, the integer minor amount and the canonical decimal string; JPY is 0, KWD and BHD are 3, CLF is 4. An amount with more fraction digits than the currency allows fails with the excess digits unless a rounding mode is given. Codes with no minor unit (XAU, XXX) are unsupported and codes not on the list are unknown; an exponent is never guessed. Does not convert between currencies and does not apply cash rounding (see cash-rounding).
What you get
A wrong exponent is a 100x or 1000x charge. 200 conversions per $0.005 call, from the official list.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/minor-units. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/minor-units \
-H 'content-type: application/json' \
-d '{"items":[{"currency":"JPY","amount":"1500"},{"currency":"KWD","minor":12345},{"currency":"USD","amount":"19.999"}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
items | array<object>; max 200 items | yes |
Example request body
{
"items": [
{
"currency": "JPY",
"amount": "1500"
},
{
"currency": "KWD",
"minor": 12345
},
{
"currency": "USD",
"amount": "19.999"
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
items | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the money-math-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent