{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curlec/json-schema/curlec-fund-account-schema.json",
  "title": "FundAccount",
  "description": "Payout destination linked to a Contact. Immutable after creation.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/curlec-x-fund-accounts-api-openapi.yml#/components/schemas/FundAccount",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Fund account ID (fa_*)"
    },
    "entity": {
      "type": "string",
      "enum": [
        "fund_account"
      ]
    },
    "contact_id": {
      "type": "string"
    },
    "account_type": {
      "type": "string",
      "enum": [
        "bank_account",
        "vpa",
        "card",
        "wallet"
      ]
    },
    "active": {
      "type": "boolean"
    },
    "batch_id": {
      "type": "string"
    },
    "bank_account": {
      "type": "object",
      "properties": {
        "ifsc": {
          "type": "string"
        },
        "bank_name": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "account_number": {
          "type": "string"
        }
      }
    },
    "vpa": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        },
        "address": {
          "type": "string"
        }
      }
    },
    "card": {
      "type": "object",
      "properties": {
        "last4": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "issuer": {
          "type": "string"
        },
        "input_type": {
          "type": "string",
          "enum": [
            "razorpay_token",
            "service_provider_token",
            "raw"
          ]
        }
      }
    },
    "created_at": {
      "type": "integer"
    },
    "wallet": {
      "type": "object",
      "description": "Amazon Pay wallet details. Required when account_type=wallet.",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "amazonpay"
          ]
        },
        "phone": {
          "type": "string",
          "description": "10-digit phone with country code, e.g. +919876543210"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": "string",
          "minLength": 4,
          "maxLength": 120,
          "description": "Wallet holder name. Case-sensitive. Supported: a-z, A-Z, 0-9, space, ', -, _, /, (, ), ."
        }
      }
    }
  }
}