{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-create-balance-transfer-schema-schema.json",
  "title": "CreateBalanceTransferSchema",
  "description": "Request schema for creating a balance transfer on a line of credit.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-draws-api-openapi.yml#/components/schemas/CreateBalanceTransferSchema",
  "properties": {
    "draw_id": {
      "type": "string",
      "title": "Draw Id",
      "description": "ID to associate with the draw. If not provided, Canopy will generate one."
    },
    "card_id": {
      "type": "string",
      "title": "Card Id",
      "description": "ID of the card associated with the balance transfer."
    },
    "amount_cents": {
      "type": "integer",
      "title": "Amount Cents",
      "description": "Amount to transfer in cents",
      "hidden": false
    },
    "settlement_status": {
      "$ref": "#/$defs/TransactionStatusTypeStatuses",
      "description": "Settlement status of the draw.",
      "default": "SETTLED",
      "hidden": false
    },
    "interest_rate_percent": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        }
      ],
      "title": "Interest Rate Percent",
      "description": "Annual interest rate for the draw as a whole number (e.g., 5.0 for 5%)",
      "hidden": false
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "items": {},
          "type": "array"
        }
      ],
      "maxLength": 100,
      "title": "Metadata",
      "description": "Metadata to associate with the draw"
    },
    "fee": {
      "$ref": "#/$defs/BalanceTransferFeeInput",
      "description": "Fee to create atomically with the balance transfer",
      "hidden": false
    }
  },
  "type": "object",
  "required": [
    "amount_cents",
    "fee"
  ],
  "$defs": {
    "BalanceTransferFeeInput": {
      "properties": {
        "fee_id": {
          "type": "string",
          "title": "Fee Id",
          "description": "ID for the fee. If not provided, Canopy will generate one."
        },
        "amount_cents": {
          "type": "integer",
          "title": "Amount Cents",
          "description": "Balance transfer fee amount in cents",
          "hidden": false
        }
      },
      "type": "object",
      "required": [
        "amount_cents"
      ],
      "title": "BalanceTransferFeeInput",
      "description": "Mandatory fee created atomically with the balance transfer draw."
    },
    "TransactionStatusTypeStatuses": {
      "type": "string",
      "enum": [
        "NONE",
        "PENDING",
        "FAILED",
        "INVALID",
        "VALID",
        "REVERSED",
        "DECLINED",
        "SETTLED",
        "PARTIALLY_SETTLED",
        "IN_DISPUTE",
        "LENDER_WON",
        "LENDER_LOST",
        "POURED",
        "UNPOURED",
        "REPOURED",
        "AUTHORIZED",
        "DEFERRED"
      ],
      "title": "TransactionStatusTypeStatuses"
    }
  }
}