{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/benjipays-com/json-schema/benjipays-com-list-organization-gateway-capabilities-response-schema.json",
  "title": "ListOrganizationGatewayCapabilitiesResponse",
  "description": "List organization gateway capabilities response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/benjipays-com-gateways-api-openapi.yml#/components/schemas/ListOrganizationGatewayCapabilitiesResponse",
  "type": "object",
  "properties": {
    "defaults": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      },
      "description": "Company default hash per currency. Each value also appears in `data`."
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GatewayCapability"
      },
      "description": "Selectable gateway hashes for the organization"
    }
  },
  "required": [
    "defaults",
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "CapabilityGateway": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Gateway store identifier. Same as GET /v2/gateways `id`."
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Human-readable gateway label"
        },
        "gatewayProcessor": {
          "type": "string",
          "description": "Public processor key"
        },
        "paymentTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "cc",
              "ach",
              "eft",
              "sepa",
              "bacs"
            ]
          },
          "description": "Payment types this store handles in this hash"
        }
      },
      "required": [
        "id",
        "description",
        "gatewayProcessor",
        "paymentTypes"
      ],
      "additionalProperties": false,
      "description": "Store inside a gateway hash"
    },
    "GatewayCapability": {
      "type": "object",
      "properties": {
        "hash": {
          "type": "string",
          "description": "SHA-256 gateway hash identifying this capability."
        },
        "paymentTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "cc",
              "ach",
              "eft",
              "sepa",
              "bacs"
            ]
          },
          "description": "Payment types this hash can collect, in canonical order"
        },
        "currencies": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ISO currency codes this hash supports"
        },
        "setup": {
          "type": "object",
          "properties": {
            "card": {
              "type": "boolean",
              "description": "True when paymentTypes includes cc"
            },
            "bank": {
              "type": "boolean",
              "description": "True when paymentTypes includes ach, eft, bacs, or sepa"
            }
          },
          "required": [
            "card",
            "bank"
          ],
          "additionalProperties": false,
          "description": "Whether this hash can collect card and/or bank payments"
        },
        "gateways": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CapabilityGateway"
          },
          "description": "Enabled stores inside this hash"
        }
      },
      "required": [
        "hash",
        "paymentTypes",
        "currencies",
        "setup",
        "gateways"
      ],
      "additionalProperties": false,
      "description": "One selectable gateway hash and the payment types it can collect"
    }
  }
}