{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exodus-com/json-schema/exodus-com-charge-schema.json",
  "title": "Charge",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/exodus-com-openapi.json#/components/schemas/Charge",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "subscription_charge"
      ]
    },
    "id": {
      "type": "string"
    },
    "subscription_id": {
      "type": "string"
    },
    "subscriber": {
      "type": "string"
    },
    "external_customer_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount": {
      "type": "string"
    },
    "fee": {
      "type": "string"
    },
    "fiat_amount": {
      "type": [
        "string",
        "null"
      ],
      "description": "The subscription's fixed per-cycle fiat price, in fiat_currency's minor units (e.g. cents for USD, centavos for ARS). Set at subscription creation and identical on every charge — not a per-charge market rate, and not a confirmation from the settlement provider (see settlement_status). Null when the subscription is not fiat-denominated, and on failed charges (including on-chain reverts) and indexer-created charges — except the charge taken at subscribe time on a business that settles in fiat, which the subscribe endpoint writes onto the indexer's row when the indexer recorded it first."
    },
    "fiat_currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO-4217 code that fiat_amount is denominated in. Null whenever fiat_amount is null."
    },
    "settlement_status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "pending",
        "delayed",
        "completed",
        "failed",
        null
      ],
      "description": "Fiat settlement leg state: pending, delayed, completed, or failed. Delayed is non-terminal: the payout is running late. Null when the business settles in crypto (fiat_amount is then the subscription's price only, with no settlement leg behind it), when the subscription is not fiat-denominated, and on failed charges (including on-chain reverts) and indexer-created charges — except the charge taken at subscribe time on a business that settles in fiat, which the subscribe endpoint writes onto the indexer's row when the indexer recorded it first."
    },
    "tx_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "chain": {
      "type": "string"
    },
    "token_symbol": {
      "type": [
        "string",
        "null"
      ]
    },
    "token_decimals": {
      "type": [
        "number",
        "null"
      ]
    },
    "charge_nonce": {
      "type": "number"
    },
    "charged_at": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "succeeded",
        "failed"
      ]
    },
    "failure_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "block_number": {
      "type": "string"
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "nullable": true
      }
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "object",
    "id",
    "subscription_id",
    "subscriber",
    "external_customer_id",
    "amount",
    "fee",
    "fiat_amount",
    "fiat_currency",
    "settlement_status",
    "tx_hash",
    "chain",
    "token_symbol",
    "token_decimals",
    "charge_nonce",
    "charged_at",
    "status",
    "failure_reason",
    "block_number",
    "metadata",
    "created_at"
  ]
}