{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gnosis-pay/main/json-schema/gnosis-pay-account-limit-schema.json",
  "title": "AccountLimit",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-openapi.json#/components/schemas/AccountLimit",
  "type": "object",
  "required": [
    "amount",
    "currency",
    "decimals",
    "syncStatus",
    "updatedAt",
    "spentToday",
    "remaining"
  ],
  "properties": {
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "Daily limit in minor units of `currency`. Divide by 10^`decimals` to get\nthe major-unit value. USD, EUR, and GBP use 2 decimal places."
    },
    "currency": {
      "type": "string",
      "description": "ISO-4217 currency code — the account native currency (`nativeCurrency`\nfrom `GET /user/account`)."
    },
    "decimals": {
      "type": "integer",
      "format": "int32",
      "description": "Number of decimal places for this currency (2 for USD, EUR, and GBP)."
    },
    "syncStatus": {
      "type": "string",
      "enum": [
        "pending",
        "synced",
        "failed"
      ],
      "description": "Replication state of the limit. `pending` immediately after an update,\n`synced` once the change has been applied, `failed` if the change could not\nbe applied after retries."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Last time this limit was modified."
    },
    "spentToday": {
      "type": "integer",
      "format": "int64",
      "description": "Amount spent today against this limit, in minor units of `currency`.\nResets at the start of each calendar day."
    },
    "remaining": {
      "type": "integer",
      "format": "int64",
      "description": "Remaining headroom today, in minor units of `currency`. Equals max(0,\namount - spentToday)."
    }
  }
}