Money Schema

This document outlines the structure and usage of the Money object in our API responses.

Money Representation

Monetary values are encoded combining the currency and amount, using the smallest unit of currency to ensure accuracy and prevent floating-point issues.

MoneySchema Definition

The MoneySchema includes:

  • amount: Integer representing the value in the smallest currency unit (e.g., pence for GBP).
  • currency: ISO 4217 currency code indicating the currency type.
{
  "exampleMoney": {
    "amount": 1050,
    "currency": "GBP"
  }
}

Supported Currencies

Supports any currency with an ISO 4217 code.

Base Units for Currency

Transactions use the smallest currency unit to avoid rounding errors, e.g., 1050 in GBP represents £10.50.