---
title: "Send money as an integer with its currency · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/requests-and-responses/money
updated: 2026-10-20
licence: "All rights reserved"
---

# Send money as an integer with its currency

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
- Rule: Send amounts as an integer count of the currency's smallest unit, together with the ISO 4217 currency code. Never use floating-point numbers for money.
- How: Write 129.50 Swedish kronor as `{ "amount": 12950, "currency": "SEK" }`. Look up each currency's number of decimals in ISO 4217, because it is not always two. Japanese yen has none and Kuwaiti dinar has three. Floats can't store 0.1 exactly, so sums drift. A decimal string such as `"129.50"` also works, if the whole API uses it. Store it with [exact types](https://agentwranglers.se/playbook/data/schema-design/exact-types).
- Check: Search the OpenAPI file for money fields typed `number`. None remain, and each amount has a `currency` beside it.

Example:

```json
{ "total": { "amount": 12950, "currency": "SEK" } }
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/requests-and-responses/money`.

- Previous: [Send dates as RFC 3339 with a time zone](https://agentwranglers.se/playbook/api-design/requests-and-responses/dates-and-times)
- Next: [Send IDs as strings](https://agentwranglers.se/playbook/api-design/requests-and-responses/string-ids)
- [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
