{"uid":"cap_4oulOVNEwDyJylfQgtHLM","slug":"writerslogic-iso-4217-minor-units-converter-46a23be3","name":"WritersLogic ISO 4217 Minor Units Converter","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/minor-units?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","required":["currency"],"properties":{"minor":{"type":"integer","maximum":999999999999999,"minimum":-999999999999999,"description":"Integer minor units to convert to a decimal string."},"amount":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,12})?$","maxLength":30,"description":"Decimal amount to convert to minor units. Give amount or minor, or neither to look up the exponent."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 alphabetic code, upper case."},"exponent":{"type":"integer","maximum":8,"minimum":0,"description":"Override for currencies absent from ISO 4217 list one or without a minor unit. Wins over the list."},"rounding":{"enum":["half-up","half-down","half-even","up","down","ceiling","floor"],"type":"string","description":"Only used when amount has more fraction digits than the exponent. half-up: ties away from zero. half-down: ties toward zero. half-even: ties to the even neighbour. up: away from zero. down: toward zero. ceiling: toward +infinity. floor: toward -infinity."}},"additionalProperties":false},"maxItems":200,"minItems":1}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2MhsTvY6_95BPW7MWvxBy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts up to 200 monetary amounts between decimal strings and integer minor units (cents, fils, etc.) using ISO 4217 currency exponents from the SIX Group list","exampleAgentPrompt":"Before I send this charge to the payment API, convert $19.99 USD and ¥1500 JPY to their integer minor units — USD should use the standard 2-decimal exponent and JPY uses zero decimals.","exampleUseCases":[{"title":"Normalize amounts for Stripe payment intent","prompt":"I need to send a charge of 29.95 USD to Stripe — can you convert that to the correct integer minor units so I don't accidentally charge the wrong amount?"},{"title":"Batch convert invoices for multi-currency billing","prompt":"I have three invoice amounts to normalize before posting to our payment gateway: 100.00 EUR, 1.500 KWD, and 500 JPY — please give me the integer minor units and confirm the exponent used for each."},{"title":"Round and convert ambiguous decimal for payment","prompt":"I have an amount of 10.555 USD that I need to send to a payments API as an integer — please convert it to cents using half-even rounding and tell me the exponent."}],"resultDescription":"For each input item, returns the ISO 4217 exponent for the currency, the converted integer minor-unit amount, and the canonical decimal string representation. If a decimal amount has more fraction digits than the currency allows and no rounding mode is given, the call fails with an error indicating the excess digits. Unsupported codes (XAU, XXX) or unknown codes return an error rather than a guessed exponent.","failureModes":["Amount has more fraction digits than the currency exponent allows and no rounding mode supplied — returns error with excess digit count","Currency code not found on the SIX Group ISO 4217 list — returns unknown code error, no exponent is guessed","Currency has no minor unit (XAU, XXX) — returns unsupported code error","Input array is empty or exceeds 200 items — schema validation error","Invalid currency code format (not 3 uppercase letters) — schema validation error","Integer minor value outside allowed range (±999999999999999) — schema validation error"],"whenToPreferThis":"Use this endpoint when you need to reliably convert between human-readable decimal money strings and the integer minor-unit representation required by payment APIs (Stripe, Adyen, etc.), especially when you need authoritative ISO 4217 exponents for non-obvious currencies like KWD (3), JPY (0), or CLF (4). Prefer it over manual multiplication when handling a batch of amounts or when rounding behavior must be explicit and auditable. Do not use it for currency exchange rate conversion or cash rounding.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:40:45.098Z","isFirstParty":false,"canonicalSlug":"writerslogic-iso-4217-minor-units-converter-46a23be3"}