Invalid amount
type | https://docs.frem.sh/reference/api/errors/invalid-amount |
| HTTP status | 400 Bad Request |
What it means
An amount field was not a decimal string.
Example detail messages returned with this error:
- amount_eur must be a decimal string such as “12.50”; omit it to refund the remainder.
What to do
Send the amount as a string in major units, with a decimal point: "12.50", not 12.5 and not 1250. A string is required because binary floating point cannot represent most decimal amounts exactly, and a rounding error in a money field is a real discrepancy rather than a display artefact.
To refund everything still outstanding, omit the field entirely rather than computing the remainder yourself — the server knows what has already been refunded.
Response shape
All fremforge API errors are RFC 9457 problem+json:
{
"type": "https://docs.frem.sh/reference/api/errors/invalid-amount",
"title": "Bad Request",
"status": 400,
"detail": "..."
}Branch on type, not on title or detail - those are human-readable and may be reworded.